Skip to content

Fix zookeeper annotations#348

Merged
lhotari merged 1 commit intoapache:masterfrom
mouchar:zk-sts-fix
Jul 11, 2023
Merged

Fix zookeeper annotations#348
lhotari merged 1 commit intoapache:masterfrom
mouchar:zk-sts-fix

Conversation

@mouchar
Copy link
Contributor

@mouchar mouchar commented Feb 26, 2023

Fixed the case when no ZK annotations are set and zookeeper.restartPodsOnConfigMapChange: true helm can not render template

Motivation

When you don't set any annotations to Zookeeper (they are empty by default) AND if you set

zookeeper:
  restartPodsOnConfigMapChange: true

in your values.yaml file, the manifest can not be rendered. This commit fixes this condition and also unifies the
the way how the custom annotations are added, with bookkeeper statefulset template.

helm template pulsar apache/pulsar --version 3.0.0 --set zookeeper.restartPodsOnConfigMapChange=true  
Error: YAML parse error on pulsar/templates/zookeeper-statefulset.yaml: error converting YAML to JSON: yaml: line 52: did not find expected key

Use --debug flag to render out invalid YAML

Modifications

wrapping toYaml filter (that can return empty object {}) into with context.

Verifying this change

  • Make sure that the change passes the CI checks.

Fixed the case when no ZK annotations are set and `zookeeper.restartPodsOnConfigMapChange: true`
helm can not render template
@mouchar
Copy link
Contributor Author

mouchar commented Mar 6, 2023

ping - any feedback?
Sorry, but I don't know how to "Make sure that the change passes the CI checks." when the Kind cluster doesn't start at all.

@lhotari lhotari merged commit 7145033 into apache:master Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants