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

Fix status sub-resource not found error on updating status #964

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

vizv
Copy link
Contributor

@vizv vizv commented Sep 17, 2022

Description of the change

Add missing sub-resource for status, which causes error on updating status.

Benefits

SealedSecret resources in my Argo CD no longer stuck after this patchset.

Possible drawbacks

Nothing.

Applicable issues

Additional information

See #961 for details, the issue was introduced in #941 when generating CRD with controller-gen, and subresources was missed from generation, however status sub-resource is used in

which causes the error

@vizv vizv temporarily deployed to vmware-image-builder September 17, 2022 16:18 Inactive
@vizv
Copy link
Contributor Author

vizv commented Sep 17, 2022

@josvazg to reproduce this issue for #961 (comment):

  • create a kind cluster with kind create cluster
  • install the latest SealedSecret helm chart (v2.6.4) with helm upgrade --install sealed-secrets sealed-secrets --repo https://bitnami-labs.github.io/sealed-secrets --namespace kube-system --create-namespace
  • create a SS resource with kubectl create secret generic test --dry-run=client --from-literal foo=bar -o yaml | kubeseal --controller-name sealed-secrets -o yaml | kubectl apply -f -
  • check the log with kubectl -n kube-system logs -f deployments/sealed-secrets

You'll see the error Error updating SealedSecret default/test status: sealedsecrets.bitnami.com "test" not found, and SS resource doesn't contain a status field

@vizv
Copy link
Contributor Author

vizv commented Sep 17, 2022

btw the fix was tested with regenerate the CRD with make manifests using controller-gen v0.9.2, and then apply the modified CRD. The SS status gets updated, the error is gone from SS controller, and Argo CD SS resource no longer stuck in processing state.

Copy link
Collaborator

@alemorcuq alemorcuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

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

Successfully merging this pull request may close these issues.

After update to Helm release 2.6.4 Error updating SealedSecret "secret" not found message in log
3 participants