oauth2-client: migrate apps to use oauth2-client helm chart (#90)
* headscale: use oauth2-client helm chart
* pihole: use oauth2-client helm chart
* matrix: use oauth2-client helm chart
* oauth2: pass issuer address to pihole, headscale and matrix apps
* pihole: fix secret name
* matrix: fix version to v1.98.0
* headscale: make oauth2-client depend on auth release
---------
Co-authored-by: Giorgi Lekveishvili <lekva@gl-mbp-m1-max.local>
diff --git a/charts/matrix/templates/config-to-merge.yaml b/charts/matrix/templates/config-to-merge.yaml
index c34a2c7..eefe3e3 100644
--- a/charts/matrix/templates/config-to-merge.yaml
+++ b/charts/matrix/templates/config-to-merge.yaml
@@ -33,7 +33,7 @@
- idp_id: pcloud
idp_name: "PCloud"
skip_verification: true
- issuer: {{ .Values.oauth2.hydraPublic }}
+ issuer: {{ .Values.oauth2.issuer }}
client_id: "{{`{{ .client_id }}`}}"
client_secret: "{{`{{ .client_secret }}`}}"
scopes: ["openid", "profile"]
diff --git a/charts/matrix/templates/oauth2-client.yaml b/charts/matrix/templates/oauth2-client.yaml
deleted file mode 100644
index ffe6936..0000000
--- a/charts/matrix/templates/oauth2-client.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-apiVersion: hydra.ory.sh/v1alpha1
-kind: OAuth2Client
-metadata:
- name: matrix
- namespace: {{ .Release.Namespace }}
- annotations:
- helm.sh/hook: pre-install
- helm.sh/hook-weight: "-10"
-spec:
- grantTypes:
- - authorization_code
- responseTypes:
- - code
- scope: "openid profile"
- secretName: {{ .Values.oauth2.secretName }}
- redirectUris:
- - https://{{ .Values.subdomain }}.{{ .Values.domain }}/_synapse/client/oidc/callback
- hydraAdmin:
- url: {{ .Values.oauth2.hydraAdmin }}
- port: 80
- endpoint: /admin/clients
- forwardedProto: https
diff --git a/charts/matrix/values.yaml b/charts/matrix/values.yaml
index 64d2e90..5d57ae0 100644
--- a/charts/matrix/values.yaml
+++ b/charts/matrix/values.yaml
@@ -5,8 +5,7 @@
domain: example.com
subdomain: matrix
oauth2:
- hydraAdmin: http://hydra-admin
- hydraPublic: https://hydra.example.com
+ issuer: https://oidc-issuer.example.com
secretName: oauth2-client
postgresql:
host: postgresql