Move flux-webui OIDC ExternalSecret into flux-webui-init
What does this MR do and why?
Fix a race where flux-webui-init can time out waiting for Secret/flux-system/oidc-auth.
oidc-auth is created by the eso-flux-webui-oidc ExternalSecret. That ExternalSecret reads flux-webui-crossplane-client-secret, which is written by the Crossplane Client/flux-webui-client created in flux-webui-init. But the ExternalSecret was deployed by keycloak-oidc-external-secrets, a unit that runs before flux-webui-init. So it was created before the secret it reads existed, and its syncs fail until the Crossplane client secret appears. ESO retries, but nothing orders the ExternalSecret after its source, so when oidc-auth isn't produced within the unit timeout (5m), flux-webui-init fails with:
Unit timeout exceeded: unit Kustomization/flux-webui-init did not become ready after 5m0s
... timeout waiting for: [Secret/flux-system/oidc-auth status: 'NotFound']The health check can't simply go back into keycloak-oidc-external-secrets (it was moved out in 9071dd94): that unit would wait on a secret produced by a unit that depends on it, which is a deadlock.
This MR follows the pattern already used by vault-oidc-init and harbor-init/components/oidc: the Crossplane Client and the ExternalSecret that consumes its connection secret live in the same unit.
Changes:
- move
eso-flux-webui-oidc.yamlfromkeycloak-oidc-external-secrets/components/flux-webui-oidc/intokustomize-units/flux-webui-init/and drop the now-empty component keycloak-oidc-external-secrets: remove theflux-webui-oidccomponent and the unusedFLUX_WEBUI_DNSsubstituteflux-webui-init:- replace
depends_on: keycloak-oidc-external-secretswitheso-secret-stores(provides theeso-store-k8s-keycloakClusterSecretStore, same asvault-oidc-init) - add the
KEYCLOAK_DNSsubstitute - the moved ExternalSecret uses
${SERVICE_DNS}forredirectURL(same value as the formerFLUX_WEBUI_DNS)
- replace
- the
oidc-authhealth check stays influx-webui-init
Related reference(s)
- Failed job: https://gitlab.com/sylva-projects/sylva-core/-/jobs/17451219914 (
deploy-management-cluster, capo/rke2, onmain@ 4352f62c) - 9071dd94 "Fix flux SSO test in upgrade scenario" (moved the
oidc-authhealth check toflux-webui-init)
Closes #4900 (closed)
Test coverage
kustomize buildpasses forflux-webui-initandkeycloak-oidc-external-secretshelm templaterenders for themanagement,workload-cluster,upgradeandbootstraptest-values; checked the renderedflux-webui-init/keycloak-oidc-external-secretsKustomizations (dependsOn, substitutes, components, healthChecks)units-description.mdunchanged after regeneration- upgrade path: the ExternalSecret moves between Flux Kustomizations, so Flux prunes it from one and applies it in the other.
Summary of pipelines (details below):
| release-1.8 deploy | update to this MR (job 17471381331) | fresh deploy with this MR (job 17494376387) | |
|---|---|---|---|
ExternalSecret created |
14:35:34 | 16:00:53 (recreated, new uid) | 08:03:32 |
source flux-webui-crossplane-client-secret created |
14:37:06 (+92s) | 14:37:06 (kept from deploy) | 08:03:34 (+2s) |
oidc-auth created |
14:37:39 | 16:00:53 (recreated) | 08:05:38 |
Pipeline for fresh deployment ran with success for management-cluster, it failed on workload-cluster , not related to this change. 2993155773
- job for deployying management cluster 17494376387 :
-
creationTimestamp of Secret
keycloak/flux-webui-crossplane-client-secret, the secret the Client writes :creationTimestamp: "2026-10-27T08:03:34Z" -
creationTimestamp of the ExternalSecret
eso-flux-webui-oidc:creationTimestamp: "2026-10-27T08:03:32Z"- -
creationTimestamp and ownerReferences of Secret flux-system/oidc-auth :
creationTimestamp: "2026-10-27T08:05:38Z"andname: oidc-auth namespace: flux-system ownerReferences: - apiVersion: external-secrets.io/v1 blockOwnerDeletion: true controller: true kind: ExternalSecret name: eso-flux-webui-oidc uid: 2d48dcf1-0149-4427-b007-61347ad5837c
-
Pipeline for sylva-upgrade ran with success : 2990040976
- job for deploying management cluster 17471381329 :
-
creationTimestamp of Secret
keycloak/flux-webui-crossplane-client-secret, the secret the Client writes :creationTimestamp: "2026-10-26T14:37:06Z" -
creationTimestamp of the ExternalSecret
eso-flux-webui-oidc:creationTimestamp: "2026-10-26T14:35:34Z"- this external secret reads the secret above - we can see by timestamp that it was created 92s before , and it retried until it succeeded, in this job it was resolved in under those 5min timeout. -
creationTimestamp and ownerReferences of Secret flux-system/oidc-auth :
creationTimestamp: "2026-10-26T14:37:39Z"andname: oidc-auth namespace: flux-system ownerReferences: - apiVersion: external-secrets.io/v1 blockOwnerDeletion: true controller: true kind: ExternalSecret name: eso-flux-webui-oidc uid: 0baec7cb-72e7-406d-a515-686155bd866c
-
- job for updating management cluster 17471381331 :
-
creationTimestamp is the one from the deployment job, so adding the updateTimestamp of Secret
keycloak/flux-webui-crossplane-client-secret, the secret the Client writes - this shows that it doesn't try to write it before it receives the dependency update (even if the secrets existed before or not, timeline is not before dependency)manager: external-secrets operation: Update subresource: status time: "2026-10-26T16:00:53Z" -
creationTimestamp of the ExternalSecret
eso-flux-webui-oidc:creationTimestamp: "2026-10-26T16:00:53Z" -
creationTimestamp and ownerReferences of Secret flux-system/oidc-auth :
creationTimestamp: "2026-10-26T16:00:53Z"andname: oidc-auth namespace: flux-system ownerReferences: - apiVersion: external-secrets.io/v1 blockOwnerDeletion: true controller: true kind: ExternalSecret name: eso-flux-webui-oidc uid: a4c16801-975e-4014-a4f6-caa205701426
-
CI configuration
Below you can choose test deployment variants to run in this MR's CI.
Click to open to CI configuration
Legend:
| Icon | Meaning | Available values |
|---|---|---|
| Infra Provider | capd, capo, capm3 |
|
| Bootstrap Provider | kubeadm (alias kadm), rke2, okd, ck8s |
|
| Node OS | ubuntu, suse, na, leapmicro |
|
| Deployment Options | Deployment option list and description | |
| Pipeline Scenarios | Available scenario list and description | |
| Enabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Disabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Target platform | Can be used to select specific deployment environment Available platform list and description | |
| Workload deployment workflow | legacy (default; direct workload-cluster apply) or gitops (deploy workload cluster through the GitOps-managed flow) |
|
| Pipeline control | autorun, manual or blocking. Can be used to override global config and start a deployment pipeline the required way |
-
🎬 preview☁️ capd🚀 kadm🐧 ubuntu -
🎬 preview☁️ capo🚀 rke2🐧 suse -
🎬 preview☁️ capm3🚀 rke2🐧 ubuntu -
☁️ capd🚀 kadm🛠️ light-deploy🐧 ubuntu -
☁️ capd🚀 rke2🛠️ light-deploy🐧 suse -
☁️ capo🚀 rke2🐧 suse -
☁️ capo🚀 rke2🐧 leapmicro -
☁️ capo🚀 kadm🐧 ubuntu -
☁️ capo🚀 kadm🐧 ubuntu🔀 gitops -
☁️ capo🚀 kadm🐧 ubuntu🟢 neuvector,mgmt:harbor -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capo🚀 kadm🎬 wkld-k8s-upgrade🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update-no-wkld🛠️ ha🐧 suse -
☁️ capo🚀 rke2🎬 sylva-upgrade🛠️ ha🐧 ubuntu -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.6.x🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capo🚀 rke2🛠️ misc🐧 ubuntu🟢 mgmt:harbor🔴 neuvector -
☁️ capo🚀 rke2🛠️ ha,misc,openbao🐧 suse -
☁️ capo🚀 rke2🐧 suse🎬 upgrade-from-prev-tag -
☁️ capm3🚀 rke2🐧 suse -
☁️ capm3🚀 kadm🐧 ubuntu -
☁️ capm3🚀 rke2🛠️ external-openbao-no-tls🐧 ubuntu -
☁️ capm3🚀 rke2🛠️ external-openbao🐧 suse -
☁️ capm3🚀 kadm🛠️ external-openbao,openbao-namespace🐧 ubuntu -
☁️ capm3🚀 ck8s🐧 ubuntu -
☁️ capm3🚀 kadm🎬 rolling-update-no-wkld🛠️ ha,misc🐧 ubuntu -
☁️ capm3🚀 rke2🎬 wkld-k8s-upgrade🛠️ ha🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2🎬 upgrade-from-prev-release-branch🛠️ ha🐧 suse -
☁️ capm3🚀 rke2🛠️ misc,ha🐧 suse -
☁️ capm3🚀 rke2🎬 sylva-upgrade🛠️ ha,misc🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 suse -
☁️ capm3🚀 ck8s🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-from-release-1.5 -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-to-main
Global config for deployment pipelines
-
autorun pipelines
-
allow failure on pipelines
-
record sylvactl events
Notes:
- Enabling
autorunwill make deployment pipelines to be run automatically without human interaction - Disabling
allow failurewill make deployment pipelines mandatory for pipeline success. - if both
autorunandallow failureare disabled, deployment pipelines will need manual triggering but will be blocking the pipeline
Be aware: after configuration change, pipeline is not triggered automatically. Please run it manually (by clicking the run pipeline button in Pipelines tab) or push new code.