wiki: update oidc patcher to psql
This commit is contained in:
@@ -32,7 +32,7 @@ spec:
|
||||
emptyDir: {}
|
||||
initContainers:
|
||||
- name: jq
|
||||
image: mirror.gcr.io/alpine/k8s:1.31.76@sha256:2a3fdd639c71c6cad69fbc8cac2467648855dac29961efec3b155466cc4fa730
|
||||
image: mirror.gcr.io/alpine/k8s:1.35.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
@@ -41,26 +41,26 @@ spec:
|
||||
- secretRef:
|
||||
name: oidc-client-wiki-owner-secrets
|
||||
command:
|
||||
- /bin/bash
|
||||
- /bin/sh
|
||||
- -c
|
||||
- jq '{"strategyKey":"oidc","config":{"clientId":$ENV.OIDC_CLIENT_ID,"clientSecret":$ENV.OIDC_CLIENT_SECRET,"authorizationURL":$ENV.OIDC_IDP_AUTH_URI,"tokenURL":$ENV.OIDC_IDP_TOKEN_URI,"userInfoURL":$ENV.OIDC_IDP_USERINFO_URI,"skipUserProfile":false,"issuer":$ENV.OIDC_IDP_URI,"emailClaim":"email","displayNameClaim":"name","mapGroups":true,"groupsClaim":"groups","logoutURL":$ENV.OIDC_IDP_URI,"acrValues":""}} | "UPDATE authentication SET config=\(.config|tostring|@sh) WHERE strategyKey=\(.strategyKey|tostring|@sh) LIMIT 1"' -n -r > /tmp/update.sql
|
||||
- jq '{"strategyKey":"oidc","config":{"clientId":$ENV.OIDC_CLIENT_ID,"clientSecret":$ENV.OIDC_CLIENT_SECRET,"authorizationURL":$ENV.OIDC_IDP_AUTH_URI,"tokenURL":$ENV.OIDC_IDP_TOKEN_URI,"userInfoURL":$ENV.OIDC_IDP_USERINFO_URI,"skipUserProfile":false,"issuer":$ENV.OIDC_IDP_URI,"emailClaim":"email","displayNameClaim":"name","mapGroups":true,"groupsClaim":"groups","logoutURL":$ENV.OIDC_IDP_URI,"acrValues":""}} | "UPDATE authentication SET config=\(.config|tostring|@sh) WHERE \"strategyKey\"=\(.strategyKey|tostring|@sh)"' -n -r > /tmp/update.sql
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mirror.gcr.io/library/mysql
|
||||
- name: psql
|
||||
image: mirror.gcr.io/alpine/psql
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
env:
|
||||
- name: MYSQL_PWD
|
||||
- name: PGPASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wikijs-secrets
|
||||
key: DB_PASS
|
||||
name: postgres-appuser-password
|
||||
key: password
|
||||
command:
|
||||
- /bin/bash
|
||||
- /bin/sh
|
||||
- -c
|
||||
- mysql -u wiki wiki -h mariadb -p${MYSQL_PWD} < /tmp/update.sql
|
||||
- psql -U kspace_wiki -d wiki -h postgres < /tmp/update.sql
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
|
||||
@@ -5,6 +5,5 @@ namespace: wiki
|
||||
|
||||
resources:
|
||||
- ./application.yaml
|
||||
- ./mariadb.yaml
|
||||
- ./postgres.yaml
|
||||
- ssh://git@git.k-space.ee/secretspace/kube/wiki
|
||||
- ./mariadb.yaml
|
||||
|
||||
Reference in New Issue
Block a user