-
Notifications
You must be signed in to change notification settings - Fork 0
/
configmap.yml
28 lines (28 loc) · 946 Bytes
/
configmap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
apiVersion: v1
data:
{{- if .Values.cluster.id }}
CLUSTER_ID: {{ .Values.cluster.id }}
{{- else }}
{{- $configmap := lookup "v1" "ConfigMap" .Release.Namespace "sap-btp-operator-config" -}}
{{- if $configmap }}
CLUSTER_ID: {{ $configmap.data.CLUSTER_ID }}
{{- else }}
CLUSTER_ID: {{ uuidv4}}
{{- end }}
{{- end }}
{{- if .Values.manager.management_namespace }}
MANAGEMENT_NAMESPACE: {{ .Values.manager.management_namespace }}
{{- else }}
MANAGEMENT_NAMESPACE: {{.Release.Namespace}}
{{- end }}
RELEASE_NAMESPACE: {{.Release.Namespace}}
ALLOW_CLUSTER_ACCESS: {{ .Values.manager.allow_cluster_access | quote }}
{{- if not .Values.manager.allow_cluster_access }}
{{- if gt (len .Values.manager.allowed_namespaces) 0 }}
ALLOWED_NAMESPACES: {{ join "," .Values.manager.allowed_namespaces }}
{{- end }}
{{- end }}
kind: ConfigMap
metadata:
name: sap-btp-operator-config
namespace: {{.Release.Namespace}}