Skip to content
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

Assume no strategy is rollingUpdate on Vallidation #289

Merged
merged 2 commits into from
Jun 1, 2018

Conversation

dturn
Copy link
Contributor

@dturn dturn commented May 9, 2018

The required-rollout requires a rollout strategy to be explicitly set or else a validation error is raised. However, the k8s default rollout strategy is compatible with the required-rollout annotation. This pr allows for that case.

Fixes: #268

Copy link
Contributor

@KnVerey KnVerey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a recommendation re: the test, but the fix makes sense and I confirmed that RollingUpdate has been the default for a long time, if not always (looked at extensions/v1beta1 in k8s 1.5).

kubectl.expects(:run).with('create', '-f', anything, '--dry-run', '--output=name', anything).returns(
["", "super failed", SystemExit.new(1)]
)
refute deploy.validate_definition(kubectl)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected this test ("test validation works") to pass validation. I see that technically this is proving that only super validation failed, but I think having it pass overall would be more approachable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, not sure what I was thinking. Its fixed.

@KnVerey
Copy link
Contributor

KnVerey commented May 18, 2018

Felix seems to be on vacation right now. @timothysmith0609 can you take a quick look at this?

@dturn
Copy link
Contributor Author

dturn commented Jun 1, 2018

ping

@dturn dturn merged commit 4d2adff into master Jun 1, 2018
@dturn dturn deleted the default-rolling-update branch June 1, 2018 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants