|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "kafka-ui.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "kafka-ui.labels" . | nindent 4 }} |
| 7 | + {{- with .Values.annotations }} |
| 8 | + annotations: |
| 9 | + {{- toYaml . | nindent 4 }} |
| 10 | + {{- end }} |
| 11 | +spec: |
| 12 | +{{- if not .Values.autoscaling.enabled }} |
| 13 | + replicas: {{ .Values.replicaCount }} |
| 14 | +{{- end }} |
| 15 | + selector: |
| 16 | + matchLabels: |
| 17 | + {{- include "kafka-ui.selectorLabels" . | nindent 6 }} |
| 18 | + template: |
| 19 | + metadata: |
| 20 | + annotations: |
| 21 | + {{- with .Values.podAnnotations }} |
| 22 | + {{- toYaml . | nindent 8 }} |
| 23 | + {{- end }} |
| 24 | + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
| 25 | + checksum/configFromValues: {{ include (print $.Template.BasePath "/configmap_fromValues.yaml") . | sha256sum }} |
| 26 | + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} |
| 27 | + labels: |
| 28 | + {{- include "kafka-ui.selectorLabels" . | nindent 8 }} |
| 29 | + {{- if .Values.podLabels }} |
| 30 | + {{- toYaml .Values.podLabels | nindent 8 }} |
| 31 | + {{- end }} |
| 32 | + spec: |
| 33 | + {{- with .Values.imagePullSecrets }} |
| 34 | + imagePullSecrets: |
| 35 | + {{- toYaml . | nindent 8 }} |
| 36 | + {{- end }} |
| 37 | + {{- with .Values.initContainers }} |
| 38 | + initContainers: |
| 39 | + {{- toYaml . | nindent 8 }} |
| 40 | + {{- end }} |
| 41 | + serviceAccountName: {{ include "kafka-ui.serviceAccountName" . }} |
| 42 | + securityContext: |
| 43 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 44 | + containers: |
| 45 | + - name: {{ .Chart.Name }} |
| 46 | + securityContext: |
| 47 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 48 | + image: {{ include "kafka-ui.imageName" . }} |
| 49 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 50 | + {{- if or .Values.env .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap}} |
| 51 | + env: |
| 52 | + {{- with .Values.env }} |
| 53 | + {{- toYaml . | nindent 12 }} |
| 54 | + {{- end }} |
| 55 | + {{- if or .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap}} |
| 56 | + - name: SPRING_CONFIG_ADDITIONAL-LOCATION |
| 57 | + {{- if .Values.yamlApplicationConfig }} |
| 58 | + value: /kafka-ui/config.yml |
| 59 | + {{- else if .Values.yamlApplicationConfigConfigMap }} |
| 60 | + value: /kafka-ui/{{ .Values.yamlApplicationConfigConfigMap.keyName | default "config.yml" }} |
| 61 | + {{- end }} |
| 62 | + {{- end }} |
| 63 | + {{- end }} |
| 64 | + envFrom: |
| 65 | + {{- if .Values.existingConfigMap }} |
| 66 | + - configMapRef: |
| 67 | + name: {{ .Values.existingConfigMap }} |
| 68 | + {{- end }} |
| 69 | + {{- if .Values.envs.config }} |
| 70 | + - configMapRef: |
| 71 | + name: {{ include "kafka-ui.fullname" . }} |
| 72 | + {{- end }} |
| 73 | + {{- if .Values.existingSecret }} |
| 74 | + - secretRef: |
| 75 | + name: {{ .Values.existingSecret }} |
| 76 | + {{- end }} |
| 77 | + {{- if .Values.envs.secret}} |
| 78 | + - secretRef: |
| 79 | + name: {{ include "kafka-ui.fullname" . }} |
| 80 | + {{- end}} |
| 81 | + ports: |
| 82 | + - name: http |
| 83 | + containerPort: 8080 |
| 84 | + protocol: TCP |
| 85 | + livenessProbe: |
| 86 | + httpGet: |
| 87 | + {{- $contextPath := .Values.envs.config.SERVER_SERVLET_CONTEXT_PATH | default "" | printf "%s/actuator/health" | urlParse }} |
| 88 | + path: {{ get $contextPath "path" }} |
| 89 | + port: http |
| 90 | + {{- if .Values.probes.useHttpsScheme }} |
| 91 | + scheme: HTTPS |
| 92 | + {{- end }} |
| 93 | + initialDelaySeconds: 60 |
| 94 | + periodSeconds: 30 |
| 95 | + timeoutSeconds: 10 |
| 96 | + readinessProbe: |
| 97 | + httpGet: |
| 98 | + {{- $contextPath := .Values.envs.config.SERVER_SERVLET_CONTEXT_PATH | default "" | printf "%s/actuator/health" | urlParse }} |
| 99 | + path: {{ get $contextPath "path" }} |
| 100 | + port: http |
| 101 | + {{- if .Values.probes.useHttpsScheme }} |
| 102 | + scheme: HTTPS |
| 103 | + {{- end }} |
| 104 | + initialDelaySeconds: 60 |
| 105 | + periodSeconds: 30 |
| 106 | + timeoutSeconds: 10 |
| 107 | + resources: |
| 108 | + {{- toYaml .Values.resources | nindent 12 }} |
| 109 | + {{- if or .Values.yamlApplicationConfig .Values.volumeMounts .Values.yamlApplicationConfigConfigMap}} |
| 110 | + volumeMounts: |
| 111 | + {{- with .Values.volumeMounts }} |
| 112 | + {{- toYaml . | nindent 12 }} |
| 113 | + {{- end }} |
| 114 | + {{- if .Values.yamlApplicationConfig }} |
| 115 | + - name: kafka-ui-yaml-conf |
| 116 | + mountPath: /kafka-ui/ |
| 117 | + {{- end }} |
| 118 | + {{- if .Values.yamlApplicationConfigConfigMap}} |
| 119 | + - name: kafka-ui-yaml-conf-configmap |
| 120 | + mountPath: /kafka-ui/ |
| 121 | + {{- end }} |
| 122 | + {{- end }} |
| 123 | + {{- if or .Values.yamlApplicationConfig .Values.volumes .Values.yamlApplicationConfigConfigMap}} |
| 124 | + volumes: |
| 125 | + {{- with .Values.volumes }} |
| 126 | + {{- toYaml . | nindent 8 }} |
| 127 | + {{- end }} |
| 128 | + {{- if .Values.yamlApplicationConfig }} |
| 129 | + - name: kafka-ui-yaml-conf |
| 130 | + configMap: |
| 131 | + name: {{ include "kafka-ui.fullname" . }}-fromvalues |
| 132 | + {{- end }} |
| 133 | + {{- if .Values.yamlApplicationConfigConfigMap}} |
| 134 | + - name: kafka-ui-yaml-conf-configmap |
| 135 | + configMap: |
| 136 | + name: {{ .Values.yamlApplicationConfigConfigMap.name }} |
| 137 | + {{- end }} |
| 138 | + {{- end }} |
| 139 | + {{- with .Values.nodeSelector }} |
| 140 | + nodeSelector: |
| 141 | + {{- toYaml . | nindent 8 }} |
| 142 | + {{- end }} |
| 143 | + {{- with .Values.affinity }} |
| 144 | + affinity: |
| 145 | + {{- toYaml . | nindent 8 }} |
| 146 | + {{- end }} |
| 147 | + {{- with .Values.tolerations }} |
| 148 | + tolerations: |
| 149 | + {{- toYaml . | nindent 8 }} |
| 150 | + {{- end }} |
0 commit comments