Skip to content
Snippets Groups Projects
Commit 460314fd authored by Arie Peterson's avatar Arie Peterson
Browse files

Merge branch '1041-hydra-migration-error' into 'main'

Resolve "Hydra migration error"

Closes #1041

See merge request stackspin/stackspin!624
parents 2a47a629 39ae962a
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 ...@@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: stackspin namespace: stackspin
resources: resources:
- pvc.yaml - pvc-userbackend.yaml
- pvc-database.yaml
- release.yaml - release.yaml
- single-sign-on-values-configmap.yaml - single-sign-on-values-configmap.yaml
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: single-sign-on-database
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 1Gi
storageClassName: local-path
---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
...@@ -9,4 +10,4 @@ spec: ...@@ -9,4 +10,4 @@ spec:
resources: resources:
requests: requests:
storage: 1Gi storage: 1Gi
storageClassName: local-path storageClassName: local-path
\ No newline at end of file
...@@ -19,6 +19,7 @@ spec: ...@@ -19,6 +19,7 @@ spec:
install: install:
remediation: remediation:
retries: 3 retries: 3
timeout: 10m
valuesFrom: valuesFrom:
- kind: ConfigMap - kind: ConfigMap
name: stackspin-single-sign-on-values name: stackspin-single-sign-on-values
......
...@@ -39,6 +39,18 @@ data: ...@@ -39,6 +39,18 @@ data:
# Let the backup system include nextcloud database data. # Let the backup system include nextcloud database data.
backup.velero.io/backup-volumes: "database" backup.velero.io/backup-volumes: "database"
postgresql:
persistence:
existingClaim: single-sign-on-database
initdbScripts:
setup.sql: |
CREATE USER hydra WITH PASSWORD '${hydra_postgresql_password}';
CREATE USER kratos WITH PASSWORD '${kratos_postgresql_password}';
CREATE USER stackspin WITH PASSWORD '${dashboard_postgresql_password}';
CREATE DATABASE kratos WITH OWNER kratos;
CREATE DATABASE hydra WITH OWNER hydra;
CREATE DATABASE stackspin WITH OWNER stackspin;
hydra: hydra:
hydra: hydra:
config: config:
...@@ -50,7 +62,7 @@ data: ...@@ -50,7 +62,7 @@ data:
secrets: secrets:
system: system:
- "${hydra_system_secret}" - "${hydra_system_secret}"
dsn: "memory" dsn: "postgres://hydra:${hydra_postgresql_password}@single-sign-on-postgresql:5432/hydra"
ingress: ingress:
public: public:
enabled: true enabled: true
...@@ -69,6 +81,11 @@ data: ...@@ -69,6 +81,11 @@ data:
admin: admin:
enabled: false enabled: false
kratos:
kratos:
config:
dsn: "postgres://kratos:${kratos_postgresql_password}@single-sign-on-postgresql:5432/kratos"
oAuthClients: oAuthClients:
- clientName: *USER_PANEL - clientName: *USER_PANEL
clientSecret: "${userpanel_oauth_client_secret}" clientSecret: "${userpanel_oauth_client_secret}"
......
...@@ -14,4 +14,4 @@ spec: ...@@ -14,4 +14,4 @@ spec:
# For all available options, see: # For all available options, see:
# https://toolkit.fluxcd.io/components/source/api/#source.toolkit.fluxcd.io/v1beta1.GitRepositoryRef # https://toolkit.fluxcd.io/components/source/api/#source.toolkit.fluxcd.io/v1beta1.GitRepositoryRef
ref: ref:
tag: 0.4.1 tag: 0.4.2
...@@ -8,3 +8,6 @@ data: ...@@ -8,3 +8,6 @@ data:
userbackend_admin_password: "{{ 32 | generate_password | b64encode }}" userbackend_admin_password: "{{ 32 | generate_password | b64encode }}"
userbackend_postgres_password: "{{ 32 | generate_password | b64encode }}" userbackend_postgres_password: "{{ 32 | generate_password | b64encode }}"
hydra_system_secret: "{{ 32 | generate_password | b64encode }}" hydra_system_secret: "{{ 32 | generate_password | b64encode }}"
hydra_postgresql_password: "{{ 32 | generate_password | b64encode }}"
kratos_postgresql_password: "{{ 32 | generate_password | b64encode }}"
dashboard_postgresql_password: "{{ 32 | generate_password | b64encode }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment