-
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 #2 from swade1987/age
feat: migration to using age for encryption/decryption tool
- Loading branch information
Showing
24 changed files
with
114 additions
and
415 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea/ | ||
_test/ | ||
.DS_Store | ||
/secrets/age-key.txt |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,52 @@ | ||
# Deployment mechanism | ||
|
||
As you are probably aware we use the GitOps controller [Flux](https://github.com/fluxcd/flux2) to sync workloads into our clusters. This repository is no different in this regard. | ||
|
||
Flux has in-built support for [SOPs](https://github.com/getsops/sops) for more information see [here](https://toolkit.fluxcd.io/guides/mozilla-sops/). | ||
|
||
## Technical overview | ||
|
||
Create a secret with the age private key, the key name must end with .agekey to be detected as an age key: | ||
|
||
``` | ||
cat example/age-key.txt | | ||
kubectl create secret generic sops-age \ | ||
--namespace=flux-system \ | ||
--from-file=age.agekey=/dev/stdin | ||
``` | ||
|
||
Finally set the decryption secret in the Flux Kustomization to `sops-age`. | ||
|
||
``` | ||
apiVersion: source.toolkit.fluxcd.io/v1 | ||
kind: GitRepository | ||
metadata: | ||
name: k8s-secrets | ||
namespace: flux-repos | ||
spec: | ||
interval: 1m0s | ||
ref: | ||
branch: main | ||
secretRef: | ||
name: automator-ssh-keypair | ||
timeout: 60s | ||
url: ssh://[email protected]/swade1987/flux2-sops-template | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: k8s-secrets | ||
namespace: flux-repos | ||
spec: | ||
interval: 10m0s | ||
sourceRef: | ||
kind: GitRepository | ||
name: k8s-secrets | ||
prune: true | ||
# THIS IS THE IMPORTANT SECTION BELOW | ||
decryption: | ||
provider: sops | ||
secretRef: | ||
name: sops-age | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# created: 2025-01-23T14:25:38Z | ||
# public key: age1jt42rcckms34skz77t56wvtqxy56n9s0flttavg5qm240aghqg5svglwz9 | ||
AGE-SECRET-KEY-1V4WP4Z9AJN9XQ4NFPD9AYHSFEZ6DK736DPU70AK7MVSRMGYFE55QUFL9HC |
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
24 changes: 0 additions & 24 deletions
24
secrets/us-west-2-platform-engineering-prd/logging/logging-datadogagent.yaml
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
secrets/us-west-2-platform-engineering-prd/oidc/oidc-oauth2-proxy-github.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.