Skip to content

Commit

Permalink
fix: Improved handling of defaults for storage topics (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
robcoward authored Nov 26, 2024
1 parent 1c71981 commit adc999c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/kafka-connect/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.3
version: 0.1.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 4 additions & 2 deletions charts/kafka-connect/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ Create the name of the config topic to use
{{- $config := .config -}}
{{- $clustername := .clustername -}}
{{- $topic_prefix := (printf "%s-%s" $global.configTopicPrefix $clustername) -}}
{{- range $topic, $topic_config := $config.topics }}
{{ $topic }}.storage.replication.factor: {{ $topic_config.replicationFactor | default $global.replicationFactor }}
{{- $topic_configs := $config.topics | default $global.topics }}
{{- range $topic, $topic_defaults := $global.topics }}
{{- $topic_config := index $topic_configs $topic | default $topic_defaults }}
{{ $topic }}.storage.replication.factor: {{ $topic_config.replicationFactor | default $topic_defaults.replicationFactor }}
{{ $topic }}.storage.topic: {{ $topic_config.topic | default (printf "%s-%s" $topic_prefix $topic) }}
{{- end }}
{{- end }}
Expand Down
8 changes: 7 additions & 1 deletion charts/kafka-connect/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
global:
replicationFactor: 3
replicas: 1
configTopicPrefix: __connect-cluster
version: 3.8.0
Expand All @@ -10,6 +9,13 @@ global:
secretStore: aws-secretsmanager
secretStoreKind: ClusterSecretStore
refreshInterval: 1h
topics:
config:
replicationFactor: 3
offset:
replicationFactor: 3
status:
replicationFactor: 3

image: sionsmith/oso-strimzi-kafka-operator-iam-auth:0.38.0-kafka-3.6.0-aws-latest

Expand Down

0 comments on commit adc999c

Please sign in to comment.