-
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.
feat: Custom labels and annotations for namespace. (#702)
Signed-off-by: Christopher Pitstick <[email protected]>
- Loading branch information
1 parent
1588ef8
commit a21f278
Showing
3 changed files
with
33 additions
and
9 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