-
Notifications
You must be signed in to change notification settings - Fork 83
Fix: Deficiencies when using v1alpha1 as CRD storage #302
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: AiRanthem <[email protected]>
Signed-off-by: AiRanthem <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #302 +/- ##
==========================================
+ Coverage 47.51% 47.57% +0.06%
==========================================
Files 63 63
Lines 9797 9809 +12
==========================================
+ Hits 4655 4667 +12
Misses 4585 4585
Partials 557 557
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: AiRanthem <[email protected]>
Signed-off-by: AiRanthem <[email protected]>
Signed-off-by: AiRanthem <[email protected]>
Signed-off-by: AiRanthem <[email protected]>
| } | ||
| } | ||
|
|
||
| func AnnotationsDeepEqual(a, b map[string]string, keysToDelete ...string) bool { |
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.
this func seems readonly, but it actually change the map a and b, consider move the mutation part out of the func
| if obj.Annotations == nil { | ||
| obj.Annotations = map[string]string{} | ||
| } | ||
| obj.Annotations[RolloutStyleAnnotation] = src.Annotations[RolloutStyleAnnotation] |
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.
why copy the annotation to v1beta1 , v1beta1 should save the information in the Spec.Strategy.Canary.EnableExtraWorkloadForCanary
| if obj.Labels == nil { | ||
| obj.Labels = map[string]string{} | ||
| } | ||
| obj.Labels[v1beta1.RolloutIDLabel] = src.Spec.DeprecatedRolloutID |
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.
the label should read from the workload label not the rollout label
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Special notes for reviews