|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "apl-keycloak-operator.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "apl-keycloak-operator.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + replicas: {{ .Values.replicaCount }} |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + {{- include "apl-keycloak-operator.selectorLabels" . | nindent 6 }} |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + {{- with .Values.podAnnotations }} |
| 15 | + annotations: |
| 16 | + {{- toYaml . | nindent 8 }} |
| 17 | + {{- end }} |
| 18 | + labels: |
| 19 | + {{- include "apl-keycloak-operator.labels" . | nindent 8 }} |
| 20 | + spec: |
| 21 | + {{- with .Values.imagePullSecrets }} |
| 22 | + imagePullSecrets: |
| 23 | + {{- toYaml . | nindent 8 }} |
| 24 | + {{- end }} |
| 25 | + serviceAccountName: {{ include "apl-keycloak-operator.serviceAccountName" . }} |
| 26 | + securityContext: |
| 27 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 28 | + containers: |
| 29 | + - name: {{ .Chart.Name }} |
| 30 | + securityContext: |
| 31 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 32 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 33 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 34 | + {{- if and .Values.configs (not (empty .Values.configs.tls.certificates)) }} |
| 35 | + command: ['/bin/sh', '-c'] |
| 36 | + args: ['export NODE_EXTRA_CA_CERTS=/app/config/tls/certificate.crt && npm run operator:keycloak'] |
| 37 | + env: |
| 38 | + - name: NODE_EXTRA_CA_CERTS |
| 39 | + value: "/app/config/tls/certificate.crt" |
| 40 | + {{- else }} |
| 41 | + command: ['npm', 'run', 'operator:keycloak'] |
| 42 | + {{- end }} |
| 43 | + resources: |
| 44 | + {{- toYaml .Values.resources | nindent 12 }} |
| 45 | + volumeMounts: |
| 46 | + - name: tls-certs |
| 47 | + mountPath: /app/config/tls/certificate.crt |
| 48 | + subPath: certificate.crt |
| 49 | + {{- with .Values.nodeSelector }} |
| 50 | + nodeSelector: |
| 51 | + {{- toYaml . | nindent 8 }} |
| 52 | + {{- end }} |
| 53 | + {{- with .Values.affinity }} |
| 54 | + affinity: |
| 55 | + {{- toYaml . | nindent 8 }} |
| 56 | + {{- end }} |
| 57 | + {{- with .Values.tolerations }} |
| 58 | + tolerations: |
| 59 | + {{- toYaml . | nindent 8 }} |
| 60 | + {{- end }} |
| 61 | + volumes: |
| 62 | + - name: tls-certs |
| 63 | + secret: |
| 64 | + secretName: keycloak-operator-tls-certs-cm |
| 65 | + - name: operator-config-kc |
| 66 | + configMap: |
| 67 | + name: apl-keycloak-operator-cm |
| 68 | + - name: operator-secret-kc |
| 69 | + secret: |
| 70 | + secretName: apl-keycloak-operator-secret |
0 commit comments