Dependency issue between Grafana client creation and keycloak-user-management

In the ci-values, we have roles, groups, users defined via the keycloak/user_management ((https://gitlab.com/sylva-projects/sylva-elements/ci-tooling/ci-deployment-values/-/blob/main/current/all-ci-deployments.yml?ref_type=heads#L108). Theses resources are processed and created via keycloak-user-management chart. We have one role that can causes issue :

      test-oidc-client-role:
        description: this is a test OIDC client role
        clientId: grafana <<<<<<<<<

This role references a clientId associated with a client created by grafana-init (https://gitlab.com/sylva-projects/sylva-core/-/blob/main/kustomize-units/grafana-init/grafana-client.yaml?ref_type=heads).

So currently keycloak-user-management need to depends_on grafana_init. Otherwise, as long as grafana-init is not executed, the healthcheck on the test-oidc-client-role resource will fail (same if monitoring is disabled).

It's also quite strange to have this reference in common/ci-values pointing to a resource that is created by a unit that may not be activated. Maybe the creation of this resource should be reconsidered. (Or the management/creation of this client could be managed via keycloak-user-management.)

(partially mentioned here :!8241 (comment 3461206134)

Edited by Remi Le Trocquer