Compare commits

..

No commits in common. "4a74606ec065d7a5ee75c16aa2df6f861b3e3da3" and "a62394970b0a95e03cf551cb0814e71e62b74e3e" have entirely different histories.

9 changed files with 38 additions and 39 deletions

View File

@ -7,6 +7,28 @@ configurations:
resources:
- ./resources/hydra-cnpg-cluster.yaml
secretGenerator:
- name: hydra-postgres-admin
type: Secret
literals:
- username=postgres
- password=NotSoSecret
- name: hydra-postgres-user
type: Secret
literals:
- username=hydra
- password=NotSoSecret
vars:
- name: HYDRA_DATABASE_SERVICE_NAME
objref:
name: hydra-postgres
kind: Cluster
apiVersion: postgresql.cnpg.io/v1
fieldref:
fieldpath: metadata.name
patches:
- target:
group: apps

View File

@ -4,7 +4,7 @@
name: HYDRA_DATABASE_USER
valueFrom:
secretKeyRef:
name: hydra-postgres-app
name: hydra-postgres-user
key: username
- op: add
path: "/spec/template/spec/containers/0/env/-"
@ -12,18 +12,10 @@
name: HYDRA_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: hydra-postgres-app
name: hydra-postgres-user
key: password
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: HYDRA_DATABASE_SERVICE_NAME
valueFrom:
secretKeyRef:
name: hydra-postgres-app
key: host
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: DSN
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME):5432/hydra?sslmode=disable&max_conns=$(HYDRA_DATABASE_MAX_CONN)"
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable"

View File

@ -4,7 +4,7 @@
name: HYDRA_DATABASE_USER
valueFrom:
secretKeyRef:
name: hydra-postgres-app
name: hydra-postgres-user
key: username
- op: add
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
@ -12,18 +12,10 @@
name: HYDRA_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: hydra-postgres-app
name: hydra-postgres-user
key: password
- op: add
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
value:
name: HYDRA_DATABASE_SERVICE_NAME
valueFrom:
secretKeyRef:
name: hydra-postgres-app
key: host
- op: add
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
value:
name: DSN
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME):5432/hydra?sslmode=disable"
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable"

View File

@ -4,7 +4,7 @@
name: HYDRA_DATABASE_USER
valueFrom:
secretKeyRef:
name: hydra-postgres-app
name: hydra-postgres-user
key: username
- op: add
path: "/spec/template/spec/containers/0/env/-"
@ -12,18 +12,10 @@
name: HYDRA_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: hydra-postgres-app
name: hydra-postgres-user
key: password
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: HYDRA_DATABASE_SERVICE_NAME
valueFrom:
secretKeyRef:
name: hydra-postgres-app
key: host
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: DSN
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME):5432/hydra?sslmode=disable"
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable"

View File

@ -5,9 +5,13 @@ metadata:
spec:
instances: 3
primaryUpdateStrategy: unsupervised
superuserSecret:
name: hydra-postgres-admin
bootstrap:
initdb:
database: hydra
owner: hydra
secret:
name: hydra-postgres-user
storage:
size: 2Gi
size: 2Gi

View File

@ -11,7 +11,6 @@ generatorOptions:
configMapGenerator:
- name: hydra-oidc-env
behavior: create
literals:
- APP_ENV=prod
- APP_DEBUG=false

View File

@ -11,7 +11,6 @@ generatorOptions:
configMapGenerator:
- name: hydra-sql-env
behavior: create
literals:
- ISSUER_URL="http://localhost:8000"
- BASE_URL='http://localhost:8080'

View File

@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: hydra-sql-fpm
image: reg.cadoles.com/cadoles/hydra-sql-base:2024.10.10-develop.1026.8e56433
image: reg.cadoles.com/cadoles/hydra-sql-base:2024.9.24-develop.1300.fe4d683
imagePullPolicy: Always
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
readinessProbe:
@ -66,7 +66,7 @@ spec:
mountPath: /etc/php81/conf.d/50_xdebug.ini
subPath: 50_xdebug.ini
- name: hydra-sql-caddy
image: reg.cadoles.com/cadoles/hydra-sql-base:2024.10.10-develop.1026.8e56433
image: reg.cadoles.com/cadoles/hydra-sql-base:2024.9.24-develop.1300.fe4d683
imagePullPolicy: Always
args: ["/usr/sbin/caddy", "run", "--adapter", "caddyfile", "--config", "/etc/caddy/Caddyfile"]
readinessProbe:

View File

@ -30,7 +30,6 @@ configMapGenerator:
- URLS_CONSENT=http://hydra-consent-app/consent
- URLS_LOGOUT=http://hydra-logout-app/logout
- HYDRA_SERVE_ALL_ARGS=--dev
- HYDRA_DATABASE_MAX_CONN="10"
- LOG_LEVEL=info
vars: