Skip to content

Commit

Permalink
fix configure and add KeycloakRealmGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
klinch0 committed Nov 25, 2024
1 parent 4f58d24 commit f02bbf0
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 13 deletions.
12 changes: 8 additions & 4 deletions packages/apps/tenant/templates/keycloakgroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,48 @@ apiVersion: v1.edp.epam.com/v1
kind: KeycloakRealmGroup
metadata:
name: {{ include "tenant.name" . }}-view
namespace: {{ include "tenant.name" . }}
spec:
name: {{ include "tenant.name" . }}-view
realmRef:
name: keycloakrealm-cozy
kind: KeycloakRealm
kind: ClusterKeycloakRealm

---

apiVersion: v1.edp.epam.com/v1
kind: KeycloakRealmGroup
metadata:
name: {{ include "tenant.name" . }}-use
namespace: {{ include "tenant.name" . }}
spec:
name: {{ include "tenant.name" . }}-use
realmRef:
name: keycloakrealm-cozy
kind: KeycloakRealm
kind: ClusterKeycloakRealm

---

apiVersion: v1.edp.epam.com/v1
kind: KeycloakRealmGroup
metadata:
name: {{ include "tenant.name" . }}-admin
namespace: {{ include "tenant.name" . }}
spec:
name: {{ include "tenant.name" . }}-admin
realmRef:
name: keycloakrealm-cozy
kind: KeycloakRealm
kind: ClusterKeycloakRealm

---

apiVersion: v1.edp.epam.com/v1
kind: KeycloakRealmGroup
metadata:
name: {{ include "tenant.name" . }}-super-admin
namespace: {{ include "tenant.name" . }}
spec:
name: {{ include "tenant.name" . }}-super-admin
realmRef:
name: keycloakrealm-cozy
kind: KeycloakRealm
kind: ClusterKeycloakRealm
7 changes: 7 additions & 0 deletions packages/core/platform/bundles/distro-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,10 @@ releases:
namespace: cozy-keycloak
optional: true
dependsOn: [keycloak]

- name: keycloak-configure
releaseName: keycloak-configure
chart: cozy-keycloak-configure
namespace: cozy-keycloak
optional: true
dependsOn: [keycloak-operator]
7 changes: 7 additions & 0 deletions packages/core/platform/bundles/distro-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,10 @@ releases:
namespace: cozy-keycloak
optional: true
dependsOn: [keycloak]

- name: keycloak-configure
releaseName: keycloak-configure
chart: cozy-keycloak-configure
namespace: cozy-keycloak
optional: true
dependsOn: [keycloak-operator]
6 changes: 6 additions & 0 deletions packages/core/platform/bundles/paas-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,9 @@ releases:
chart: cozy-keycloak-operator
namespace: cozy-keycloak
dependsOn: [keycloak]

- name: keycloak-configure
releaseName: keycloak-configure
chart: cozy-keycloak-configure
namespace: cozy-keycloak
dependsOn: [keycloak-operator]
6 changes: 6 additions & 0 deletions packages/core/platform/bundles/paas-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,9 @@ releases:
chart: cozy-keycloak-operator
namespace: cozy-keycloak
dependsOn: [keycloak]

- name: keycloak-configure
releaseName: keycloak-configure
chart: cozy-keycloak-configure
namespace: cozy-keycloak
dependsOn: [keycloak-operator]
3 changes: 3 additions & 0 deletions packages/system/keycloak-configure/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
name: cozy-keycloak-configure
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
{{- $apiServerAdress := index $cozyConfig.data "api-server-adress" }}
{{- $k8sClient := randAlphaNum 32 -}}

apiVersion: v1.edp.epam.com/v1
kind: Keycloak
apiVersion: v1.edp.epam.com/v1alpha1
kind: ClusterKeycloak
metadata:
name: keycloak-cozy
namespace: {{ .Release.Namespace }}
spec:
secret: keycloak-credentials
url: https://keycloak.{{ $host }}

---

apiVersion: v1.edp.epam.com/v1
kind: KeycloakRealm
apiVersion: v1.edp.epam.com/v1alpha1
kind: ClusterKeycloakRealm
metadata:
name: keycloakrealm-cozy
namespace: {{ .Release.Namespace }}
spec:
realmName: cozy
keycloakRef:
name: keycloak-cozy
kind: Keycloak
clusterKeycloakRef: keycloak-cozy

---

Expand All @@ -33,7 +33,7 @@ spec:
name: groups
realmRef:
name: keycloakrealm-cozy
kind: KeycloakRealm
kind: ClusterKeycloakRealm
description: "Group Membership"
protocol: openid-connect
protocolMappers:
Expand Down Expand Up @@ -68,7 +68,7 @@ spec:
enabled: true
realmRef:
name: keycloakrealm-cozy
kind: KeycloakRealm
kind: ClusterKeycloakRealm
secret: $k8s-client:client-secret-key
advancedProtocolMappers: true
authorizationServicesEnabled: true
Expand Down
2 changes: 2 additions & 0 deletions packages/system/keycloak-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
keycloak-operator:
clusterReconciliationEnabled: true

0 comments on commit f02bbf0

Please sign in to comment.