diff --git a/charts/producer-app-cleanup-job/templates/job.yaml b/charts/producer-app-cleanup-job/templates/job.yaml index 8316ca910..2e07a777e 100644 --- a/charts/producer-app-cleanup-job/templates/job.yaml +++ b/charts/producer-app-cleanup-job/templates/job.yaml @@ -48,6 +48,29 @@ spec: resources: {{ toYaml .Values.resources | indent 12 }} args: + {{- if hasKey .Values.kafka "bootstrapServers" }} + - --bootstrap-servers + - {{ .Values.kafka.bootstrapServers | quote }} + {{- end }} + {{- if hasKey .Values.kafka "schemaRegistryUrl" }} + - --schema-registry-url + - {{ .Values.kafka.schemaRegistryUrl | quote }} + {{- end }} + {{- if hasKey .Values.kafka "outputTopic" }} + - --output-topic + - {{ .Values.kafka.outputTopic | quote }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledOutputTopics }} + - --labeled-output-topics + - {{ $key }}={{ $value }} + {{- end }} + {{- range $key, $value := .Values.commandLine }} + - {{ $key | quote }} + - {{ $value | quote }} + {{- end }} + {{- range .Values.commandLineList }} + - {{ . | quote }} + {{- end }} - clean env: - name: ENV_PREFIX @@ -56,22 +79,6 @@ spec: - name: {{ printf "KAFKA_%s" $key | replace "." "_" | upper | quote }} value: {{ $value | quote }} {{- end }} - {{- if hasKey .Values.kafka "bootstrapServers" }} - - name: "{{ .Values.configurationEnvPrefix }}_BOOTSTRAP_SERVERS" - value: {{ .Values.kafka.bootstrapServers | quote }} - {{- end }} - {{- if hasKey .Values.kafka "schemaRegistryUrl" }} - - name: "{{ .Values.configurationEnvPrefix }}_SCHEMA_REGISTRY_URL" - value: {{ .Values.kafka.schemaRegistryUrl | quote }} - {{- end }} - {{- if hasKey .Values.kafka "outputTopic" }} - - name: "{{ .Values.configurationEnvPrefix }}_OUTPUT_TOPIC" - value: {{ .Values.kafka.outputTopic | quote }} - {{- end }} - {{- if and (hasKey .Values.kafka "labeledOutputTopics") (.Values.kafka.labeledOutputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_OUTPUT_TOPICS" - value: "{{- range $key, $value := .Values.kafka.labeledOutputTopics }}{{ $key }}={{ $value }},{{- end }}" - {{- end }} {{- range $key, $value := .Values.secrets }} - name: "{{ $key }}" valueFrom: @@ -86,10 +93,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 }} diff --git a/charts/producer-app-cleanup-job/values.yaml b/charts/producer-app-cleanup-job/values.yaml index f71430983..bd6681780 100644 --- a/charts/producer-app-cleanup-job/values.yaml +++ b/charts/producer-app-cleanup-job/values.yaml @@ -28,7 +28,10 @@ kafka: # label: output commandLine: {} -# MY_CLI_PARAM: "foo-bar" +# --my-cli-param: "foo-bar" +commandLineList: [] +# - --my-cli-param +# - foo-bar env: {} # MY_ENV_VARIABLE: foo-bar diff --git a/charts/producer-app/templates/_pod.yaml b/charts/producer-app/templates/_pod.yaml index 747c2eea6..28fcc7ec4 100644 --- a/charts/producer-app/templates/_pod.yaml +++ b/charts/producer-app/templates/_pod.yaml @@ -41,6 +41,30 @@ spec: imagePullPolicy: "{{ .Values.imagePullPolicy }}" resources: {{ toYaml .Values.resources | indent 6 }} + args: + {{- if hasKey .Values.kafka "bootstrapServers" }} + - --bootstrap-servers + - {{ .Values.kafka.bootstrapServers | quote }} + {{- end }} + {{- if hasKey .Values.kafka "schemaRegistryUrl" }} + - --schema-registry-url + - {{ .Values.kafka.schemaRegistryUrl | quote }} + {{- end }} + {{- if hasKey .Values.kafka "outputTopic" }} + - --output-topic + - {{ .Values.kafka.outputTopic | quote }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledOutputTopics }} + - --labeled-output-topics + - {{ $key }}={{ $value }} + {{- end }} + {{- range $key, $value := .Values.commandLine }} + - {{ $key | quote }} + - {{ $value | quote }} + {{- end }} + {{- range .Values.commandLineList }} + - {{ . | quote }} + {{- end }} env: - name: ENV_PREFIX value: {{ .Values.configurationEnvPrefix }}_ @@ -48,22 +72,6 @@ spec: - name: {{ printf "KAFKA_%s" $key | replace "." "_" | upper | quote }} value: {{ $value | quote }} {{- end }} - {{- if hasKey .Values.kafka "bootstrapServers" }} - - name: "{{ .Values.configurationEnvPrefix }}_BOOTSTRAP_SERVERS" - value: {{ .Values.kafka.bootstrapServers | quote }} - {{- end }} - {{- if hasKey .Values.kafka "schemaRegistryUrl" }} - - name: "{{ .Values.configurationEnvPrefix }}_SCHEMA_REGISTRY_URL" - value: {{ .Values.kafka.schemaRegistryUrl | quote }} - {{- end }} - {{- if hasKey .Values.kafka "outputTopic" }} - - name: "{{ .Values.configurationEnvPrefix }}_OUTPUT_TOPIC" - value: {{ .Values.kafka.outputTopic | quote }} - {{- end }} - {{- if and (hasKey .Values.kafka "labeledOutputTopics") (.Values.kafka.labeledOutputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_OUTPUT_TOPICS" - value: "{{- range $key, $value := .Values.kafka.labeledOutputTopics }}{{ $key }}={{ $value }},{{- end }}" - {{- end }} {{- range $key, $value := .Values.secrets }} - name: "{{ $key }}" valueFrom: @@ -78,10 +86,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 }} diff --git a/charts/producer-app/values.yaml b/charts/producer-app/values.yaml index ba8db2432..983ed0a45 100644 --- a/charts/producer-app/values.yaml +++ b/charts/producer-app/values.yaml @@ -61,7 +61,10 @@ kafka: # label: output commandLine: {} -# MY_CLI_PARAM: "foo-bar" +# --my-cli-param: "foo-bar" +commandLineList: [] +# - --my-cli-param +# - foo-bar env: {} # MY_ENV_VARIABLE: foo-bar diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index 485841dbb..1278b1c3a 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -48,11 +48,58 @@ spec: resources: {{ toYaml .Values.resources | indent 12 }} args: - {{- if .Values.kafka.deleteOutput }} + {{- if hasKey .Values.kafka "bootstrapServers" }} + - --bootstrap-servers + - {{ .Values.kafka.bootstrapServers | quote }} + {{- end }} + {{- if hasKey .Values.kafka "schemaRegistryUrl" }} + - --schema-registry-url + - {{ .Values.kafka.schemaRegistryUrl | quote }} + {{- end }} + {{- range .Values.kafka.inputTopics }} + - --input-topics + - {{ . | quote }} + {{- end }} + {{- if hasKey .Values.kafka "inputPattern" }} + - --input-pattern + - {{ .Values.kafka.inputPattern | quote }} + {{- end }} + {{- if hasKey .Values.kafka "outputTopic" }} + - --output-topic + - {{ .Values.kafka.outputTopic | quote }} + {{- end }} + {{- if hasKey .Values.kafka "errorTopic" }} + - --error-topic + - {{ .Values.kafka.errorTopic | quote }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledOutputTopics }} + - --labeled-output-topics + - {{ $key }}={{ $value }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledInputTopics }} + - --labeled-input-topics + - {{ $key }}={{ $value | join ";" }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledInputPatterns }} + - --labeled-input-patterns + - {{ $key }}={{ $value }} + {{- end }} + {{- if hasKey .Values.kafka "applicationId" }} + - --application-id + - {{ .Values.kafka.applicationId | quote }} + {{- end }} + {{- range $key, $value := .Values.commandLine }} + - {{ $key | quote }} + - {{ $value | quote }} + {{- end }} + {{- range .Values.commandLineList }} + - {{ . | quote }} + {{- end }} + {{- if .Values.kafka.deleteOutput }} - clean - {{- else }} + {{- else }} - reset - {{- end }} + {{- end }} env: - name: ENV_PREFIX value: {{ .Values.configurationEnvPrefix }}_ @@ -60,47 +107,6 @@ spec: - name: {{ printf "KAFKA_%s" $key | replace "." "_" | upper | quote }} value: {{ $value | quote }} {{- end }} - {{- if hasKey .Values.kafka "bootstrapServers" }} - - name: "{{ .Values.configurationEnvPrefix }}_BOOTSTRAP_SERVERS" - value: {{ .Values.kafka.bootstrapServers | quote }} - {{- end }} - {{- if hasKey .Values.kafka "schemaRegistryUrl" }} - - name: "{{ .Values.configurationEnvPrefix }}_SCHEMA_REGISTRY_URL" - value: {{ .Values.kafka.schemaRegistryUrl | quote }} - {{- end }} - {{- if and (hasKey .Values.kafka "inputTopics") (.Values.kafka.inputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_INPUT_TOPICS" - value: {{ .Values.kafka.inputTopics | join "," | quote }} - {{- end }} - {{- if hasKey .Values.kafka "inputPattern" }} - - name: "{{ .Values.configurationEnvPrefix }}_INPUT_PATTERN" - value: {{ .Values.kafka.inputPattern | join "," | quote }} - {{- end }} - {{- if hasKey .Values.kafka "outputTopic" }} - - name: "{{ .Values.configurationEnvPrefix }}_OUTPUT_TOPIC" - value: {{ .Values.kafka.outputTopic | quote }} - {{- end }} - {{- if hasKey .Values.kafka "errorTopic" }} - - name: "{{ .Values.configurationEnvPrefix }}_ERROR_TOPIC" - value: {{ .Values.kafka.errorTopic | quote }} - {{- end }} - {{- if and (hasKey .Values.kafka "labeledOutputTopics") (.Values.kafka.labeledOutputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_OUTPUT_TOPICS" - value: "{{- range $key, $value := .Values.kafka.labeledOutputTopics }}{{ $key }}={{ $value }},{{- end }}" - {{- end }} - {{- $delimiter := ";" }} - {{- if and (hasKey .Values.kafka "labeledInputTopics") (.Values.kafka.labeledInputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_INPUT_TOPICS" - value: "{{- range $key, $value := .Values.kafka.labeledInputTopics }}{{ $key }}={{ $value | join $delimiter }},{{- end }}" - {{- end }} - {{- if and (hasKey .Values.kafka "labeledInputPatterns") (.Values.kafka.labeledInputPatterns) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_INPUT_PATTERNS" - value: "{{- range $key, $value := .Values.kafka.labeledInputPatterns }}{{ $key }}={{ $value }},{{- end }}" - {{- end }} - {{- if hasKey .Values.kafka "applicationId" }} - - name: "{{ .Values.configurationEnvPrefix }}_APPLICATION_ID" - value: {{ .Values.kafka.applicationId | quote }} - {{- end }} {{- range $key, $value := .Values.secrets }} - name: "{{ $key }}" valueFrom: @@ -115,10 +121,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 }} diff --git a/charts/streams-app-cleanup-job/values.yaml b/charts/streams-app-cleanup-job/values.yaml index 7e4b87a59..64a4926fc 100644 --- a/charts/streams-app-cleanup-job/values.yaml +++ b/charts/streams-app-cleanup-job/values.yaml @@ -40,7 +40,10 @@ kafka: deleteOutput: false commandLine: {} -# MY_CLI_PARAM: "foo-bar" +# --my-cli-param: "foo-bar" +commandLineList: [] +# - --my-cli-param +# - foo-bar env: {} # MY_ENV_VARIABLE: foo-bar diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index ef11d478c..02c034066 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -76,6 +76,57 @@ spec: imagePullPolicy: "{{ .Values.imagePullPolicy }}" resources: {{ toYaml .Values.resources | indent 12 }} + args: + {{- if not .Values.statefulSet }} + - --volatile-group-instance-id + {{- end }} + {{- if hasKey .Values.kafka "bootstrapServers" }} + - --bootstrap-servers + - {{ .Values.kafka.bootstrapServers | quote }} + {{- end }} + {{- if hasKey .Values.kafka "schemaRegistryUrl" }} + - --schema-registry-url + - {{ .Values.kafka.schemaRegistryUrl | quote }} + {{- end }} + {{- range .Values.kafka.inputTopics }} + - --input-topics + - {{ . | quote }} + {{- end }} + {{- if hasKey .Values.kafka "inputPattern" }} + - --input-pattern + - {{ .Values.kafka.inputPattern | quote }} + {{- end }} + {{- if hasKey .Values.kafka "outputTopic" }} + - --output-topic + - {{ .Values.kafka.outputTopic | quote }} + {{- end }} + {{- if hasKey .Values.kafka "errorTopic" }} + - --error-topic + - {{ .Values.kafka.errorTopic | quote }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledOutputTopics }} + - --labeled-output-topics + - {{ $key }}={{ $value }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledInputTopics }} + - --labeled-input-topics + - {{ $key }}={{ $value | join ";" }} + {{- end }} + {{- range $key, $value := .Values.kafka.labeledInputPatterns }} + - --labeled-input-patterns + - {{ $key }}={{ $value }} + {{- end }} + {{- if hasKey .Values.kafka "applicationId" }} + - --application-id + - {{ .Values.kafka.applicationId | quote }} + {{- end }} + {{- range $key, $value := .Values.commandLine }} + - {{ $key | quote }} + - {{ $value | quote }} + {{- end }} + {{- range .Values.commandLineList }} + - {{ . | quote }} + {{- end }} env: - name: ENV_PREFIX value: {{ .Values.configurationEnvPrefix }}_ @@ -99,51 +150,6 @@ spec: fieldRef: fieldPath: metadata.name {{- end }} - {{- if not .Values.statefulSet }} - - name: "{{ .Values.configurationEnvPrefix }}_VOLATILE_GROUP_INSTANCE_ID" - value: "true" - {{- end }} - {{- if hasKey .Values.kafka "bootstrapServers" }} - - name: "{{ .Values.configurationEnvPrefix }}_BOOTSTRAP_SERVERS" - value: {{ .Values.kafka.bootstrapServers | quote }} - {{- end }} - {{- if hasKey .Values.kafka "schemaRegistryUrl" }} - - name: "{{ .Values.configurationEnvPrefix }}_SCHEMA_REGISTRY_URL" - value: {{ .Values.kafka.schemaRegistryUrl | quote }} - {{- end }} - {{- if and (hasKey .Values.kafka "inputTopics") (.Values.kafka.inputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_INPUT_TOPICS" - value: {{ .Values.kafka.inputTopics | join "," | quote }} - {{- end }} - {{- if hasKey .Values.kafka "inputPattern" }} - - name: "{{ .Values.configurationEnvPrefix }}_INPUT_PATTERN" - value: {{ .Values.kafka.inputPattern | quote }} - {{- end }} - {{- if hasKey .Values.kafka "outputTopic" }} - - name: "{{ .Values.configurationEnvPrefix }}_OUTPUT_TOPIC" - value: {{ .Values.kafka.outputTopic | quote }} - {{- end }} - {{- if hasKey .Values.kafka "errorTopic" }} - - name: "{{ .Values.configurationEnvPrefix }}_ERROR_TOPIC" - value: {{ .Values.kafka.errorTopic | quote }} - {{- end }} - {{- if and (hasKey .Values.kafka "labeledOutputTopics") (.Values.kafka.labeledOutputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_OUTPUT_TOPICS" - value: "{{- range $key, $value := .Values.kafka.labeledOutputTopics }}{{ $key }}={{ $value }},{{- end }}" - {{- end }} - {{- $delimiter := ";" }} - {{- if and (hasKey .Values.kafka "labeledInputTopics") (.Values.kafka.labeledInputTopics) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_INPUT_TOPICS" - value: "{{- range $key, $value := .Values.kafka.labeledInputTopics }}{{ $key }}={{ $value | join $delimiter }},{{- end }}" - {{- end }} - {{- if and (hasKey .Values.kafka "labeledInputPatterns") (.Values.kafka.labeledInputPatterns) }} - - name: "{{ .Values.configurationEnvPrefix }}_LABELED_INPUT_PATTERNS" - value: "{{- range $key, $value := .Values.kafka.labeledInputPatterns }}{{ $key }}={{ $value }},{{- end }}" - {{- end }} - {{- if hasKey .Values.kafka "applicationId" }} - - name: "{{ .Values.configurationEnvPrefix }}_APPLICATION_ID" - value: {{ .Values.kafka.applicationId | quote }} - {{- end }} {{- range $key, $value := .Values.secrets }} - name: "{{ $key }}" valueFrom: @@ -158,10 +164,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 }} diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index 5d2b6f5f7..2bbd6d106 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -49,7 +49,10 @@ kafka: # applicationId: foo commandLine: {} -# MY_CLI_PARAM: "foo-bar" +# --my-cli-param: "foo-bar" +commandLineList: [] +# - --my-cli-param +# - foo-bar env: {} # MY_ENV_VARIABLE: foo-bar