Skip to content

Commit

Permalink
Axual/add configurable options (seglo#268)
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Glover <[email protected]>
  • Loading branch information
2 people authored and JohnPreston committed Mar 4, 2022
1 parent e260abb commit f1424db
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
16 changes: 16 additions & 0 deletions charts/kafka-lag-exporter/templates/031-MountedSecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.secrets -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.secrets.name }}
labels:
app.kubernetes.io/name: {{ include "kafka-lag-exporter.name" . }}
helm.sh/chart: {{ include "kafka-lag-exporter.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
{{- range .Values.secrets.data }}
{{ .name }}: {{ .value }}
{{- end }}
{{- end }}
15 changes: 14 additions & 1 deletion charts/kafka-lag-exporter/templates/040-Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ spec:
labels:
app.kubernetes.io/name: {{ include "kafka-lag-exporter.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/030-ConfigMap.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if .Values.hostAliases }}
hostAliases:
{{ toYaml .Values.hostAliases | indent 8 }}
{{- end }}
{{- if or .Values.watchers.strimzi .Values.serviceAccount.create }}
{{- if .Values.serviceAccount.nameOverride }}
serviceAccountName: {{ .Values.serviceAccount.nameOverride }}
Expand Down Expand Up @@ -72,6 +76,10 @@ spec:
volumeMounts:
- name: config-volume
mountPath: /opt/docker/conf/
{{- if .Values.secrets }}
- mountPath: /opt/docker/secrets/
name: {{ .Values.secrets.name }}
{{- end }}
{{- range .Values.extraConfigmapMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
Expand Down Expand Up @@ -103,6 +111,11 @@ spec:
- name: config-volume
configMap:
name: {{ include "kafka-lag-exporter.fullname" . }}-configmap
{{- if .Values.secrets }}
- name: {{ .Values.secrets.name }}
secret:
secretName: {{ .Values.secrets.name }}
{{- end }}
{{- range .Values.extraConfigmapMounts }}
- name: {{ .name }}
configMap:
Expand Down
14 changes: 14 additions & 0 deletions charts/kafka-lag-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ extraMounts: []
# emptyDir:
# medium: Memory
# mountPath: /var/run/my-secrets

# Define secrets that are mounted at /opt/docker/secrets/ to be used elsewhere, for example in clusters for keystores
secrets: {}
# name: secret-name
# data:
# - name: my-keystore-file.p12
# value: base64-encoded-string

hostAliases: {}
# - ip: "192.168.99.100"
# hostnames:
# - "platform.local"
# - "myotherhost.dev"

env: {}
# - name: JAVA_OPTS
# value: "-Djava.security.auth.login.config=/var/run/my-secrets/jaasConfig"
Expand Down

0 comments on commit f1424db

Please sign in to comment.