forked from k-space/kube
wiki: update oidc patcher to psql
This commit is contained in:
@@ -32,7 +32,7 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: jq
|
- name: jq
|
||||||
image: mirror.gcr.io/alpine/k8s:1.31.76@sha256:2a3fdd639c71c6cad69fbc8cac2467648855dac29961efec3b155466cc4fa730
|
image: mirror.gcr.io/alpine/k8s:1.35.0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /tmp
|
- mountPath: /tmp
|
||||||
@@ -41,26 +41,26 @@ spec:
|
|||||||
- secretRef:
|
- secretRef:
|
||||||
name: oidc-client-wiki-owner-secrets
|
name: oidc-client-wiki-owner-secrets
|
||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/sh
|
||||||
- -c
|
- -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:
|
containers:
|
||||||
- name: mysql
|
- name: psql
|
||||||
image: mirror.gcr.io/library/mysql
|
image: mirror.gcr.io/alpine/psql
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /tmp
|
- mountPath: /tmp
|
||||||
name: tmp
|
name: tmp
|
||||||
env:
|
env:
|
||||||
- name: MYSQL_PWD
|
- name: PGPASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: wikijs-secrets
|
name: postgres-appuser-password
|
||||||
key: DB_PASS
|
key: password
|
||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/sh
|
||||||
- -c
|
- -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
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
|
|||||||
@@ -5,6 +5,5 @@ namespace: wiki
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
- ./application.yaml
|
- ./application.yaml
|
||||||
- ./mariadb.yaml
|
|
||||||
- ./postgres.yaml
|
- ./postgres.yaml
|
||||||
- ssh://git@git.k-space.ee/secretspace/kube/wiki
|
- ./mariadb.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user