Skip to content

Commit

Permalink
feature-9: add-yamlApplicationConfigSecret
Browse files Browse the repository at this point in the history
  • Loading branch information
timchenko-a committed Apr 20, 2024
1 parent 49d51d2 commit e1d8051
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
19 changes: 15 additions & 4 deletions charts/kafka-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,19 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "kafka-ui.imageName" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if or .Values.env .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap}}
{{- if or .Values.env .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap .Values.yamlApplicationConfigSecret }}
env:
{{- with .Values.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if or .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap}}
{{- if or .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap .Values.yamlApplicationConfigSecret }}
- name: SPRING_CONFIG_ADDITIONAL-LOCATION
{{- if .Values.yamlApplicationConfig }}
value: /kafka-ui/config.yml
{{- else if .Values.yamlApplicationConfigConfigMap }}
value: /kafka-ui/{{ .Values.yamlApplicationConfigConfigMap.keyName | default "config.yml" }}
{{- else if .Values.yamlApplicationConfigSecret }}
value: /kafka-ui/{{ .Values.yamlApplicationConfigSecret.keyName | default "config.yml" }}
{{- end }}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -107,7 +109,7 @@ spec:
timeoutSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if or .Values.yamlApplicationConfig .Values.volumeMounts .Values.yamlApplicationConfigConfigMap}}
{{- if or .Values.yamlApplicationConfig .Values.volumeMounts .Values.yamlApplicationConfigConfigMap .Values.yamlApplicationConfigSecret }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
Expand All @@ -120,8 +122,12 @@ spec:
- name: kafka-ui-yaml-conf-configmap
mountPath: /kafka-ui/
{{- end }}
{{- if .Values.yamlApplicationConfigSecret}}
- name: kafka-ui-yaml-conf-secret
mountPath: /kafka-ui/
{{- end }}
{{- end }}
{{- if or .Values.yamlApplicationConfig .Values.volumes .Values.yamlApplicationConfigConfigMap}}
{{- if or .Values.yamlApplicationConfig .Values.volumes .Values.yamlApplicationConfigConfigMap .Values.yamlApplicationConfigSecret }}
volumes:
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
Expand All @@ -136,6 +142,11 @@ spec:
configMap:
name: {{ .Values.yamlApplicationConfigConfigMap.name }}
{{- end }}
{{- if .Values.yamlApplicationConfigSecret}}
- name: kafka-ui-yaml-conf-secret
secret:
secretName: {{ .Values.yamlApplicationConfigSecret.name }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
5 changes: 5 additions & 0 deletions charts/kafka-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ yamlApplicationConfigConfigMap:
{}
# keyName: config.yml
# name: configMapName
yamlApplicationConfigSecret:
{}
# keyName: config.yml
# name: secretName

existingSecret: ""
envs:
secret: {}
Expand Down

0 comments on commit e1d8051

Please sign in to comment.