openfaas/openfaas-cloud

Suggestion: Clean-up orphaned secrets

Open

#255 geöffnet am 30. Sept. 2018

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (222 Forks)auto 404
area/securitydesign/reviewhelp wantedpriority/highskill/intermediate

Repository-Metriken

Stars
 (770 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Expected Behaviour

When a secret is no longer bound to a function it should be reclaimed

Current Behaviour

These are removed manually

Possible Solution

Initially perhaps we could reclaim SealedSecrets on a periodic basis via cron / kubectl? this would cause the SealedSecrets controller to remove the Secret from Kubernetes.

We may also want to look into updating import-secrets so that it can remove as well as create SealedSecrets. Alternatively garbage-collect may need extending.

Please make some suggestions on pros/cons before working on this.

Also in scope is documenting the behaviour when complete in the docs/README.md file.

Steps to Reproduce (for bugs)

  1. Add a SealedSecret to your repo and function
  2. Deploy function and check it can access the secret
  3. Remove the secret from the repo (this does another push and the new version of the function will have no secrets attached, but the secret will still exist)

Contributor Guide