diff --git a/helm/akhq/Chart.yaml b/helm/akhq/Chart.yaml index 216358f61..384599ea0 100644 --- a/helm/akhq/Chart.yaml +++ b/helm/akhq/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "0.17.0" description: Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more... name: akhq -version: 0.2.0 +version: 0.2.1 keywords: - kafka - confluent diff --git a/helm/akhq/templates/deployment.yaml b/helm/akhq/templates/deployment.yaml index 938a8ccdc..62323f124 100644 --- a/helm/akhq/templates/deployment.yaml +++ b/helm/akhq/templates/deployment.yaml @@ -23,7 +23,7 @@ spec: {{- if .Values.configuration }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- end }} - {{- if .Values.secrets }} + {{- if and (not .Values.existingSecret) (.Values.secrets) }} checksum/secrets: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} {{- end }} {{- with .Values.image.annotations }} @@ -57,7 +57,7 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy | default "Always" }} env: {{- if .Values.extraEnv }}{{ toYaml .Values.extraEnv | trim | nindent 12 }}{{ end }} - {{- if .Values.secrets }} + {{- if or (.Values.existingSecrets) (.Values.secrets) }} - name: MICRONAUT_ENVIRONMENTS value: secrets - name: MICRONAUT_CONFIG_FILES @@ -70,7 +70,7 @@ spec: mountPath: /app/application.yml subPath: application.yml {{- end }} - {{- if .Values.secrets }} + {{- if or (.Values.existingSecrets) (.Values.secrets) }} - name: secrets mountPath: /app/application-secrets.yml subPath: application-secrets.yml @@ -110,8 +110,12 @@ spec: configMap: name: {{ template "akhq.fullname" . }} {{- end }} - {{- if .Values.secrets }} + {{- if or (.Values.existingSecrets) (.Values.secrets) }} - name: secrets secret: + {{- if .Values.existingSecrets }} + secretName: {{ .Values.existingSecrets }} + {{- else }} secretName: {{ template "akhq.fullname" . }}-secrets + {{- end }} {{- end }} diff --git a/helm/akhq/templates/secret.yaml b/helm/akhq/templates/secret.yaml index dd3d548d6..b9afdc48d 100644 --- a/helm/akhq/templates/secret.yaml +++ b/helm/akhq/templates/secret.yaml @@ -1,4 +1,4 @@ -{{- if .Values.secrets }} +{{- if and ( not .Values.existingSecrets) (.Values.secrets) }} apiVersion: v1 kind: Secret metadata: @@ -16,4 +16,4 @@ data: {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/helm/akhq/values.yaml b/helm/akhq/values.yaml index f7966a33a..abbf26c1e 100644 --- a/helm/akhq/values.yaml +++ b/helm/akhq/values.yaml @@ -28,27 +28,29 @@ extraEnv: [] configuration: | akhq: server: - access-log: - enabled: false + access-log: + enabled: false name: org.akhq.log.access ##... and secret for connection information -secrets: | - akhq: - connections: - my-cluster-plain-text: - properties: - bootstrap.servers: "kafka:9092" - schema-registry: - url: "http://schema-registry:8085" - type: "confluent" - basic-auth-username: basic-auth-user - basic-auth-password: basic-auth-pass - connect: - - name: "my-connect" - url: "http://connect:8083" - basic-auth-username: basic-auth-user - basic-auth-password: basic-auth-pass +existingSecrets: "" +# name of the existingSecret +secrets: {} +# akhq: +# connections: +# my-cluster-plain-text: +# properties: +# bootstrap.servers: "kafka:9092" +# schema-registry: +# url: "http://schema-registry:8085" +# type: "confluent" +# basic-auth-username: basic-auth-user +# basic-auth-password: basic-auth-pass +# connect: +# - name: "my-connect" +# url: "http://connect:8083" +# basic-auth-username: basic-auth-user +# basic-auth-password: basic-auth-pass kafkaSecrets: [] #Provide extra base64 encoded kubernetes secrets (keystore/truststore) @@ -64,7 +66,7 @@ serviceAccountName: null # Add your own init container or uncomment and modify the example. initContainers: {} -# create-keystore: +# create-keystore: # image: "openjdk:11-slim" # command: ['sh', '-c', 'keytool'] # volumeMounts: