diff --git a/deploy/README.md b/deploy/README.md index d2648a8a47..c3fd57100c 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -29,8 +29,9 @@ helm install elastic-operator-crds ./eck-operator/charts/eck-operator-crds # This step can be done by any user with full access to the my-namespace namespace. helm install elastic-operator ./eck-operator -n my-namespace --create-namespace \ --set=installCRDs=false \ - --set=managedNamespaces='{my-namespace}' \ + --set=singleNamespaceMode=true \ --set=createClusterScopedResources=false \ + --set=config.validateStorageClass=false \ --set=webhook.enabled=false ``` diff --git a/deploy/eck-operator/templates/configmap.yaml b/deploy/eck-operator/templates/configmap.yaml index 01708b523e..b01f77d87a 100644 --- a/deploy/eck-operator/templates/configmap.yaml +++ b/deploy/eck-operator/templates/configmap.yaml @@ -67,8 +67,12 @@ data: {{- end }} webhook-port: {{ .Values.webhook.port }} {{- end }} - {{- with .Values.managedNamespaces }} + {{- if .Values.singleNamespaceMode }} + namespaces: [{{ .Release.Namespace }}] + {{- else }} + {{- with .Values.managedNamespaces }} namespaces: [{{ join "," . }}] + {{- end }} {{- end }} operator-namespace: {{ .Release.Namespace }} enable-leader-election: {{ .Values.config.enableLeaderElection }} diff --git a/deploy/eck-operator/values.yaml b/deploy/eck-operator/values.yaml index 431b8faa64..2b6fba8f5d 100644 --- a/deploy/eck-operator/values.yaml +++ b/deploy/eck-operator/values.yaml @@ -97,6 +97,9 @@ volumes: [] # createClusterScopedResources determines whether cluster-scoped resources (ClusterRoles, ClusterRoleBindings) should be created. createClusterScopedResources: true +# singleNamespaceMode will set the operator to only watch its deployed namespace +singleNamespaceMode: false + # Automount API credentials for the Service Account into the pod. automountServiceAccountToken: true