age-keygen -o age.agekey
# .sops.yaml
creation_rules:
- path_regex: .*.ya?ml
encrypted_regex: ^(data|stringData)$
age: Paste it here!
cat age.agekey | kubectl create secret generic sops-age --namespace=flux-system --from-file=age.agekey=/dev/stdin
# secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: secret-name
namespace: namespace
type: Opaque
data:
KEY: BASE64_ENCODED_VALUE
# encrypt
sops -e -i secret.yaml
# decrypt
sops -i -d secret.yaml
# Gitlab
export GITLAB_TOKEN=glpat-oYyzJsbKDtZ_sAX73AxT
flux bootstrap gitlab \
--deploy-token-auth \
--owner=masterbpro \
--repository=iac \
--branch=main \
--path=./kubernetes/flux \
--components-extra=image-reflector-controller,image-automation-controller \
--version=latest \
--personal
# Github
flux bootstrap github \
--token-auth \
--owner=masterbpro \
--repository=iac \
--branch=main \
--path=./kubernetes/flux \
--components-extra=image-reflector-controller,image-automation-controller \
--version=latest \
--personal