-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from projectsyn/permission-fix-ocp
Fix backup tmpfile permissions on OCP
- Loading branch information
Showing
4 changed files
with
137 additions
and
1 deletion.
There are no files selected for viewing
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
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
56 changes: 56 additions & 0 deletions
56
tests/golden/defaults/vault/vault/30_backup/31_schedule.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
apiVersion: v1 | ||
data: {} | ||
kind: Secret | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: foobar-backup-password | ||
name: foobar-backup-password | ||
stringData: | ||
password: t-silent-test-1234/c-green-test-1234/vault/vault/backup/password | ||
type: Opaque | ||
--- | ||
apiVersion: v1 | ||
data: {} | ||
kind: Secret | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: foobar-backup-s3-credentials | ||
name: foobar-backup-s3-credentials | ||
stringData: | ||
password: t-silent-test-1234/c-green-test-1234/vault/vault/backup/s3_secret_key | ||
username: t-silent-test-1234/c-green-test-1234/vault/vault/backup/s3_access_key | ||
type: Opaque | ||
--- | ||
apiVersion: k8up.io/v1 | ||
kind: Schedule | ||
metadata: | ||
name: foobar | ||
namespace: vault | ||
spec: | ||
backend: | ||
repoPasswordSecretRef: | ||
key: password | ||
name: foobar-backup-password | ||
s3: | ||
accessKeyIDSecretRef: | ||
key: username | ||
name: foobar-backup-s3-credentials | ||
bucket: vault-backup | ||
endpoint: null | ||
secretAccessKeySecretRef: | ||
key: password | ||
name: foobar-backup-s3-credentials | ||
backup: | ||
keepJobs: 5 | ||
promURL: null | ||
schedule: '*/13 * * * *' | ||
check: | ||
promURL: null | ||
schedule: 30 3 * * * | ||
prune: | ||
retention: | ||
keepDaily: 30 | ||
keepLast: 20 | ||
schedule: 23 * * * * |
63 changes: 63 additions & 0 deletions
63
tests/golden/defaults/vault/vault/30_backup/32_backup.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
apiVersion: v1 | ||
data: | ||
vault-agent-config.hcl: "exit_after_auth = false\nauto_auth {\n method \"kubernetes\"\ | ||
\ {\n config = {\n role = \"backup\"\n }\n }\n \ | ||
\ sink \"file\" {\n config = {\n path = \"/home/vault/.vault-token\"\ | ||
\n mode = 0644\n }\n }\n}\n" | ||
kind: ConfigMap | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: foobar-backup | ||
name: foobar-backup | ||
namespace: vault | ||
--- | ||
apiVersion: k8up.io/v1 | ||
kind: PreBackupPod | ||
metadata: | ||
name: foobar | ||
namespace: vault | ||
spec: | ||
backupCommand: vault operator raft snapshot save /dev/stdout | ||
fileExtension: .snapshot | ||
pod: | ||
spec: | ||
containers: | ||
- args: [] | ||
env: | ||
- name: HOME | ||
value: /home/vault | ||
- name: SKIP_SETCAP | ||
value: 'true' | ||
- name: VAULT_ADDR | ||
value: http://foobar-active:8200 | ||
image: docker.io/vault:1.7.3 | ||
imagePullPolicy: IfNotPresent | ||
name: backup | ||
ports: [] | ||
stdin: false | ||
tty: false | ||
volumeMounts: | ||
- mountPath: /etc/vault/ | ||
name: config | ||
- mountPath: /home/vault | ||
name: home | ||
imagePullSecrets: [] | ||
initContainers: [] | ||
serviceAccountName: foobar-backup | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
- configMap: | ||
name: foobar-backup | ||
name: config | ||
- emptyDir: {} | ||
name: home | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: foobar-backup | ||
name: foobar-backup | ||
namespace: vault |