diff --git a/charts/logging-operator/README.md b/charts/logging-operator/README.md index d2ada27e8e..2be64ff83f 100644 --- a/charts/logging-operator/README.md +++ b/charts/logging-operator/README.md @@ -82,7 +82,7 @@ Use `createCustomResource=false` with Helm v3 to avoid trying to create CRDs fro | logging.errorOutputRef | string | `""` | GlobalOutput name to flush ERROR events to | | logging.globalFilters | list | `[]` | Global filters to apply on logs before any match or filter mechanism. | | logging.watchNamespaces | list | `[]` | Limit namespaces to watch Flow and Output custom resources. | -| logging.clusterDomain | string | `"cluster.local"` | Cluster domain name to be used when templating URLs to services | +| logging.clusterDomain | string | `"cluster.local."` | Cluster domain name to be used when templating URLs to services | | logging.controlNamespace | string | `""` | Namespace for cluster wide configuration resources like ClusterFlow and ClusterOutput. This should be a protected namespace from regular users. Resources like fluentbit and fluentd will run in this namespace as well. | | logging.allowClusterResourcesFromAllNamespaces | bool | `false` | Allow configuration of cluster resources from any namespace. Mutually exclusive with ControlNamespace restriction of Cluster resources | | logging.nodeAgents | object | `{}` | NodeAgent Configuration | diff --git a/charts/logging-operator/templates/_helpers.tpl b/charts/logging-operator/templates/_helpers.tpl index 8dd7073bb1..b08d9abee3 100644 --- a/charts/logging-operator/templates/_helpers.tpl +++ b/charts/logging-operator/templates/_helpers.tpl @@ -67,7 +67,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Formats the cluster domain as a suffix, e.g.: .Values.clusterDomain == "", returns "" -.Values.clusterDomain == "cluster.local", returns ".cluster.local" +.Values.clusterDomain == "cluster.local.", returns ".cluster.local." */}} {{- define "logging-operator.clusterDomainAsSuffix" -}} {{- if .Values.clusterDomain -}} diff --git a/charts/logging-operator/values.yaml b/charts/logging-operator/values.yaml index 10597474df..1b1b7319cd 100644 --- a/charts/logging-operator/values.yaml +++ b/charts/logging-operator/values.yaml @@ -183,7 +183,7 @@ logging: watchNamespaces: [] # -- Cluster domain name to be used when templating URLs to services - clusterDomain: "cluster.local" + clusterDomain: "cluster.local." # -- Namespace for cluster wide configuration resources like ClusterFlow and ClusterOutput. This should be a protected namespace from regular users. Resources like fluentbit and fluentd will run in this namespace as well. controlNamespace: "" diff --git a/pkg/sdk/logging/api/v1beta1/logging_types.go b/pkg/sdk/logging/api/v1beta1/logging_types.go index dc8ab0b42e..3118d8da44 100644 --- a/pkg/sdk/logging/api/v1beta1/logging_types.go +++ b/pkg/sdk/logging/api/v1beta1/logging_types.go @@ -67,7 +67,7 @@ type LoggingSpec struct { WatchNamespaces []string `json:"watchNamespaces,omitempty"` // WatchNamespaceSelector is a LabelSelector to find matching namespaces to watch as in WatchNamespaces WatchNamespaceSelector *metav1.LabelSelector `json:"watchNamespaceSelector,omitempty"` - // Cluster domain name to be used when templating URLs to services (default: "cluster.local"). + // Cluster domain name to be used when templating URLs to services (default: "cluster.local."). ClusterDomain *string `json:"clusterDomain,omitempty"` // Namespace for cluster wide configuration resources like CLusterFlow and ClusterOutput. // This should be a protected namespace from regular users. @@ -150,7 +150,7 @@ const ( // SetDefaults fills empty attributes func (l *Logging) SetDefaults() error { if l.Spec.ClusterDomain == nil { - l.Spec.ClusterDomain = util.StringPointer("cluster.local") + l.Spec.ClusterDomain = util.StringPointer("cluster.local.") } if !l.Spec.FlowConfigCheckDisabled && l.Status.ConfigCheckResults == nil { l.Status.ConfigCheckResults = make(map[string]bool) @@ -598,7 +598,7 @@ func (l *Logging) QualifiedName(name string) string { // ClusterDomainAsSuffix formats the cluster domain as a suffix, e.g.: // .Spec.ClusterDomain == "", returns "" -// .Spec.ClusterDomain == "cluster.local", returns ".cluster.local" +// .Spec.ClusterDomain == "cluster.local.", returns ".cluster.local." func (l *Logging) ClusterDomainAsSuffix() string { if l.Spec.ClusterDomain == nil || *l.Spec.ClusterDomain == "" { return ""