Warn at startup when installed CRDs are stale or missing
The operator strict-decodes CR specs, so when the in-cluster CRDs lag the running operator (e.g. CRDs pinned to v0.1.0 while the operator ran v0.3.0), new spec fields fail to decode with no operator-side signal. This adds an advisory startup check so the mismatch is visible in the operator logs. - Add CheckCRDVersions: GET each owned CRD and verify it carries a version-sentinel spec field, logging a distinct WARNING per problem (missing CRD vs. present-but-stale schema); advisory only, never exits. - Keep the sentinel list (buckets/managePolicy, objectstoreusers/ retainOnDelete, bucketaccesses/rawStatements) in one place. - Wire the check into operator startup after the manager config is available. - Add apiextensions customresourcedefinitions get;list RBAC marker and regenerate config/rbac/role.yaml. - Promote k8s.io/apiextensions-apiserver to a direct dependency. Claude-Session: https://claude.ai/code/session_016CEncETbf8cvy1PhsHfFHM
This commit is contained in:
@@ -9,6 +9,7 @@ require (
|
||||
github.com/aws/smithy-go v1.27.4
|
||||
github.com/ceph/go-ceph v0.40.0
|
||||
k8s.io/api v0.34.4
|
||||
k8s.io/apiextensions-apiserver v0.34.1
|
||||
k8s.io/apimachinery v0.34.4
|
||||
k8s.io/client-go v0.34.4
|
||||
sigs.k8s.io/controller-runtime v0.22.4
|
||||
@@ -70,7 +71,6 @@ require (
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.1 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
|
||||
|
||||
Reference in New Issue
Block a user