From e182927fe445ab81e84b8995f51c435a9bad1835 Mon Sep 17 00:00:00 2001 From: Zeort Date: Fri, 27 Sep 2024 13:08:14 +0300 Subject: [PATCH] fix oidc resource --- config/rbac/role.yaml | 6 ++++++ controllers/cfapi_controller_rendered_resources.go | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 8ba0e15..967d20c 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -243,3 +243,9 @@ rules: - dockerregistries verbs: - "*" +- apiGroups: + - authentication.gardener.cloud + resources: + - "*" + verbs: + - "*" \ No newline at end of file diff --git a/controllers/cfapi_controller_rendered_resources.go b/controllers/cfapi_controller_rendered_resources.go index 317ec4d..f53970f 100644 --- a/controllers/cfapi_controller_rendered_resources.go +++ b/controllers/cfapi_controller_rendered_resources.go @@ -478,10 +478,14 @@ func (r *CFAPIReconciler) createOIDCConfig(ctx context.Context, cfAPI *v1alpha1. if r.crdExists(ctx, "OpenIDConnect") { logger.Info("OIDC CR exists, create CR") + var uaaUrl = cfAPI.Spec.UAA + if uaaUrl == "" { + uaaUrl = defaultUaaUrl + } vals := struct { UAA string }{ - UAA: cfAPI.Spec.UAA, + UAA: uaaUrl, } t1 := template.New("oidcUAA")