Skip to content

Commit

Permalink
tidying stuff up
Browse files Browse the repository at this point in the history
  • Loading branch information
arichtman committed Dec 13, 2023
1 parent 2b65038 commit 5172479
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
10 changes: 10 additions & 0 deletions examples/helm-chart/configmap.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

4 changes: 2 additions & 2 deletions examples/helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

13 changes: 4 additions & 9 deletions examples/helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -107,3 +101,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

6 changes: 3 additions & 3 deletions examples/helm-chart/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

4 changes: 4 additions & 0 deletions examples/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ securityContext: {}
service:
type: ClusterIP

dataPrepperConfig: {}
pipelineConfig: {}

ports:
- name: http
port: 2021
Expand Down Expand Up @@ -100,3 +103,4 @@ nodeSelector: {}
tolerations: []

affinity: {}

0 comments on commit 5172479

Please sign in to comment.