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

K8s secrets for repository credential templates are not deleted when credential template is deleted #3028

Closed
3 tasks done
jannfis opened this issue Jan 24, 2020 · 0 comments · Fixed by #3029
Closed
3 tasks done
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jannfis
Copy link
Member

jannfis commented Jan 24, 2020

Checklist:

  • I've searched in the docs and FAQ for my answer: http://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

The K8s secret that is created to store the secrets used for repository credentials are not deleted when the repository credential is deleted, thus leaving orphaned K8s secrets behind.

To Reproduce

  • Create repository credential template, i.e. argocd repocreds add https://yourserver/path --ssh-private-key-path ~/.ssh/id_rsa
  • A corresponding K8s secret is created in argocd namespace
  • Delete the credential template created in first step, i.e. argocd repocreds rm https://yourserver/path
  • Check that previously created K8s secret still exist in cluster

Expected behavior

The corresponding K8s secret should be deleted when the credential template is removed

Screenshots

If applicable, add screenshots to help explain your problem.

Version

argocd: v1.4.0+b28bdb7.dirty
  BuildDate: 2020-01-22T10:10:27Z
  GitCommit: b28bdb7f4dc971f1d4f28cd28546aba2ed09c0a6
  GitTreeState: dirty
  GoVersion: go1.12.5
  Compiler: gc
  Platform: linux/amd64
argocd-server: v99.99.99+unknown
  BuildDate: 1970-01-01T00:00:00Z
  GitCommit: 
  GitTreeState: 
  GoVersion: go1.12.5
  Compiler: gc
  Platform: linux/amd64
  Ksonnet Version: vdev-2019-05-15T19:48:06+0200
  Kustomize Version: Version: {KustomizeVersion:3.1.0 GitCommit:95f3303493fdea243ae83b767978092396169baf BuildDate:2019-07-26T18:11:16Z GoOs:linux GoArch:amd64}
  Helm Version: v2.13.1
  Kubectl Version: v1.15.2
@jannfis jannfis added the bug Something isn't working label Jan 24, 2020
@jannfis jannfis self-assigned this Jan 24, 2020
@jannfis jannfis changed the title bug: K8s secrets for repository credential templates are not deleted when credential template is deleted K8s secrets for repository credential templates are not deleted when credential template is deleted Jan 24, 2020
alexmt pushed a commit that referenced this issue Jan 27, 2020
…lates (#3016 #3028) (#3029)

* Fix for calculation of credential secrets' names and secret deletion

* Fix comments to reflect reality

* Update unit tests

* Don't encode parts of the repo URL into secret names anymore

* Lint fixes

* Satisfy linter: Remove unused variable

* Retrigger stuck CI
@alexmt alexmt added this to the v1.5 milestone Feb 18, 2020
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
2 participants