diff --git a/internal/controller/apiapp_controller.go b/internal/controller/apiapp_controller.go index bbabf21..836e35b 100644 --- a/internal/controller/apiapp_controller.go +++ b/internal/controller/apiapp_controller.go @@ -184,11 +184,11 @@ func (wr *wrappedAPIAppReconciler) reconcileApp(ctx context.Context, ztdClient * Name: wr.APIApp.ClientSecretName(), Namespace: wr.APIApp.Namespace, } - secretData := map[string][]byte{ "clientSecret": []byte(resp.GetApiConfiguration().ClientSecret), "appId": []byte(resp.ApplicationId), "clientId": []byte(resp.GetApiConfiguration().ClientId), + "projectId": []byte(projectRef.ID), } secret, err := wr.Builder.BuildSecret(builder.SecretOpts{Immutable: false, Key: key, Data: secretData}, wr.APIApp) if err != nil { diff --git a/internal/controller/oidcapp_controller.go b/internal/controller/oidcapp_controller.go index 4c011d2..b417c22 100644 --- a/internal/controller/oidcapp_controller.go +++ b/internal/controller/oidcapp_controller.go @@ -191,7 +191,9 @@ func (wr *wrappedOIDCAppReconciler) Reconcile(ctx context.Context, ztdClient *cl Namespace: wr.OIDCApp.Namespace, } - secretData := map[string][]byte{"clientSecret": []byte(resp.GetOidcConfiguration().ClientSecret), "appId": []byte(resp.ApplicationId), "clientId": []byte(resp.GetOidcConfiguration().ClientId)} + secretData := map[string][]byte{"clientSecret": []byte(resp.GetOidcConfiguration().ClientSecret), + "appId": []byte(resp.ApplicationId), "clientId": []byte(resp.GetOidcConfiguration().ClientId), + "projectId": []byte(projectRef.ID)} secret, err := wr.Builder.BuildSecret(builder.SecretOpts{Immutable: false, Key: key, Data: secretData}, wr.OIDCApp) if err != nil { return fmt.Errorf("error building Secret: %v", err)