Skip to content

Normative example for release mode#2044

Merged
knative-prow-robot merged 12 commits intoknative:masterfrom
sixolet:normative
Dec 21, 2018
Merged

Normative example for release mode#2044
knative-prow-robot merged 12 commits intoknative:masterfrom
sixolet:normative

Conversation

@sixolet
Copy link
Copy Markdown
Contributor

@sixolet sixolet commented Sep 17, 2018

Fixes #

Proposed Changes

Describe release mode in a normative example.

Edited the old "manual mode" normative example, as our concept of what "manual mode" is has evolved.

Refers to the proposal in: #1865 (comment)

Release Note

@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 17, 2018
@sixolet sixolet changed the title Normative Normative example for release mode Sep 17, 2018
Comment thread docs/spec/normative_examples.md Outdated
but can be accessed for testing, verification, etc under the
`next.my-service...` name.

An admission hook prevents changing `revisions` without also setting
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we should prevent this.

It's possible to completely overwrite the revisions array and effect a sharp traffic change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

This looks good, though I think you were going to add some text on handling rollbacks and using annotations to track images.

Comment thread docs/spec/normative_examples.md Outdated
current 100% def 2018-01-18 20:34 user1 a6f92d1
abc 2018-01-17 10:32 user1 33643fc

$ knative release begin ghi
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure how this happened, but --service got lost here and on the next two commands.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should be good now.

Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md Outdated
@sixolet
Copy link
Copy Markdown
Contributor Author

sixolet commented Sep 19, 2018

Ok, responded to comments, and another editing pass. Passive voice hides what the user does vs what a controller does 😝

Copy link
Copy Markdown
Contributor

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

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

Some small nits

Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md Outdated
Comment thread docs/spec/normative_examples.md
Comment thread docs/spec/normative_examples.md Outdated
@cppforlife
Copy link
Copy Markdown
Contributor

what do people think of moving configuration at the top level under spec?

@sixolet
Copy link
Copy Markdown
Contributor Author

sixolet commented Oct 5, 2018

what do people think of moving configuration at the top level under spec?

Seems fine, but not for this PR? We can handle that separately for v1apha2, since it's backcompat-breaking.

Seems like Mike is for it too: #1865 (comment)

@sixolet
Copy link
Copy Markdown
Contributor Author

sixolet commented Oct 5, 2018

Ping I think this is ready.


$ knative revisions list --service my-service
Route Traffic Id Date Deployer Git SHA
current,latest 100% def 2018-01-18 20:34 user1 a6f92d1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is the expectation here that changing to the release strategy created the route names 'current' and 'latest', or is it expected that these names were created by a previous release strategy (i.e. runLatest)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. Changing to release strategy makes these route subnames.

Comment thread docs/spec/normative_examples.md Outdated
$ knative revisions list --service my-service
Route Traffic Id Date Deployer Git SHA
next,latest 5% ghi 2018-01-19 12:16 user1 a6f92d1
current 100% def 2018-01-18 20:34 user1 a6f92d1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't this be 95% since we have 5% going to 'ghi'?

Comment thread docs/spec/normative_examples.md Outdated
$ knative deploy --service my-service --env HELLO="blurg"
[...]
Deployed revision ghi to https://latest.my-service.default.mydomain.com
You can begin rolling out this revision with [knative rollout begin ghi]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You have knative rollout here, but the commands below are against knative release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks.

$ knative release --service my-service percent 50
[...]
$ knative rollout finish
$ knative release --service my-service finish
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just to confirm, the strategy for deploy will stay the same even after a finish? For example, a new deploy will move the latest route to the new revision with 0% traffic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed. In release mode adding a new revision moves latest but not current or next, and does not change the allocated percentage if there is a split.

name: my-service
spec:
release:
revisions: [abc]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This seems equivalent to rolloutPercent: 0 with both revisions in the list. However, setting rolloutPercent would preserve the ability to easily visualize that this is rolled back from 'next'. Thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a good point, but that leaves you in the mid-release state. I think a rollback shouldn't do that, since you've determined you should not release to next. Better to wait until you get a new latest to release to.

Comment thread docs/spec/normative_examples.md Outdated
revision is now the current revision.

![Manual rollout](images/manual_rollout.png)
![Release mode](images/manual_rollout.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'manual' here seems confusing with the addition of 'manual' type that removes the Service from control of the underlying Configuration and Route.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was just the name of the image left over. Changed taht.

@mattmoor
Copy link
Copy Markdown
Member

mattmoor commented Nov 1, 2018

@sixolet I noticed this in the backlog, and am curious what's outstanding to land it?

Comment thread docs/spec/normative_examples.md Outdated
$ knative rollout next percent 5
$ knative revisions list --service my-service
Route Traffic Id Date Deployer Git SHA
next,latest 0% ghi 2018-01-19 12:16 user1 a6f92d1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'next' was changed to 'candidate' so might be worth a s/next/candidate/g

Otherwise this lgtm to close out.

@sixolet
Copy link
Copy Markdown
Contributor Author

sixolet commented Nov 28, 2018

Got around to making the s/next/candidate/ finally.

@dgerd
Copy link
Copy Markdown

dgerd commented Nov 28, 2018

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2018
@jonjohnsonjr
Copy link
Copy Markdown
Contributor

jonjohnsonjr commented Nov 30, 2018

/assign @evankanderson

for approval

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@jonjohnsonjr: GitHub didn't allow me to assign the following users: for, approval.

Note that only knative members and repo collaborators can be assigned.
For more information please see the contributor guide

Details

In response to this:

/assign @evankanderson for approval

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.

Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, sixolet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2018
@evankanderson
Copy link
Copy Markdown
Member

It looks like there is a conflict now, but I (or anyone else) can /lgtm after you've resolved the conflict and pushed.

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2018
Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2018
@knative-prow-robot knative-prow-robot merged commit f495c96 into knative:master Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants