Last active
February 14, 2022 22:12
-
-
Save brunoborges/9df576689b404aee70a8065210c77fb3 to your computer and use it in GitHub Desktop.
This file contains 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 characters
#!/bin/bash | |
set -x | |
function setenv-all-pods() { | |
echo | |
DEPLOYMENT_LIST=$(kubectl -n $1 get deployment -o jsonpath='{.items[*].metadata.name}') | |
echo "Set Log4J setting for all pods by overriding LOG4J_FORMAT_MSG_NO_LOOKUPS with true." | |
for deployment_name in $DEPLOYMENT_LIST; do | |
kubectl -n $1 set env deployment $deployment_name LOG4J_FORMAT_MSG_NO_LOOKUPS="true" | |
done | |
echo | |
} | |
setenv-all-pods ${NAMESPACE:-$1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment