kubewharf / kubeadmiral

Multi-Cluster Kubernetes Orchestration
https://kubeadmiral.io
Apache License 2.0
802 stars 95 forks source link

fix: retain pod spec volume when its name has default token prefix #317

Closed wy-lucky closed 6 months ago

wy-lucky commented 6 months ago

In clusters prior to version 1.24, the default volume name mounted for service accounts is random. And pod spec volumes can not been updated, so we retain it.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 33.27%. Comparing base (31eb90a) to head (5693012).

Files Patch % Lines
pkg/controllers/sync/dispatch/retain.go 0.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #317 +/- ## ========================================== + Coverage 33.21% 33.27% +0.05% ========================================== Files 155 155 Lines 17914 17885 -29 ========================================== + Hits 5951 5952 +1 + Misses 11454 11423 -31 - Partials 509 510 +1 ``` | [Flag](https://app.codecov.io/gh/kubewharf/kubeadmiral/pull/317/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/kubewharf/kubeadmiral/pull/317/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `33.27% <0.00%> (+0.05%)` | :arrow_up: | 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=kubewharf#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.

mrlihanbo commented 6 months ago

Can you found out the reference commit?

wy-lucky commented 6 months ago

Can you found out the reference commit?

It appears that there is no fixed name for it, and modifying the pod.spec.volumes is not allowed. Therefore, we will retain the pod.spec.volumes.