-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom labels and annotations for namespace.
Also makes it possible to simply disable namespace creation for clusters where ownership of the namespace needs to lie elsewhere for policy or structural reasons.
- Loading branch information
1 parent
b5ad594
commit 83049e3
Showing
3 changed files
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
# Only deploy the namespace if the default is being used (helm install should fail if the namespace isnt present) | ||
# when one is defined with -n | ||
{{ if eq ( include "chart.namespace" . ) .Values.defaultNamespace }} | ||
{{- if and (eq (include "chart.namespace" .) .Values.defaultNamespace) .Values.namespace.create }} | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: '{{ include "chart.namespace" . }}' | ||
labels: | ||
control-plane: controller-manager | ||
name: '{{ include "chart.namespace" . }}' | ||
{{ end }} | ||
{{- range $key, $value := $.Values.namespace.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
annotations: | ||
{{- range $key, $value := $.Values.namespace.annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters