Created
September 5, 2024 08:51
-
-
Save alces/a67090757398fd9d93d94ece11b925a0 to your computer and use it in GitHub Desktop.
Revisions
-
alces created this gist
Sep 5, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ for ns in $(kubectl get sts --all-namespaces | awk '{if ($2 == "zookeeper") {print $1}}'); do if [ $(kubectl get sts zookeeper -n $ns -o json | jq '.spec.template.spec.containers[1].image') != null ]; then kubectl patch sts zookeeper -n $ns \ -p '{"spec":{"template":{"spec": {"containers":[{"name": "jmx-exporter", "image":"bitnami/jmx-exporter:1.0.1"}]}}}}' fi done