You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(api): deprecate spec.serviceAccount and adopt cluster-admin scope
Mark spec.serviceAccount as deprecated in the ClusterExtension API.
Remove PreAuthorizer integration, SA-scoped RBAC templates, and
restconfig action. Simplify the controller to use cluster-admin
scope directly.
Co-Authored-By: Claude <noreply@anthropic.com>
// Deprecated: serviceAccount is no longer used and will be removed in a future release.
75
+
//
76
+
// +optional
77
+
ServiceAccountServiceAccountReference`json:"serviceAccount,omitzero"`//nolint:kubeapilinter // deprecated field uses omitzero per OpenShift convention; pointer would be a breaking API change
78
78
79
79
// source is required and selects the installation source of content for this ClusterExtension.
80
80
// Set the sourceType field to perform the selection.
@@ -150,7 +150,7 @@ type SourceConfig struct {
150
150
}
151
151
152
152
// ClusterExtensionInstallConfig is a union which selects the clusterExtension installation config.
153
-
// ClusterExtensionInstallConfig requires the namespace and serviceAccount which should be used for the installation of packages.
153
+
// ClusterExtensionInstallConfig requires the namespace which should be used for the installation of packages.
154
154
//
155
155
// +kubebuilder:validation:XValidation:rule="has(self.preflight)",message="at least one of [preflight] are required when install is specified"
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
407
-
// +kubebuilder:validation:XValidation:rule="self.matches(\"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\")",message="name must be a valid DNS1123 subdomain. It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.), start and end with an alphanumeric character, and be no longer than 253 characters"
408
-
// +required
409
-
Namestring`json:"name"`
407
+
// +kubebuilder:validation:XValidation:rule="self == oldSelf || size(self) == 0",message="name is immutable once set, but may be cleared"
408
+
// +kubebuilder:validation:XValidation:rule="size(self) == 0 || self.matches(\"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\")",message="name must be a valid DNS1123 subdomain. It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.), start and end with an alphanumeric character, and be no longer than 253 characters"
409
+
// +optional
410
+
Namestring`json:"name"`//nolint:kubeapilinter // deprecated field; empty string means unset, pointer would be a breaking API change
410
411
}
411
412
412
413
// PreflightConfig holds the configuration for the preflight checks. If used, at least one preflight check must be non-nil.
0 commit comments