-
Notifications
You must be signed in to change notification settings - Fork 501
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 that pod spec's hash may be changed when new fields are added to the PodSpec
#6030
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/v2 #6030 +/- ##
==============================================
- Coverage 70.04% 69.94% -0.11%
==============================================
Files 153 154 +1
Lines 9441 9508 +67
==============================================
+ Hits 6613 6650 +37
- Misses 2828 2858 +30
Flags with carried forward coverage won't be shown. Click here to find out more. |
/run-pull-e2e-kind-v2 |
1 similar comment
/run-pull-e2e-kind-v2 |
/run-pull-e2e-kind-v2 |
pkg/utils/k8s/pod.go
Outdated
|
||
// This prevents the hash from being changed when new fields are added to the `PodSpec` due to K8s version upgrades. | ||
buf := bytes.Buffer{} | ||
_ = podEncoder.Encode(&corev1.Pod{Spec: *spec}, &buf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
panic it to avoid missing unexpected corner case
/run-pull-e2e-kind-v2 |
1 similar comment
/run-pull-e2e-kind-v2 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csuzhangxc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
New changes are detected. LGTM label has been removed. |
/run-pull-e2e-kind-v2 |
What problem does this PR solve?
What is changed and how does it work?
Code changes
Tests
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.