-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[TEP-0135] Update Affinity Assistant documentation #6892
[TEP-0135] Update Affinity Assistant documentation #6892
Conversation
ccd6bb0
to
7598323
Compare
7598323
to
b4cbfa3
Compare
<!-- | ||
--- | ||
linkTitle: "Affinity Assistants" | ||
weight: 405 |
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.
I'm not sure why do we need it 😂
docs/affinityassistants.md
Outdated
|
||
**Note:** For users who previously accepting default behavior (enabling affinity assistant) but now want one of the new features, you need to set `disable-affinity-assistant` to "true" and then turn on the new behavior by setting `coschedule` flag. For users who previously disabling the affinity assistant but want one of the new features, just set the `coschedule` flag accordingly. | ||
|
||
**Note:** **DO NOT** change the default value of the `coschedule` feature flag since the feature is work in progress and not yet functional. Please **ONLY** toggle the `disabled-affinity-assistant` feature flag to switch between **"disabled"** and **"coschedule workspace"** modes. |
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.
coscheduling = disabled is OK right?
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.
Yeah this is fine. And disable-affinity-assistant
: true and coschedule
: workspaces will also disabled AA during migration. I put it here just for simplicity as this feature will be completed soon and this note will be removed.
fcddb4a
to
ebe86a6
Compare
docs/affinityassistants.md
Outdated
* **coschedule pipelineruns (WIP)** - All `TaskRun` pods within the `PipelineRun` will be scheduled to the same Node. | ||
|
||
* **isolate PipelineRun (WIP)** - All `TaskRun` pods within the `PipelineRun` will be scheduled to the same Node, | ||
and only one PipelineRun is allowed to run on a node at a time. |
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.
If this functionality isn't available yet, perhaps comment this out for now?
(this gets published as user facing documentation on tekton.dev)
If this is meant to be more contributor focused, consider moving this to a README in the corresponding package or godoc.
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.
The implementation for this feature is about to be completed. Maybe we can merge this PR after the feature is fully supported and update this section.
/hold
docs/affinityassistants.md
Outdated
This means that Affinity Assistant is incompatible with e.g. other affinity rules | ||
configured for the `TaskRun` pods. If the `PipelineRun` has a custom | ||
[PodTemplate](pipelineruns.md#specifying-a-pod-template) configured, the `NodeSelector` and `Tolerations` fields | ||
will also be set on the Affinity Assistant pod. The Affinity Assistant | ||
is deleted when the `PipelineRun` is completed. |
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.
"Incompatible" is a bit ambiguous here - could you explain this a bit more?
Typically when I think of incompatibility I expect either an error to be returned or one field to take precedence over the other. But in this case it doesn't sound like either is what happens, and Affinity Assistants do coexist with PodTemplates? (though I could be misunderstanding something)
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.
I have added some explanation for it, Affinity term in PodTemplate will be overwritten by Affinity Assistant if specified:
docs/affinityassistants.md
Outdated
|
||
The following chart summarizes the Affinity Assistant Modes with different combinations of the `disable-affinity-assistant` and `coschedule` feature flags during migration (when both feature flags are present) and after the migration (when only the `coschedule` flag is present). | ||
|
||
**Note:** For users who previously accepted the default behavior (enabling affinity assistant) but now want one of the new features, you need to set `disable-affinity-assistant` to "true" and then turn on the new behavior by setting the `coschedule` flag. For users who previously disabled the affinity assistant but want one of the new features, just set the `coschedule` flag accordingly. |
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.
How can I figure out if I previously accepted the default behavior?
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.
I have update this part to show the default configmap setting explicitly!
docs/affinityassistants.md
Outdated
|
||
The following chart summarizes the Affinity Assistant Modes with different combinations of the `disable-affinity-assistant` and `coschedule` feature flags during migration (when both feature flags are present) and after the migration (when only the `coschedule` flag is present). | ||
|
||
**Note:** For users who previously accepted the default behavior (enabling affinity assistant) but now want one of the new features, you need to set `disable-affinity-assistant` to "true" and then turn on the new behavior by setting the `coschedule` flag. For users who previously disabled the affinity assistant but want one of the new features, just set the `coschedule` flag accordingly. |
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.
Side note: it's a bit confusing that to turn on the coscheduling affinity assistant feature, you need to set disable-affinity-assistant=true - the flag names seem to conflict each other. idk if it's too late for this, but you may want to look into renaming these flags.
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.
Hi @wlynch. Yeah, there was quite a long discussion about the naming, default value and how to make the migration less confusing to users while maintaining backward compatibility: tektoncd/community#1025 (comment) and tektoncd/community#1031.
Based on the discussion, it appeared that turning disable-affinity-assistant
on or off to honour coschedule
is quite personal. This feature is added as an alpha feature, I think we can collect more user feedback before promoting it to beta.
docs/affinityassistants.md
Outdated
|
||
**Note:** For users who previously accepted the default behavior (enabling affinity assistant) but now want one of the new features, you need to set `disable-affinity-assistant` to "true" and then turn on the new behavior by setting the `coschedule` flag. For users who previously disabled the affinity assistant but want one of the new features, just set the `coschedule` flag accordingly. | ||
|
||
**Note:** **DO NOT** change the default value of the `coschedule` feature flag since the feature is work in progress and not yet functional. Please **ONLY** toggle the `disabled-affinity-assistant` feature flag to switch between **"disabled"** and **"coschedule workspace"** modes. |
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.
You may want to make this warning more prominent - moving this up to the top +
We should also try and classify all of these with their stability level to set expectations around breaking changes (by default users will assume stable).
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.
Good point! Will add the stability levels for different mode!
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.
In the future, the `disable-affinity-assistant` feature flag will be deprecated, and the Affinity Assistant Modes will be only determined by | ||
the `coschedule` feature flag. | ||
|
||
The following chart summarizes the Affinity Assistant Modes with different combinations of the `disable-affinity-assistant` and `coschedule` feature flags during migration (when both feature flags are present) and after the migration (when only the `coschedule` flag is present). |
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 the first mention of migration - when is this happening?
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.
Added 9 month deprecation time to this part
|
||
**Note:** **DO NOT** change the default value of the `coschedule` feature flag since the feature is work in progress and not yet functional. Please **ONLY** toggle the `disabled-affinity-assistant` feature flag to switch between **"disabled"** and **"coschedule workspace"** modes. | ||
|
||
<table> |
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.
As a user / someone who isn't really familiar with this feature, I don't know what this table is supposed to be telling me 😅
Are these the config map values?
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.
Yeah. I switched the order of the chart and the notes, so that the chart is now right below its explanations. PTAL
docs/affinityassistants.md
Outdated
will also be set on the Affinity Assistant pod. The Affinity Assistant | ||
is deleted when the `PipelineRun` is completed. | ||
|
||
Currently, the Affinity Assistant Modes can be configured by the `disable-affinity-assistant` and `coschedule` feature flags. |
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.
Might be worth including the expected config map values somewhere and how they map to the modes above.
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.
Please see the above comment
ebe86a6
to
d8c299e
Compare
23530e0
to
561f6f4
Compare
Part of [tektoncd#6740][tektoncd#6740]. This commit updates the Affinity Assistant related documentation to reflect recent changes in the Affinity Assistant modes. This commit also adds a chart summarizing how to configure the Affinity Assistant modes using `coschedule` and `disabled-affinity-assistant` feature flags. /kind documentation [tektoncd#6740]: tektoncd#6740
561f6f4
to
fd4aa5f
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: lbernick, vdemeester 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 |
/hold cancel #6927 is merged |
Part of #6740. This commit updates the Affinity Assistant related documentation to reflect recent changes in the Affinity Assistant modes. This commit also adds a chart summarizing how to configure the Affinity Assistant modes using
coschedule
anddisabled-affinity-assistant
feature flags./kind documentation
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes