diff --git a/resources/keb/templates/globalaccounts.yaml b/resources/keb/templates/globalaccounts.yaml index 2767d700f5..40da92d828 100644 --- a/resources/keb/templates/globalaccounts.yaml +++ b/resources/keb/templates/globalaccounts.yaml @@ -2,29 +2,34 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: "kyma-environment-globalaccounts" + name: "{{- .Values.globalaccounts.name -}}" namespace: kcp-system labels: - app.kubernetes.io/name: kyma-environment-globalaccounts + name: "{{- .Values.globalaccounts.name -}}" spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/name: kyma-environment-globalaccounts + name: "{{- .Values.globalaccounts.name -}}" template: metadata: - name: kyma-environment-globalaccounts + name: "{{- .Values.globalaccounts.name -}}" labels: - app.kubernetes.io/name: kyma-environment-globalaccounts + app.kubernetes.io/name: "{{- .Values.globalaccounts.name -}}" spec: - serviceAccountName: kcp-kyma-environment-broker + serviceAccountName: {{ .Values.global.kyma_environment_broker.serviceAccountName }} + {{- with .Values.deployment.securityContext }} securityContext: - runAsUser: 2000 - restartPolicy: Always + {{ toYaml . | nindent 12 }} + {{- end }} + {{- if ne .Values.imagePullSecret "" }} + imagePullSecrets: + - name: {{ .Values.imagePullSecret }} + {{- end }} containers: - - name: kyma-environment-globalaccounts + - name: "{{- .Values.globalaccounts.name -}}" command: ["/bin/main"] - image: europe-docker.pkg.dev/kyma-project/prod/kyma-environment-globalaccounts:1.0.0 + image: "{{ .Values.global.images.container_registry.path }}/{{ .Values.global.images.kyma_environment_broker.dir }}{{ .Values.globalaccounts.name -}}:{{ .Values.global.images.kyma_environment_globalaccounts.version }}" imagePullPolicy: Always env: - name: GLOBALACCOUNTS_DATABASE_SECRET_KEY @@ -61,17 +66,17 @@ spec: - name: GLOBALACCOUNTS_CIS_ACCOUNTS_CLIENT_ID valueFrom: secretKeyRef: - name: {{ .Values.cis.accounts.secretName | required "please specify .Values.cis.accounts.secretName" | quote }} + name: {{ .Values.globalaccounts.accounts.clientId | required "please specify .Values.globalaccounts.accounts.clientId" | quote }} key: id - name: GLOBALACCOUNTS_CIS_ACCOUNTS_CLIENT_SECRET valueFrom: secretKeyRef: - name: {{ .Values.cis.accounts.secretName | required "please specify .Values.cis.accounts.secretName" | quote }} + name: {{ .Values.globalaccounts.accounts.secretName | required "please specify .Values.globalaccounts.accounts.secretName" | quote }} key: secret - name: GLOBALACCOUNTS_ACCOUNTS_AUTH_URL - value: {{ .Values.cis.accounts.authURL | required "please specify .Values.cis.accounts.authURL" | quote }} + value: {{ .Values.globalaccounts.accounts.authURL | required "please specify .Values.globalaccounts.accounts.authURL" | quote }} - name: GLOBALACCOUNTS_ACCOUNTS_SERVICE_URL - value: {{ .Values.cis.accounts.serviceURL | required "please specify .Values.cis.accounts.serviceURL" | quote }} + value: {{ .Values.globalaccounts.accounts.serviceURL | required "please specify .Values.globalaccounts.accounts.serviceURL" | quote }} - name: GLOBALACCOUNTS_DATABASE_SSLMODE valueFrom: secretKeyRef: diff --git a/resources/keb/values.yaml b/resources/keb/values.yaml index 62455576f6..5ac8ce278a 100644 --- a/resources/keb/values.yaml +++ b/resources/keb/values.yaml @@ -32,6 +32,9 @@ global: kyma_environment_subaccount_sync: dir: version: "1.10.12" + kyma_environment_globalaccounts: + dir: + version: "1.10.12" kyma_environment_broker: enabled: false serviceAccountName: "kcp-kyma-environment-broker" @@ -605,4 +608,10 @@ testConfig: globalaccounts: enabled: false - dryRun: true \ No newline at end of file + dryRun: true + name: "kyma-environment-globalaccounts" + accounts: + secretName: "" + clientId: "" + authURL: "" + serviceURL: "" \ No newline at end of file