Twingate / kubernetes-operator

Twingate Kubernetes Operator allows configuring Twingate using Kubernetes assets - OSS
https://www.twingate.com
Mozilla Public License 2.0
19 stars 1 forks source link

ownerReferences of TwingateResourceAccess prevents ArgoCD from deleting it #287

Closed ErezWeiss closed 1 month ago

ErezWeiss commented 1 month ago

Using v0.11.2. We are using ArgoCD to create both TwingateResource and TwingateResourceAccess.

When I delete a TwingateResourceAccess from the source code, that what I see in Argo:

twingatepic

The resource on the right (baseline-analyzer-developers-access) was before the deletion like other resources (baseline-analyzer-admins-access for instance). Once we delete it, ArgoCD refuse to delete it as it has the ownerReferences field, that connects it to the resource. Once we delete the ownerReferences field, the resource is deleted.

I came across this: https://github.com/argoproj/argo-cd/issues/4764 It may help... Thanks!

linear[bot] commented 1 month ago

OSS-36 ownerReferences of TwingateResourceAccess prevents ArgoCD from deleting it

ekampf commented 1 month ago

We initially added this so that if you delete a resource its access object get deleted too. I wonder if we should just skip this...

ErezWeiss commented 1 month ago

We initially added this so that if you delete a resource its access object get deleted too. I wonder if we should just skip this...

Maybe this logic should be Operator-wise and not K8S-wise. @ekampf

ekampf commented 1 month ago

You might be right.

Giving it a second thought I'd expect that if the references TwingateResource is deleted, the access object sill remains on k8s just starts logging errors in reconciliation...