monitoring(grafana): swap python3 for jq in folder-ACL local-exec
CI image (ci/Dockerfile) is alpine + jq, no python3. The grafana_admin_only_folder_acl null_resource was parsing /api/folders with a python3 oneliner, which crashed every CI apply with "python3: command not found" and made every monitoring stack apply fail in CI (worked locally because the dev VM has python3). jq is already in the CI image and produces the same output.
This commit is contained in:
parent
016584651e
commit
acd9438e4f
1 changed files with 1 additions and 1 deletions
|
|
@ -196,7 +196,7 @@ resource "null_resource" "grafana_admin_only_folder_acl" {
|
|||
for i in $(seq 1 12); do
|
||||
FOLDER_UID=$(kubectl $KUBECONFIG_FLAG exec -n monitoring "$POD" -c grafana -- \
|
||||
curl -sf -u "admin:$ADMIN_PW" "http://localhost:3000/api/folders" \
|
||||
| python3 -c "import json,sys; folders=json.load(sys.stdin); print(next((f['uid'] for f in folders if f['title']==sys.argv[1]), ''))" "$FOLDER" || true)
|
||||
| jq -r --arg t "$FOLDER" 'first(.[] | select(.title == $t) | .uid) // ""' || true)
|
||||
if [ -n "$FOLDER_UID" ]; then break; fi
|
||||
sleep 5
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue