k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.62k stars 2.24k forks source link

Fix bug: allow helm controller set owner reference #10048

Open huangzynn opened 2 weeks ago

huangzynn commented 2 weeks ago

Proposed Changes

Allow helm controller set owner reference, when helm controller obj is deleteed , will delete helm-delete-job. If not set owner reference, the second installation and removal will fail Reference: https://github.com/k3s-io/helm-controller/blob/d74a09dfcaefdd6e8bea80d5aac66e70ea4e93d3/pkg/controllers/controllers.go#L144

Types of Changes

bugfix

Verification

See linked issue

Testing

Linked Issues

User-Facing Change

Further Comments

image

brandond commented 2 weeks ago

In the future, PLEASE use the PR template, and create an issue to track the defect you are fixing. I'm not sure why you deleted it instead of at least filling out the proposed changes.

I've created an issue for this, and copied your text into the template.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.69%. Comparing base (0981f00) to head (b2f0f70).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #10048 +/- ## ========================================== - Coverage 49.92% 40.69% -9.24% ========================================== Files 158 155 -3 Lines 14032 13980 -52 ========================================== - Hits 7006 5689 -1317 - Misses 5690 7123 +1433 + Partials 1336 1168 -168 ``` | [Flag](https://app.codecov.io/gh/k3s-io/k3s/pull/10048/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | Coverage Δ | | |---|---|---| | [e2etests](https://app.codecov.io/gh/k3s-io/k3s/pull/10048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `36.47% <100.00%> (-10.01%)` | :arrow_down: | | [inttests](https://app.codecov.io/gh/k3s-io/k3s/pull/10048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `37.08% <100.00%> (-0.02%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/k3s-io/k3s/pull/10048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=k3s-io#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.