Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
6 changes: 5 additions & 1 deletion deploy/eck-operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ data:
{{- end }}
webhook-port: {{ .Values.webhook.port }}
{{- end }}
{{- with .Values.managedNamespaces }}
{{- if .Values.singleNamespaceMode }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we validate that managedNamespaces is not set if singleNamespaceMode is true?
Something along the lines of:

Suggested change
{{- if .Values.singleNamespaceMode }}
{{- if and .Values.singleNamespaceMode .Values.managedNamespaces }}
{{- fail "managedNamespaces should not be set when singleNamespaceMode is enabled" }}
{{- end }}
{{- if .Values.singleNamespaceMode }}

namespaces: [{{ .Release.Namespace }}]
{{- else }}
{{- with .Values.managedNamespaces }}
namespaces: [{{ join "," . }}]
{{- end }}
{{- end }}
operator-namespace: {{ .Release.Namespace }}
enable-leader-election: {{ .Values.config.enableLeaderElection }}
Expand Down
3 changes: 3 additions & 0 deletions deploy/eck-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down