-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Improve cert-manager shouldUpgrade #10407
🌱 Improve cert-manager shouldUpgrade #10407
Conversation
/cc @chrischdi @sbueringer |
3563bfc
to
2784b54
Compare
Thx! /lgtm /assign @fabriziopandini |
LGTM label has been added. Git tree hash: 53e62f6f8b22f5dc8244862969b5c8712f335122
|
Make shouldUpgrade() accept the list of objects to be installed too. Compare the installed and to-be-installed objects in case the installed and to-be-installed versions are the same. If their length is different, assume that an upgrade is required. Update unit tests.
2784b54
to
47dcdda
Compare
/lgtm /assign @fabriziopandini @chrischdi |
LGTM label has been added. Git tree hash: beadb3144fc0f5dad31328345d7d9ea29af7a2c1
|
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.
/approve
Thanks for working on this!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi 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 |
c, err := cm.proxy.NewClient(ctx) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return NewCRDMigrator(c).Run(ctx, objs) | ||
return NewCRDMigrator(c).Run(ctx, installObj) |
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.
q: why are passing installed objects here?
If I remember well CRD migrator expect to get in input the objects that are going to be installed to determine what is going to change
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.
never mind, those are the objects to be installed
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.
installObj are the objects to-be installed, not the one which exist :-)
It's the same as before, the output of: cm.getManifestObjs(ctx, config)
This was actually a bug fix. So it qualifies for cherry-pick /cherry-pick release-1.7 |
/cherry-pick release-1.6 |
@sbueringer: #10407 failed to apply on top of branch "release-1.6":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sbueringer: new pull request created: #10497 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
Make shouldUpgrade() accept the list of objects to be installed too.
Compare the installed and to-be-installed objects in case the
installed and to-be-installed versions are the same. If their length is
different, assume that an upgrade is required.
Update unit tests.
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 #10389
(the linked issue was a but unclear what's going on, but we established that shouldUpgrade can check len of objects too)
/area clusterctl
/kind feature