|
1 | | -suite: monitoring-application waits for the Keycloak operator that owns the OIDC CRDs |
| 1 | +suite: monitoring-application variant ordering edges (default + oidc) |
2 | 2 | # Regression guard for a fresh-install ordering race introduced by the Phase-1 |
3 | | -# OIDC selector (cozystack/cozystack#3176). Without the keycloak-operator edge, |
4 | | -# the monitoring chart can reconcile before the v1.edp.epam.com CRDs are |
5 | | -# registered on cold install — the `.Capabilities.APIVersions.Has` guard in |
6 | | -# templates/grafana/oidc-keycloak.yaml silently drops the whole Keycloak side |
7 | | -# of System mode (KeycloakClient / KeycloakClientScope / KeycloakRealmGroups), |
8 | | -# Grafana boots with an auth.generic_oauth block pointing at a client that was |
9 | | -# never provisioned, and OIDC login fails at request time with no build-time |
10 | | -# signal. |
| 3 | +# OIDC selector (cozystack/cozystack#3176). The `oidc` variant additionally |
| 4 | +# depends on cozystack.keycloak-operator so the v1.edp.epam.com CRDs are |
| 5 | +# registered before the monitoring chart reconciles — without this edge the |
| 6 | +# `.Capabilities.APIVersions.Has` guard in |
| 7 | +# templates/grafana/oidc-keycloak.yaml would silently drop the whole |
| 8 | +# Keycloak side of mode: System and Grafana's auth.generic_oauth block would |
| 9 | +# point at a client that never gets provisioned. The `default` variant MUST |
| 10 | +# NOT depend on keycloak-operator — that Package is only emitted when |
| 11 | +# authentication.oidc.enabled is true, so a hard dep on the default variant |
| 12 | +# would leave every OIDC-off cluster stuck on DependenciesNotReady forever. |
11 | 13 | templates: |
12 | 14 | - templates/sources.yaml |
13 | 15 | release: |
14 | 16 | name: cozystack |
15 | 17 | namespace: cozy-system |
16 | 18 | tests: |
17 | | - - it: monitoring-application dependsOn keycloak-operator (OIDC CRDs) |
| 19 | + - it: default variant carries the baseline reconciliation edges without keycloak-operator |
18 | 20 | documentSelector: |
19 | 21 | path: metadata.name |
20 | 22 | value: cozystack.monitoring-application |
21 | 23 | asserts: |
22 | 24 | - contains: |
23 | 25 | path: spec.variants[0].dependsOn |
24 | | - content: cozystack.keycloak-operator |
25 | | - # The other deps we rely on transitively for the Grafana instance to |
26 | | - # even come up on a fresh cluster; regression-guard them together so |
27 | | - # a future edit does not accidentally drop the ordering edges. |
| 26 | + content: cozystack.networking |
28 | 27 | - contains: |
29 | 28 | path: spec.variants[0].dependsOn |
30 | | - content: cozystack.networking |
| 29 | + content: cozystack.postgres-operator |
31 | 30 | - contains: |
32 | 31 | path: spec.variants[0].dependsOn |
33 | 32 | content: cozystack.grafana-operator |
34 | 33 | - contains: |
35 | 34 | path: spec.variants[0].dependsOn |
36 | | - content: cozystack.postgres-operator |
| 35 | + content: cozystack.victoria-metrics-operator |
37 | 36 | - contains: |
38 | 37 | path: spec.variants[0].dependsOn |
| 38 | + content: cozystack.cozystack-engine |
| 39 | + - notContains: |
| 40 | + path: spec.variants[0].dependsOn |
| 41 | + content: cozystack.keycloak-operator |
| 42 | + |
| 43 | + - it: oidc variant additionally waits for keycloak-operator (OIDC CRDs) |
| 44 | + documentSelector: |
| 45 | + path: metadata.name |
| 46 | + value: cozystack.monitoring-application |
| 47 | + asserts: |
| 48 | + - equal: |
| 49 | + path: spec.variants[1].name |
| 50 | + value: oidc |
| 51 | + - contains: |
| 52 | + path: spec.variants[1].dependsOn |
| 53 | + content: cozystack.keycloak-operator |
| 54 | + # oidc variant inherits the baseline edges (regression guard against |
| 55 | + # someone dropping one when refactoring the variant). |
| 56 | + - contains: |
| 57 | + path: spec.variants[1].dependsOn |
| 58 | + content: cozystack.networking |
| 59 | + - contains: |
| 60 | + path: spec.variants[1].dependsOn |
| 61 | + content: cozystack.grafana-operator |
| 62 | + - contains: |
| 63 | + path: spec.variants[1].dependsOn |
| 64 | + content: cozystack.postgres-operator |
| 65 | + - contains: |
| 66 | + path: spec.variants[1].dependsOn |
39 | 67 | content: cozystack.victoria-metrics-operator |
| 68 | + - contains: |
| 69 | + path: spec.variants[1].dependsOn |
| 70 | + content: cozystack.cozystack-engine |
0 commit comments