authzed / spicedb-operator

Kubernetes controller for managing instances of SpiceDB
Apache License 2.0
63 stars 27 forks source link

Where does spicedb-operator store list of clusters? #306

Open galenwarren opened 5 months ago

galenwarren commented 5 months ago

When the spicedb operator starts up, I see this line in the logs:

E0415 14:22:57.432900 1 controller.go:288] syncOwnedResource called on unknown object (authzed.com/v1alpha1, Resource=spicedbclusters::ccc-work-kgw-a-2/spicedb): spicedbclusters.authzed.com "spicedb" not found

... but this SpicedbCluster (named "spicedb") doesn't exist anymore, I removed it and replaced it with one with a different name.

How can I remove a cluster and have the operator "forget" it completely?

Thanks.

ecordell commented 5 months ago

This is due to left-over labels on another resource; usually a secret (i.e. "this secret was used by spicedb cluster ABC"). The logs are harmless, but annoying.

I think this is a bug, the operator should clean these labels and annotations when the cluster is deleted.