Skip to content

Commit

Permalink
Merge pull request #213 from RafalKorepta/rk/move-empty-seed-starts-c…
Browse files Browse the repository at this point in the history
…luster

Move empty_seed_starts_cluster to configmap
  • Loading branch information
joejulian authored Dec 2, 2022
2 parents 8325bd5 + d28f660 commit 1d0ccee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/redpanda/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type: application
# The chart version and the app version are not the same and will not track
# together. The chart version is a semver representation of changes to this
# chart.
version: 2.3.10
version: 2.3.11
# The app version is the default version of Redpanda to install.
appVersion: v22.3.3
# kubeVersion must be suffixed with "-0" to be able to match cloud providers
Expand Down
3 changes: 3 additions & 0 deletions charts/redpanda/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ data:
{{- end }}
{{- end }}
redpanda:
{{- if (include "redpanda-atleast-22-3-0" . | fromJson).bool }}
empty_seed_starts_cluster: false
{{- end }}
{{- if not (include "redpanda-atleast-22-1-1" . | fromJson).bool }}
enable_sasl: {{ dig "sasl" "enabled" false .Values.auth }}
{{- if $users }}
Expand Down
8 changes: 3 additions & 5 deletions charts/redpanda/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@ spec:
{{- if (include "redpanda-atleast-22-1-1" . | fromJson).bool }}
cp /tmp/base-config/bootstrap.yaml /etc/redpanda/.bootstrap.yaml;
{{- end }}
{{- if (include "redpanda-atleast-22-3-0" . | fromJson).bool }}
rpk --config "$CONFIG" config set redpanda.empty_seed_starts_cluster false;
{{- else }}
{{- if not (include "redpanda-atleast-22-3-0" . | fromJson).bool }}
NODE_ID=${SERVICE_NAME##*-};
rpk --config "$CONFIG" config set redpanda.node_id $NODE_ID;
rpk --config "$CONFIG" redpanda config set redpanda.node_id $NODE_ID;
if [ "$NODE_ID" = "0" ]; then
rpk --config "$CONFIG" config set redpanda.seed_servers '[]' --format yaml;
rpk --config "$CONFIG" redpanda config set redpanda.seed_servers '[]' --format yaml;
fi;
{{- end }}
volumeMounts:
Expand Down

0 comments on commit 1d0ccee

Please sign in to comment.