diff --git a/examples/helm-chart/configmap.yaml b/examples/helm-chart/configmap.yaml new file mode 100644 index 0000000000..87cf43b672 --- /dev/null +++ b/examples/helm-chart/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + # TODO: work out how to pass through the yaml + data-prepper-config.yaml: 'ssl: false' +kind: ConfigMap +metadata: + name: {{ include "data-prepper.configName" . }} + labels: + {{- include "data-prepper.labels" . | nindent 4 }} + diff --git a/examples/helm-chart/templates/_helpers.tpl b/examples/helm-chart/templates/_helpers.tpl index 0d4a539802..ead1a03966 100644 --- a/examples/helm-chart/templates/_helpers.tpl +++ b/examples/helm-chart/templates/_helpers.tpl @@ -64,7 +64,7 @@ Create the name of the service account to use {{/* Content-based name for configuration so it triggers a redeploy */}} -{{- define "data-prepper.secretName" -}} -{{- include "data-prepper.fullname" . }}-{{ trunc 253 (sha256sum (cat .Values.dataPrepperConfig .Values.pipelineConfig )) -}} +{{- define "data-prepper.configName" -}} +{{- include "data-prepper.fullname" . }}-{{ trunc 8 (sha256sum (cat .Values.dataPrepperConfig .Values.pipelineConfig )) -}} {{- end }} diff --git a/examples/helm-chart/templates/deployment.yaml b/examples/helm-chart/templates/deployment.yaml index 7661f4e613..8d470761c9 100644 --- a/examples/helm-chart/templates/deployment.yaml +++ b/examples/helm-chart/templates/deployment.yaml @@ -81,17 +81,11 @@ spec: {{- end }} volumes: - name: data-prepper-config - secret: - secretName: {{ include "data-prepper.secretName" . }} - items: - - key: data-prepper-config - path: data-prepper-config.yaml + configMap: + name: {{ include "data-prepper.configName" . }} - name: data-prepper-pipelines secret: - secretName: {{ include "data-prepper.secretName" . }} - items: - - key: pipelines - path: pipelines.yaml + secretName: {{ include "data-prepper.configName" . }} {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- end }} @@ -107,3 +101,4 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + diff --git a/examples/helm-chart/templates/secret.yaml b/examples/helm-chart/templates/secret.yaml index f313d16c1f..a7f63e4868 100644 --- a/examples/helm-chart/templates/secret.yaml +++ b/examples/helm-chart/templates/secret.yaml @@ -1,9 +1,9 @@ apiVersion: v1 data: - data-prepper-config: {{ toYaml .Values.dataPrepperConfig | b64enc }} - pipelines: {{ toYaml .Values.pipelineConfig | b64enc }} + pipelines.yaml: {{ toYaml .Values.pipelineConfig | b64enc }} kind: Secret metadata: - name: {{ include "data-prepper.secretName" . }} + name: {{ include "data-prepper.configName" . }} labels: {{- include "data-prepper.labels" . | nindent 4 }} + diff --git a/examples/helm-chart/values.yaml b/examples/helm-chart/values.yaml index 0075b94b25..082e11b1ab 100644 --- a/examples/helm-chart/values.yaml +++ b/examples/helm-chart/values.yaml @@ -37,6 +37,9 @@ securityContext: {} service: type: ClusterIP +dataPrepperConfig: {} +pipelineConfig: {} + ports: - name: http port: 2021 @@ -100,3 +103,4 @@ nodeSelector: {} tolerations: [] affinity: {} +