-
Notifications
You must be signed in to change notification settings - Fork 102
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
Upgrade command #659
Upgrade command #659
Conversation
pkg/kudoctl/cmd/upgrade.go
Outdated
if ov == nil { | ||
return fmt.Errorf("no operator version for this operator installed yet for %s in namespace %s. Please use install command if you want to install new operator into cluster", operatorName, options.Namespace) | ||
} | ||
oldVersion, _ := semver.NewVersion(ov.Spec.Version) |
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.
Should we be suppressing this error?
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.
no :)
/kind feature |
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.
There are some small things to resolve.
My biggest concern is an "upgrade" is in part an "install" with the condition that an instance of a version of the operator is present... with that context in mind... I don't see how params will be resolved....
- Do we use previous values (or can we)
- I do expect that future versions may have different or added params
I'm expecting that we have to have -p, --parameter stringArray
for upgrade.
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.
love it! really nice work! there are some minor changes needed... most significant is the CLI output for default namespace.
@@ -49,26 +49,3 @@ func TestTableNewInstallCmd_WithParameters(t *testing.T) { | |||
assert.NotNil(t, err, test.errorMessage) | |||
} | |||
} | |||
|
|||
var parameterParsingTests = []struct { |
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.
these tests disappeared... shouldn't they move to params_test.go
?
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.
it got moved to params_test. Oh wait, I did not push that, LOL :D
pkg/kudoctl/cmd/upgrade.go
Outdated
return upgradeCmd | ||
} | ||
|
||
func validate(args []string, options *options) error { |
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 feels more like a validateCmd or validateArgs... find a validate in upgrade I was thinking validation rules around upgrade which this isn't. much of that is in upgrade
where version comparisons are done.
simply mentioning... it is a a weak comment on my part... it looks fine just what was in my head as I reviewed.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alenkacz, kensipe 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 |
This essentially automates https://github.com/kudobuilder/operators/blob/d0a944961fedaf199a13814cd1ea92e1168273cc/repository/kafka/docs/latest/upgrade.md
Fixes #542