rancher-partner-charts/charts/ondat/ondat-operator/templates/namespaces.yaml

29 lines
800 B
YAML

{{- if .Values.cluster.namespace }}
# We want to create the storageoscluster namespace if and only if it isn't the
# same namespace as used for the release AND it doesn't already exist in the
# cluster.
# The 'lookup' function takes the state of the cluster before the start of the
# helm install.
{{- if not (lookup "v1" "Namespace" "" .Values.cluster.namespace) }}
{{- if not (eq .Release.Namespace .Values.cluster.namespace) }}
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.cluster.namespace }}
labels:
app: {{ template "storageos.name" . }}
app.kubernetes.io/component: operator
control-plane: controller-manager
chart: {{ template "storageos.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end }}
{{- end }}
{{- end }}