Closed mateusoliveira43 closed 1 month ago
This is by design. Because the backup sync controller syncs the backup CRs (both the backup spec and status) from the backup store to the cluster, this is easier to create the CRs (both the spec and status) in one call without enabling the subresource.
What steps did you take and what happened:
When writing code around Velero CRDs I noticed that I can not use
controller-runtime
StatusClient
with them. I get the following error:What did you expect to happen:
Developers are able to use
controller-runtime
StatusClient
with Velero CRDs.Anything else you would like to add:
Issue about similar problem that Velero itself is facing https://github.com/vmware-tanzu/velero/issues/6016
To fix the problem, just need to add the comment
+kubebuilder:subresource:status
in CRD generation code. Documentation reference: https://book.kubebuilder.io/reference/generating-crd#status🚨 This change, without other changes, may break Velero, as with it, it does not allow Spec and Status change together. But since it is a anti-pattern, it should be avoided.
Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.