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

deletion of role fails if secretRef is not found #187

Open
jasonwbarnett opened this issue Jul 2, 2024 · 1 comment
Open

deletion of role fails if secretRef is not found #187

jasonwbarnett opened this issue Jul 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jasonwbarnett
Copy link

jasonwbarnett commented Jul 2, 2024

What happened?

When I deleted a Role (postgresql.sql.crossplane.io/v1alpha1) that has a passwordSecretRef and the referenced secret is missing, it fails to delete the role.

  - lastTransitionTime: "2024-07-02T22:28:00Z"
    message: 'observe failed: cannot get password secret: Secret "database" not found'
    reason: ReconcileError
    status: "False"
    type: Synced

What is the use case?

I am using Argo CD to deploy applications onto K8s and there is race condition where the namespace and it's secret may be deleted before the Role. This creates a funky situation where the Role is left dangling forever.

How can we reproduce it?

Create a role using an existing passwordSecretRef. Then delete the secret. Finally, delete the Role.

What environment did it happen in?

Provider version: 0.9.0
Crossplane version: 1.16.0
K8s: EKS

@jasonwbarnett jasonwbarnett added the bug Something isn't working label Jul 2, 2024
@mleahu
Copy link

mleahu commented Oct 17, 2024

We solved this kind of problems with Usages, but we control the secret as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants