-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix: add finalizer to credentials reference #288
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #288 +/- ##
==========================================
+ Coverage 64.40% 64.87% +0.47%
==========================================
Files 30 30
Lines 1750 1842 +92
==========================================
+ Hits 1127 1195 +68
- Misses 574 592 +18
- Partials 49 55 +6 ☔ View full report in Codecov by Sentry. |
This change looks good to me overall, can we just add some unit tests for the new functionality where unit test frameworks are already in place? |
This might be out of scope for this PR, but we might want to prefix some extra resources with the cluster name like the common-init-files Secret and the helmchartproxies to support the
|
agreed we should scope addons to the cluster they are associated with, I think that is out of scope for this PR but should be addressed in #289 for CCM/Cilium and we can create a separate follow up for the remaining addons |
cfb60ca
to
90c53fe
Compare
90c53fe
to
286ac18
Compare
* fix: linodecluster: add finalizer to credentials reference * fix: linodemachine: add finalizer to credentials reference * fix: linodevpc: add finalizer to credentials reference
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Adds a unique finalizer to the credentials reference Secret (if
.spec.CredentialsRef
is set) when creatingLinode{Cluster,Machine,VPC}
resources and removes it upon deletion. The finalizer is unique in case you have a shared Secret (e.g.KIND.GROUP/NAMESPACE.NAME
).Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
This allows users to use
kubectl delete
with the output ofclusterctl generate
, e.g.:TODOs:
Testing:
$ kubectl get cluster-api,secrets No resources found in default namespace.