Conversation
|
Integration test results for b3eaf61: fail 😕 |
alpeb
left a comment
There was a problem hiding this comment.
On a first pass, this is working as expected.
One small issue is that --from-manifests is being allowed in the first stage, because of it being separate from the main flagset.
I wonder how we can let users know when the need for linkerd upgrade config is needed, which would only be occasionally. First thing that occurs to me is hard-coding some boolean const alongside version.Version indicating that. Then linkerd upgrade control-plane would just issue a warning in stderr about it.
e2fc912 to
3e7cf8d
Compare
b3eaf61 to
e364a16
Compare
|
Integration test results for e364a16: fail 😕 |
e364a16 to
79ea456
Compare
|
Integration test results for 79ea456: fail 😕 |
79ea456 to
59f7f65
Compare
|
Integration test results for 59f7f65: success 🎉 |
f3d48ff to
37f234e
Compare
|
Integration test results for 37f234e: fail 😕 |
dadjeibaah
left a comment
There was a problem hiding this comment.
This change looks good, had one clarifying question below.
| if err != nil { | ||
| return err | ||
| } | ||
|
|
There was a problem hiding this comment.
Just noticed this now, when trying to test --from-manifests after @alpeb's comment. It seems, on line 79 of this file, that we are using a testing artifact to create a Kubernetes clientset. Is this intended? Wasn't clear on how its being used.
There was a problem hiding this comment.
Good question! (Also I forgot about @alpeb's original question re: allowing linkerd config --from-manifests, have pushed a new commit to prevent that.)
Re: k8s.NewFakeClientSetsFromManifests on line 79, this is intended. Adding --from-manifests required reading k8s yaml from stdin (or files), and processing them in lieu of k8s resources returned from the k8s api. We already had some test code doing this to mock out k8s clients. The change in #2697 moved that test code into a new fake.go file, to support --from-manifests. Leveraging fake.go allows most of the upgrade code to be agnostic of where the k8s resources came from, since it's just using a k8s client.
|
Integration test results for dd404b9: fail 😕 |
ihcsim
left a comment
There was a problem hiding this comment.
Code change LGTM. Just a minor comment.
I will do some more testing on this branch.
Also, given what we saw today on how the CRD change affected the integration tests, I guess there is a chance that after running linkerd upgrade config, the control plane is left in limbo if the controller and other components aren't restarted, right?
| } | ||
|
|
||
| func (options *upgradeOptions) validateAndBuild(k kubernetes.Interface, flags *pflag.FlagSet) (*installValues, *pb.All, error) { | ||
| func (options *upgradeOptions) validateAndBuild(stage string, k kubernetes.Interface, flags *pflag.FlagSet) (*installValues, *pb.All, error) { |
There was a problem hiding this comment.
I don't think stage is needed in this function; should be able to assign it to values after the call to validateAndBuild().
There was a problem hiding this comment.
I considered this initially as it would have minimized the change and preserved validateAndBuild's signature. I opted to set stage in this function keep all the code that creates an installValues in one place. The alternative is that validateAndBuild creates a nearly-complete installValues that the caller must know to set stage after the fact.
|
I verified
Probably an extra message in stderr alongside the existing
A different take to ensure the second stage is ran after the first would be to add an annotation into linkerd's namespace with the version string. The second stage would retrieve the namespace and ensure it has the proper version. This could also apply to |
Yeah, the scenario I was thinking about is hey, your control plane is broken, until you run |
|
I agree there's more we could do here around version checking during an upgrade. Some of that will happen via multi-stage support in |
`linkerd install` supports a 2-stage install process, `linkerd upgrade` did not. Add 2-stage support for `linkerd upgrade`. Also exercise multi-stage functionality during upgrade integration tests. Part of #2337 Signed-off-by: Andrew Seigner <[email protected]>
Signed-off-by: Andrew Seigner <[email protected]>
Signed-off-by: Andrew Seigner <[email protected]>
Signed-off-by: Andrew Seigner <[email protected]>
5daa740 to
7602ab8
Compare
alpeb
left a comment
There was a problem hiding this comment.
This looks good to me 👍
I also verified the integrations tests are green, since it seems l5d-bot decided to take a break 🤖 🔥
|
Integration test results for 7602ab8: success 🎉 |
linkerd installsupports a 2-stage install process,linkerd upgradedid not.
Add 2-stage support for
linkerd upgrade. Also exercise multi-stagefunctionality during upgrade integration tests.
Part of #2337
Signed-off-by: Andrew Seigner [email protected]
Depends on #2719