matejhasul opened a new pull request #166:
URL: https://github.com/apache/pulsar-helm-chart/pull/166


   ### Motivation
   
   Due to bug in kustomize 
https://github.com/kubernetes-sigs/kustomize/issues/4201 we cannot deploy 
pulsar helm chart via fluxcd which uses kustomize as post-renderer (as desribed 
in https://github.com/fluxcd/flux2/issues/1968). Pulsar cluster initialization 
fails, because jobs responsible for initialization is missing some arguments 
due extra newline:
   ```
   $ kubectl -n pulsar get job pulsar-pulsar-init -o yaml | grep 
initialize-cluster-metadata -B3 -A3
         - args:
           - |2
   
             bin/pulsar initialize-cluster-metadata \
   
               --cluster pulsar \
               --zookeeper pulsar-zookeeper:2181 \
   ```
   There are also other places where this bug is hit, but extra generated 
newline is not significant and does no break anything.
   
   ### Modifications
   
   Replace folding block with multiline string to workaround 
https://github.com/kubernetes-sigs/kustomize/issues/4201
   
   
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   1. Prepare kustomization file:
   ```
   cat <<EOT >./kustomization.yaml
   resources:
   - pulsar-init.yaml
   EOT
   ```
   2. Run helm to generate k8s manifests for pulsar init jobs:
   ```
   $ helm template . -s templates/pulsar-cluster-initialize.yaml --set 
initialize=true > pulsar-init.yaml
   ```
   3. Run kustomize:
   ```
   kustomize build . > pulsar-init-kustomized.yaml
   ```
   4. Check that there is no extra newline in arguments of pulsar cluster 
initialization job:
   ```
   $ grep initialize-cluster-metadata -B3 -A3 pulsar-init-kustomized.yaml
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to