armory / spinnaker-operator

Open Source Spinnaker Kubernetes Operator source code
Apache License 2.0
186 stars 71 forks source link

Deleted accounts are still in cache #102

Open cgetzen opened 4 years ago

cgetzen commented 4 years ago

Steps to reproduce:

  1. Add two accounts inlined into the SpinnakerService CRD
  2. Verify that their applications are present
  3. Remove one account

Result: applications/infrastructure are still viewable.

Workaround: kubectl -n spinnaker delete pods --all, causes downtime.

I think something like this could help: https://www.spinnaker.io/setup/quickstart/faq/#im-seeing-duplicatebad-infrastructure-entries-in-the-ui-after-deploying-config-changes

ncknt commented 4 years ago

Thanks for the report! Flushing the cache isn't great on production. If you're on 1.19+ and using MySQL for Clouddriver, you could enable the SQL cleanup agent in clouddriver-local:

sql.unknown-agent-cleanup-agent.enabled: true

That said, deleting infrastructure of removed accounts could be handled faster and without the cleanup agent when accounts are defined as SpinnakerAccount.