Skip to content

Commit

Permalink
Fix tls deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
spilchen committed Nov 9, 2023
1 parent de6f02c commit 18dc195
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions .helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.png
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apiVersion: v2
name: vertica-kafka-scheduler
description: Deploys the Vertica Kafka Scheduler in Kubernetes
type: application
version: 0.1.1
version: 0.1.2
# The appVersion corresponds to the Vertica version
appVersion: "23.4.0"
icon: https://raw.githubusercontent.com/vertica/kafka-scheduler-chart/main/vertica-logo.png
Expand Down
5 changes: 3 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ Create the name of the service account to use
Generate te value for VKCONFIG_JVM_OPTS based on values.yaml
*/}}
{{- define "vertica-kafka-scheduler.jvmOpts" -}}
{{- if .Values.tls.enabled -}}
"-Djavax.net.ssl.trustStore={{ .Values.tls.trustStoreMountPath }}/{{ .Values.tls.trustStoreSecretKey }} -Djavax.net.ssl.keyStore={{ .Values.tls.keyStoreMountPath }}/{{ .Values.tls.keyStoreSecretKey }} -Djavax.net.ssl.keyStorePassword={{ .Values.tls.keyStorePassword }} {{ .Values.jvmOpts }}"
{{- else }}
{{ default (quote "") .Values.jvmOpts }}
{{- if .Values.tls.enabled }}
-Djavax.net.ssl.trustStore={{ .Values.tls.trustStoreMountPath }}/{{ .Values.tls.trustStoreSecretKey }} -Djavax.net.ssl.keyStore={{ .Values.tls.keyStoreMountPath }}/{{ .Values.tls.keyStoreSecretKey }} -Djavax.net.ssl.keyStorePassword={{ .Values.tls.keystorePassword }}
{{- end }}
{{- end }}
10 changes: 6 additions & 4 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,25 @@ spec:
- name: vkconfig
mountPath: /opt/vertica/packages/kafka/config
{{- if .Values.tls.enabled }}
- name: trustStore
- name: truststore
mountPath: {{ .Values.tls.trustStoreMountPath }}
- name: keyStore
- name: keystore
mountPath: {{ .Values.tls.keyStoreMountPath }}
{{- end }}
env:
- name: VKCONFIG_JVM_OPTS
value: {{ include "vertica-kafka-scheduler.jvmOpts" . }}
- name: VKCONFIG_CONF
value: /opt/vertica/packages/kafka/config/vkconfig.conf
volumes:
- name: vkconfig
configMap:
name: {{ include "vertica-kafka-scheduler.configmap-fullname" . }}
{{- if .Values.tls.enabled }}
- name: trustStore
- name: truststore
secret:
secretName: {{ .Values.tls.trustStoreSecretName }}
- name: keyStore
- name: keystore
secret:
secretName: {{ .Values.tls.keyStoreSecretName }}
{{- end }}
Expand Down
10 changes: 6 additions & 4 deletions templates/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,25 @@ spec:
- name: vkconfig
mountPath: /opt/vertica/packages/kafka/config
{{- if .Values.tls.enabled }}
- name: trustStore
- name: truststore
mountPath: {{ .Values.tls.trustStoreMountPath }}
- name: keyStore
- name: keystore
mountPath: {{ .Values.tls.keyStoreMountPath }}
{{- end }}
env:
- name: VKCONFIG_JVM_OPTS
value: {{ include "vertica-kafka-scheduler.jvmOpts" . }}
- name: VKCONFIG_CONF
value: /opt/vertica/packages/kafka/config/vkconfig.conf
volumes:
- name: vkconfig
configMap:
name: {{ include "vertica-kafka-scheduler.configmap-fullname" . }}
{{- if .Values.tls.enabled }}
- name: trustStore
- name: truststore
secret:
secretName: {{ .Values.tls.trustStoreSecretName }}
- name: keyStore
- name: keystore
secret:
secretName: {{ .Values.tls.keyStoreSecretName }}
{{- end }}
Expand Down

0 comments on commit 18dc195

Please sign in to comment.