Switch to mittwald's secret generator

This commit is contained in:
Jim Nicholson 2021-10-29 23:09:29 -07:00
parent b79b125e4a
commit df19b7ca5c
3 changed files with 27 additions and 11 deletions

View File

@ -34,6 +34,11 @@
env: env:
- name: PGDATA - name: PGDATA
value: /var/lib/postgresql/data/pgdata value: /var/lib/postgresql/data/pgdata
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: gitea-secrets
key: pg_username
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -1,18 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: gitea namespace: gitea
secretGenerator: # secretGenerator:
- literals: # - literals:
- pg_password=some1pass5here9 # - pg_password=some1pass5here9
name: gitea-secrets # name: gitea-secrets
generatorOptions: # generatorOptions:
disableNameSuffixHash: true # disableNameSuffixHash: true
labels: # labels:
type: generated # type: generated
resources: resources:
- namespace.yaml - namespace.yaml
- secrets.yaml
- storage.yaml - storage.yaml
- configuration.yaml - configuration.yaml
- deployment.yaml # - deployment.yaml
- service.yaml # - service.yaml
- ingress.yaml # - ingress.yaml

10
secrets.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: gitea-secrets
namespace: gitea
annotations:
secret-generator.v1.mittwald.de/autogenerate: pg_password
data:
pg_username: cG9zdGdyZXM=