Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Velero CRDs do not have subresources.status #8285

Open
mateusoliveira43 opened this issue Oct 9, 2024 · 2 comments
Open

Velero CRDs do not have subresources.status #8285

mateusoliveira43 opened this issue Oct 9, 2024 · 2 comments

Comments

@mateusoliveira43
Copy link
Contributor

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:

k8sClient.Status().Update(ctx, veleroBackup)
// backups.velero.io "name..." not found 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 #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.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@ywk253100
Copy link
Contributor

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.

@kaovilai
Copy link
Contributor

See also: #4972

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants