Skip to content

Commit

Permalink
Merge pull request #18 from adfinis/fix/typo-in-cronjob-example
Browse files Browse the repository at this point in the history
fix(cronjob): directory typo & cronjob example fixes
  • Loading branch information
eyenx authored Jun 21, 2023
2 parents bdf314b + 64c315d commit 077cd59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions kubernetes/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ metadata:
app.kubernetes.io/version: v0.1.0
name: vault-snapshot
spec:
schedule: 0 4 * * *
jobTemplate:
schedule: 0 4 * * *
metadata:
labels:
app.kubernetes.io/name: vault-snapshot
Expand All @@ -20,6 +20,7 @@ spec:
app.kubernetes.io/name: vault-snapshot
app.kubernetes.io/version: v0.1.0
spec:
restartPolicy: never
automountServiceAccountToken: true
serviceAccountName: vault-raft-snapshot
containers:
Expand All @@ -45,7 +46,7 @@ spec:
secretKeyRef:
key: aws_access_key_id
name: vault-snapshot-credentials
image: ghcr.io/adfinis/vault-snapshot:0.1.-0
image: ghcr.io/adfinis/vault-snapshot:0.1.0
volumeMounts:
- name: snapshot-dir
mountPath: /vault-snaphots
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/vault-snapshot.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env sh

# authenticate using kubernetes auth
JWT=$(cat /var/run/secrets/kubernetes/io/serviceaccount/token)
JWT=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
export JWT
VAULT_TOKEN=$(vault write -field=token auth/kubernetes/login role="${VAULT_ROLE}" jwt="${JWT}")
export VAULT_TOKEN
Expand Down

0 comments on commit 077cd59

Please sign in to comment.