-
Notifications
You must be signed in to change notification settings - Fork 263
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
docs: Adds documentation for traffic splitting support in kn #331
docs: Adds documentation for traffic splitting support in kn #331
Conversation
looks good to me, however, I would not require to untag a revision before it can be retagged like in:
That's because you almost always want a create-or-replace (or "set") semantics when writing tags. Otherwise, you would need to examine whether a revision has been already tagged. Also, unconditionally setting a tag makes this operation idempotent. |
Yup, that's an additional step but its required given that a Revision might be present in multiple targets in the traffic block, for eg: in an existing traffic block say if echo-v1 is tagged as
Yes and we'd need the resource listing to show these traffic block values. |
Looks good to me as well, looking forward for this feature! Do I always have to specify weights in way that add up to 100% or if I give "50%" to a given revision the CLI imply that 50% goes to the other revision ? As I wrote this I already thought about the possible issues when 3+ revisions are available, but similarly I could specify weights for 2 revisions and the difference would go to the 3rd revision. |
@markito : Thanks for the review
Yes.
No. Every update to traffic block (for weights) should specify sums which would add up to 100 and that would represent the desired-state of traffic from user.
Yup, in earlier proposal (#285) we discussed about using a character to specify the rest portion using (*) for example |
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.
Lots of copy-editing — aiming to overall try to reduce the assumptions about what the user knows, and what the user has to learn to understand the doc.
81e11b6
to
c1199b5
Compare
Updated the PR with following changes Removal:
Rename:
New:
|
9630c9a
to
a06a2e6
Compare
Looks good to me |
a0a263d
to
e92d0e1
Compare
/test pull-knative-client-go-coverage |
@sixolet @maximilien : Can we get this doc PR merged please as we have respective traffic PR merged ? |
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.
Overall I think that the first three sections don’t do justice to the doc. I would move them out or later in the doc. I would have a brief summary of traffic splitting in terms of the value and the use cases. Briefly mention how Knative support or even mention that later there is a section with details. Then jump into examples and use these examples for explanation of the flags. Especially the ones that are not obvious or combination thereof that are not obvious.
Hope this helps.
e92d0e1
to
721bcc7
Compare
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 is also the first doc using camel case in the name. Perhaps docs/traffic_splitting.md
is better name to follow with the rest (especially generated docs)?
721bcc7
to
3a93e6f
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maximilien, navidshaikh 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 |
/retest |
- Add summary about operations, their usage and examples - Flags precendence explained - Summary column explaining if repetition is allowed or not - Example of different scenarios - Add case where tagOfOneTarget==revisionOfAnotherTarget, prefrence goes to tagOfOneTarget as Tags are unique while revions in a traffic block aren't. - Updating tag requires using `--untag` flag - Update doc to mention the tag update operation and example - Add notes about - assigning multiple tags for same revision - creating a new target in traffic if same revision is tagged with new tag - Update CHANGELOG - Add an example per sub-section of flag description
3a93e6f
to
36e01db
Compare
@maximilien : There was merge conflict for CHANGELOG file, fixed it. PTAL |
/lgtm |
Proposed Changes
kn service update
single entry pointSummary
Following table shows quick summary for traffic splitting flags, their value formats, operation to perform and Repetition column denotes if repeating the particular value of flag is allowed in a
kn service update
command.--traffic
RevisionName=Percent
Percent
traffic toRevisionName
--traffic
Tag=Percent
Percent
traffic to the Revision havingTag
--traffic
@latest=Percent
Percent
traffic to the latest ready Revision--tag
RevisionName=Tag
Tag
toRevisionName
--tag
@latest=Tag
Tag
to the latest ready Revision--untag
Tag
Tag
from RevisionExamples
echo-v1
andecho-v2
asstable
andstaging
respectively:echo-v3
to20%
, adjusting other traffic to accommodate:echo-v3
the tagcandidate
, without otherwise changing any traffic split:echo-v3
the tagcandidate
, and2%
of traffic adjusting other traffic to go to revisionecho-v2
:echo-v3
fromcandidate
tocurrent
:current
fromecho-v3
:echo-v3
having no tag(s) entirely, adjustingecho-v2
to fill up:echo-v1
and its tagold
from the traffic assignments entirely:echo-v1
withstable
as well ascurrent
, and50-50%
traffic split to each:current
:echo-v4
totesting
and assign all the traffic to it:latest
tag ofecho-v1
withold
tag, givelatest
toecho-v2
: