Test new job
This commit is contained in:
parent
0010c610f7
commit
dfd631fa3c
@ -33,7 +33,8 @@ spec:
|
|||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
capabilities:
|
capabilities:
|
||||||
drop: ["ALL"]
|
drop:
|
||||||
|
- ALL
|
||||||
env:
|
env:
|
||||||
- name: VAULT_ADDR
|
- name: VAULT_ADDR
|
||||||
value: "http://vault.dev-tools.svc.cluster.local:8200"
|
value: "http://vault.dev-tools.svc.cluster.local:8200"
|
||||||
@ -42,7 +43,9 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: vault-admin-token
|
name: vault-admin-token
|
||||||
key: token
|
key: token
|
||||||
command: ["/bin/sh","-c"]
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
set -e
|
set -e
|
||||||
@ -58,12 +61,11 @@ spec:
|
|||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
||||||
# vault secrets enable -version=2 -path=cicd kv 2>/dev/null || true
|
|
||||||
|
|
||||||
cat >/tmp/policy.hcl <<'EOF'
|
cat >/tmp/policy.hcl <<'EOF'
|
||||||
path "cicd/metadata/*" { capabilities = ["list"] }
|
path "cicd/metadata/*" { capabilities = ["list"] }
|
||||||
path "cicd/data/*" { capabilities = ["read"] }
|
path "cicd/data/*" { capabilities = ["read"] }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
vault policy write eso-cicd-read /tmp/policy.hcl || true
|
vault policy write eso-cicd-read /tmp/policy.hcl || true
|
||||||
|
|
||||||
vault write auth/kubernetes/role/eso-cicd \
|
vault write auth/kubernetes/role/eso-cicd \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user