45 lines
840 B
Markdown
45 lines
840 B
Markdown
# fluxcd
|
|
|
|
## age / sops
|
|
|
|
**Create key:**
|
|
|
|
``` bash
|
|
AGE_FILE=age.agekey
|
|
age-keygen -o ${AGE_FILE}
|
|
```
|
|
|
|
**Create key and Import to kubernetes:**
|
|
|
|
``` bash
|
|
NAMESPACE=ns-name
|
|
AGE_FILE=deploy/flux/.env.d/age.agekey
|
|
SECRET_NAME=flux-sops-age
|
|
|
|
# creates age key
|
|
age-keygen -o ${AGE_FILE}
|
|
# imports to an namespace
|
|
cat ${AGE_FILE} |
|
|
kubectl create secret generic ${SECRET_NAME} \
|
|
--namespace=${NAMESPACE} \
|
|
--from-file=age.agekey=/dev/stdin
|
|
```
|
|
|
|
## kustomization prune
|
|
|
|
**Disable:**
|
|
|
|
``` bash
|
|
FLUX_RESOURCE_NAME="???"
|
|
FLUX_RESOURCE_NS="???"
|
|
kubectl patch helmrelease ${FLUX_RESOURCE_NAME} -n ${FLUX_RESOURCE_NS} --type merge -p '{"spec":{"prune":false}}'
|
|
```
|
|
|
|
**Enable:**
|
|
|
|
``` bash
|
|
FLUX_RESOURCE_NAME="???"
|
|
FLUX_RESOURCE_NS="???"
|
|
kubectl patch helmrelease ${FLUX_RESOURCE_NAME} -n ${FLUX_RESOURCE_NS} --type merge -p '{"spec":{"prune":true}}'
|
|
```
|