mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-28 02:18:36 +00:00
[oidc] Check APIVersions before deploying
When enabling OIDC, the Tenant applications may try to deploy KeycloakRealmGroups before the Keycloak operator is live. This may lead to a race where neither HelmRelease is able to progress. This patch addresses this. ```release-note [oidc] Do not deploy KeycloakRealmGroup resources as part of the Tenant application if the v1.edp.epam.com API is not yet available. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
|
||||
{{- $oidcEnabled := index $cozyConfig.data "oidc-enabled" }}
|
||||
{{- if eq $oidcEnabled "true" }}
|
||||
{{- if .Capabilities.APIVersions.Has "v1.edp.epam.com/v1" }}
|
||||
apiVersion: v1.edp.epam.com/v1
|
||||
kind: KeycloakRealmGroup
|
||||
metadata:
|
||||
@@ -51,3 +52,4 @@ spec:
|
||||
name: keycloakrealm-cozy
|
||||
kind: ClusterKeycloakRealm
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user