Skip to content

Commit

Permalink
Use args for CLI parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Jul 22, 2024
1 parent e38af13 commit 92c9d52
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 35 deletions.
4 changes: 0 additions & 4 deletions charts/producer-app-cleanup-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ spec:
name: {{ $value.name }}
key: "{{ $value.key }}"
{{- end }}
{{- range $key, $value := .Values.commandLine }}
- name: "{{ $root.Values.configurationEnvPrefix }}_{{ $key }}"
value: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.env }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
Expand Down
4 changes: 0 additions & 4 deletions charts/producer-app/templates/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ spec:
name: {{ $value.name }}
key: "{{ $value.key }}"
{{- end }}
{{- range $key, $value := .Values.commandLine }}
- name: "{{ $root.Values.configurationEnvPrefix }}_{{ $key }}"
value: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.env }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
Expand Down
54 changes: 27 additions & 27 deletions charts/streams-app-cleanup-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,58 +56,58 @@ spec:
resources:
{{ toYaml .Values.resources | indent 12 }}
args:
{{- if hasKey .Values.streams "brokers" }}
{{- if hasKey .Values.streams "brokers" }}
- --brokers
- {{ .Values.streams.brokers | quote }}
{{- end }}
{{- if hasKey .Values.streams "schemaRegistryUrl" }}
{{- end }}
{{- if hasKey .Values.streams "schemaRegistryUrl" }}
- --schema-registry-url
- {{ .Values.streams.schemaRegistryUrl | quote }}
{{- end }}
{{- if hasKey .Values "debug" }}
{{- end }}
{{- if hasKey .Values "debug" }}
- --debug
- {{ .Values.debug | quote }}
{{- end }}
{{- range .Values.streams.inputTopics }}
{{- end }}
{{- range .Values.streams.inputTopics }}
- --input-topics
- {{ . | quote }}
{{- end }}
{{- if hasKey .Values.streams "inputPattern" }}
{{- end }}
{{- if hasKey .Values.streams "inputPattern" }}
- --input-pattern
- {{ .Values.streams.inputPattern | quote }}
{{- end }}
{{- if hasKey .Values.streams "outputTopic" }}
{{- end }}
{{- if hasKey .Values.streams "outputTopic" }}
- --output-topic
- {{ .Values.streams.outputTopic | quote }}
{{- end }}
{{- if hasKey .Values.streams "errorTopic" }}
{{- end }}
{{- if hasKey .Values.streams "errorTopic" }}
- --error-topic
- {{ .Values.streams.errorTopic | quote }}
{{- end }}
{{- range $key, $value := .Values.streams.extraOutputTopics }}
{{- end }}
{{- range $key, $value := .Values.streams.extraOutputTopics }}
- --extra-output-topics
- {{ $key }}={{ $value }}
{{- end }}
{{- range $key, $value := .Values.streams.extraInputTopics }}
{{- end }}
{{- range $key, $value := .Values.streams.extraInputTopics }}
- --extra-input-topics
- {{ $key }}={{ $value | join ";" }}
{{- end }}
{{- range $key, $value := .Values.streams.extraInputPatterns }}
{{- end }}
{{- range $key, $value := .Values.streams.extraInputPatterns }}
- --extra-input-patterns
- {{ $key }}={{ $value }}
{{- end }}
{{- range $key, $value := .Values.commandLine }}
{{- end }}
{{- range $key, $value := .Values.commandLine }}
- {{ $key | quote }}
- {{ $value | quote }}
{{- end }}
{{- range .Values.commandLineList }}
{{- end }}
{{- range .Values.commandLineList }}
- {{ . | quote }}
{{- end }}
{{- if .Values.streams.deleteOutput }}
{{- end }}
{{- if .Values.streams.deleteOutput }}
- clean
{{- else }}
{{- else }}
- reset
{{- end }}
{{- end }}
env:
- name: ENV_PREFIX
value: {{ .Values.configurationEnvPrefix }}_
Expand Down

0 comments on commit 92c9d52

Please sign in to comment.