Check installed required CRDs and fail if not present
What it does
- Check installed required CRDs and fail if not present (the readyness probe is in error)
- Installed CRDs are discovered by a discoveryClient (which is different from usual k8SClient)
- The default readyness probe is modified to fail if required CRDs are not installed. The healthyness probe is not modified, since the manager is alive, but nor ready to process events correctly
- Package group dependencies are described explicitly, however, the version is guessed from the package itself
- Deprecated unit tests are removed
- Since the present operator is requiring ESO
- The present MR depends on sylva-projects/sylva-core!5407 (merged)
- The deploy operator step in the CI is skipped since it will fail. Future E2E tests will solve the issue
Remarks
- Once the flux sources are supported, commented code must be un-commented
- I haven't find an easy way to write useful E2E tests. Hence, I only tested it locally
- The go vulncheck failure should be solved by upgrading helm version, which is outside the present MR scope (see https://github.com/helm/helm/security/advisories/GHSA-f9f8-9pmf-xv68)
Tests
-
✅ Backward compliance: See pipeline tests -
⚠️ Local tests (ON GOING FOLLOWING REVIEWS):- Installation on Rocket a 1.3.15 Sylva core (eso v1beta1) and the present operator (expecting eso v1). We face the issue described in #44 (closed): error logs are present but the kustomization is OK
-
Logs:
2025-09-08T08:05:46Z ERROR controller-runtime.source.Kind if kind is a CRD, it should be installed before calling Start {"kind": "ExternalSecret.external-secrets.io", "error": "no matches for kind "ExternalSecret" in version "external-secrets.io/v1""}
-
Pod status is (almost) fine
k get po -n workload-cluster-operator-system
NAME READY STATUS RESTARTS AGE
workload-cluster-operator-controller-manager-c5c57d7c5-c9knw 2/2 Running 1 (91s ago) 3m56s
-
Kustomization OK too
-
- Installation on Rocket a 1.3.15 Sylva core (eso v1beta1) and the present version operator (expecting v1)
-
Logs include the previous error and the readyness probe error
2025-09-08T11:30:46Z DEBUG controller-runtime.healthz healthz check failed {"checker": "readyz", "error": "required CRDs are not installed"}
-
Pod status is KO due to failing readyness probe
k get po -n workload-cluster-operator-system workload-cluster-operator-controller-manager-86d96fd495-kzgxs
NAME READY STATUS RESTARTS AGE
workload-cluster-operator-controller-manager-86d96fd495-kzgxs 1/2 CrashLoopBackOff 5 (16s ago) 6m16s
k get deployment -n workload-cluster-operator-system
NAME READY UP-TO-DATE AVAILABLE AGE
workload-cluster-operator-controller-manager 0/1 1 0 63m
-
The kustomization is KO
k get kustomizations.kustomize.toolkit.fluxcd.io workload-cluster-operator
NAME AGE READY STATUS
workload-cluster-operator 5m20s False dependency 'sylva-system/cluster-machines-ready' is not ready
-
- Installation on Rocket a 1.3.15 Sylva core (eso v1beta1) and the present operator (expecting eso v1). We face the issue described in #44 (closed): error logs are present but the kustomization is OK
References
Close #44 (closed)