This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
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.
feat: Support for access tokens injected by the `Backup Maker Operato…
…r` just before the build starts / riotkit-org/backup-repository#299
- Loading branch information
B&R
committed
Nov 1, 2023
1 parent
f93a966
commit 7d35921
Showing
12 changed files
with
126 additions
and
12 deletions.
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
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
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
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
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
34 changes: 34 additions & 0 deletions
34
pkg/generate/test_data/examples/postgres-with-operator-generated-jwt.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,34 @@ | ||
# System-specific variables, in this case specific to PostgreSQL | ||
# ${...} and $(...) syntax will be evaluated in target environment e.g. Kubernetes POD | ||
Params: | ||
hostname: postgres.db.svc.cluster.local | ||
port: 5432 | ||
db: rkc-test | ||
user: riotkit | ||
password: "${DB_PASSWORD}" # injects a shell-syntax, put your password in a `kind: Secret` and mount as environment variable. You can also use $(cat /mnt/secret) syntax, be aware of newlines! | ||
|
||
# Generic repository access details. Everything here will land AS IS into the bash script. | ||
# This means that any ${...} and $(...) will be executed in target environment e.g. inside Kubernetes POD | ||
Repository: | ||
url: "https://example.org" | ||
token: "${BR_TOKEN}" | ||
encryptionKeyPath: "/var/lib/backup-repository/encryption.key" | ||
passphrase: "${GPG_PASSPHRASE}" | ||
recipient: "[email protected]" | ||
collectionId: "111-222-333-444" | ||
|
||
# Generic values for Helm used to generate jobs/pods. Those values will overwrite others. | ||
# Notice: Environment variables with '${...}' and '$(...)' will be evaluated in LOCAL SHELL DURING BUILD | ||
HelmValues: | ||
name: "hello-world" | ||
operator: | ||
dynamicToken: "true" | ||
scheduledBackupName: "db-1" | ||
env: | ||
# if specified, then will be added to `kind: Secret` and injected into POD as environment | ||
# the value from ${GPG_PASSPHRASE} will be retrieved from the SHELL DURING THE BUILD | ||
GPG_PASSPHRASE: "${GPG_PASSPHRASE}" | ||
|
||
# most secure way for Kubernetes is to not provide secrets there, but define them as environment variables | ||
# inside SealedSecrets - all encryptedData keys will be accessible as environment variables inside container | ||
|
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 |
---|---|---|
@@ -1,18 +1,25 @@ | ||
bmg_test_postgres_backup: | ||
${BM_BIN_PATH} procedure backup \ | ||
--definition=generate/test_data/examples/postgres.yaml \ | ||
--template postgres | ||
--definition=pkg/generate/test_data/examples/postgres.yaml \ | ||
--template pg15 | ||
|
||
bmg_test_postgres_backup_k8s: | ||
${BM_BIN_PATH} procedure backup \ | ||
--definition=generate/test_data/examples/postgres.yaml \ | ||
--template postgres \ | ||
--definition=pkg/generate/test_data/examples/postgres.yaml \ | ||
--template pg15 \ | ||
--kubernetes \ | ||
--gpg-key-path generate/test_data/examples/gpg.key | ||
--gpg-key-path pkg/generate/test_data/examples/gpg.key | ||
|
||
bmg_test_postgres_backup_dynamic_jwt_k8s: | ||
${BM_BIN_PATH} procedure backup \ | ||
--definition=pkg/generate/test_data/examples/postgres-with-operator-generated-jwt.yaml \ | ||
--template pg15 \ | ||
--kubernetes \ | ||
--gpg-key-path pkg/generate/test_data/examples/gpg.key | ||
|
||
bmg_test_postgres_backup_k8s_sealed_secret: | ||
${BM_BIN_PATH} procedure backup \ | ||
--definition=generate/test_data/examples/postgres.yaml \ | ||
--template postgres \ | ||
--definition=pkg/generate/test_data/examples/postgres.yaml \ | ||
--template pg15 \ | ||
--kubernetes \ | ||
--gpg-key-path generate/test_data/examples/valid-sealed-secret.yaml | ||
--gpg-key-path pkg/generate/test_data/examples/valid-sealed-secret.yaml |