Merge pull request #486 from 3dwardch3ng/infra/postgresql

Infra/postgresql
This commit is contained in:
2024-07-15 09:54:10 +10:00
committed by GitHub
5 changed files with 3670 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
curl -LO https://github.com/getsops/sops/releases/download/v3.8.1/sops-v3.8.1.linux.arm64 &&
sudo mv sops-v3.8.1.linux.arm64 /usr/local/bin/sops &&
chmod +x /usr/local/bin/sops
sudo apt install age -y

7
scripts/4.add-age-key.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
cat /mnt/nfs/agekey/age.agekey |
kubectl create secret generic sops-age \
--namespace=argocd \
--from-file=age.agekey=/dev/stdin

File diff suppressed because it is too large Load Diff

View File

@@ -63,6 +63,13 @@ repoServer:
requests:
cpu: 20m
memory: 128Mi
rbac:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
applicationSet:
replicas: 2

View File

@@ -0,0 +1,12 @@
#!/usr/bin/bash
set -e
filePath=$1
AGE_PUB_KEY="age1d47q8mlty404pxx378q49hr93aqexca4mkeqtdm00w4gjd09xd0qhxcdcz"
sops --age=$AGE_PUB_KEY --encrypt --encrypted-regex '^(data|stringData)$' --in-place $filePath
echo "File encrypted: $filePath."
git add $filePath
git commit -am "Encrypt file $filePath by Age."