comms(mas): patch admin secret via stringData
This commit is contained in:
parent
100a11e0de
commit
0f36576bac
@ -33,7 +33,7 @@ subjects:
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: mas-admin-client-secret-ensure-2
|
||||
name: mas-admin-client-secret-ensure-3
|
||||
namespace: comms
|
||||
spec:
|
||||
backoffLimit: 2
|
||||
@ -66,8 +66,8 @@ spec:
|
||||
if kubectl -n comms get secret mas-admin-client -o jsonpath='{.data.client_secret}' 2>/dev/null | grep -q .; then
|
||||
exit 0
|
||||
fi
|
||||
secret_b64="$(base64 /work/client_secret | tr -d '\n')"
|
||||
payload="$(printf '{"data":{"client_secret":"%s"}}' "${secret_b64}")"
|
||||
secret="$(cat /work/client_secret)"
|
||||
payload="$(printf '{"stringData":{"client_secret":"%s"}}' "${secret}")"
|
||||
kubectl -n comms patch secret mas-admin-client --type=merge -p "${payload}" >/dev/null
|
||||
volumeMounts:
|
||||
- name: work
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user