-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Add document for environment variables #5080
Conversation
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'd be awesome if this could be auto-generated by looking at source files. This would also force the documentation to appear in someway in the location where it is used. Do you think you could manage a script to do that @terrytangyuan ?
Similar to how all of our other docs are generated ( |
docs/environment-variables.md
Outdated
@@ -0,0 +1,46 @@ | |||
# Environment Variables | |||
|
|||
This document outlines the set of environment variables that can be set to customize the behaviours at different levels. |
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 needs to be clearly stated that these are unsupported and may be removed.
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. Just added a note on this.
@simster7 Yes that's definitely achievable. However I think it's a bit overkill and it doesn't seem to require a lot of efforts maintaining this document at this point. I agree that in the long term it makes sense to automate the process as the list grows so it's easy to maintain but perhaps low priority for now. |
docs/environment-variables.md
Outdated
| `REMOVE_LOCAL_ART_PATH` | bool | Whether to remove local artifacts. | | ||
|
||
|
||
## CLI |
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 think can exclude CLI ones, you can run argo --help
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.
Sure. Removed this section.
@@ -0,0 +1,36 @@ | |||
# Environment Variables | |||
|
|||
This document outlines the set of environment variables that can be used to customize the behaviours at different levels. |
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 think I'm wrong about the text for this. I think we should not emphasize they are unsupported, more that they are typically added to test out experimental features and should not be needed by most users.
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.
That sounds much better actually. I just pasted the exact sentence you said but feel free to modify further.
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 would actually explicitly say that these may be removed at any time
@simster7 before merge, you always have valuable opinions on docs, do you want to take a look? |
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 still believe that this should be auto generated, or at the very least it should have an automatic check that all of the flags here still exist in the codebase and that no flags that exist in the code base are not here. Otherwise this file would in practice get neglected and become out of date soon.
@@ -0,0 +1,36 @@ | |||
# Environment Variables | |||
|
|||
This document outlines the set of environment variables that can be used to customize the behaviours at different levels. |
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 would actually explicitly say that these may be removed at any time
docs/environment-variables.md
Outdated
|----------|------|------------| | ||
| `ALL_POD_CHANGES_SIGNIFICANT` | bool | Whether to consider all pod changes as significant during pod reconciliation. | | ||
| `ALWAYS_OFFLOAD_NODE_STATUS` | bool | Whether to always offload the node status. | | ||
| `ARCHIVED_WORKFLOW_GC_PERIOD` | time.duration | The periodicity for GC of archived workflows. | |
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.
Very minor, but correct capitalization emphasizes that this is the Go type
| `ARCHIVED_WORKFLOW_GC_PERIOD` | time.duration | The periodicity for GC of archived workflows. | | |
| `ARCHIVED_WORKFLOW_GC_PERIOD` | time.Duration | The periodicity for GC of archived workflows. | |
docs/environment-variables.md
Outdated
|
||
| Name | Type | Description| | ||
|----------|------|------------| | ||
| `ALL_POD_CHANGES_SIGNIFICANT` | bool | Whether to consider all pod changes as significant during pod reconciliation. | |
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 would also wrap types in in-line codeblocks to be consistent with our docs elsewhere
| `ALL_POD_CHANGES_SIGNIFICANT` | bool | Whether to consider all pod changes as significant during pod reconciliation. | | |
| `ALL_POD_CHANGES_SIGNIFICANT` | `bool` | Whether to consider all pod changes as significant during pod reconciliation. | |
@simster7 Thanks! Just addressed the comments. I probably don't have width to work on automating this at this point yet. Anyone else please feel free to contribute that before I get to it. Just in case someone else might be working on this, note that besides |
docs/environment-variables.md
Outdated
| `LEADER_ELECTION_IDENTITY` | `string` | The ID used for workflow controllers to elect a leader. | | ||
| `MAX_OPERATION_TIME` | `time.Duration` | The maximum time a workflow operation is allowed to run for before requeuing the workflow onto the work queue. | | ||
| `OFFLOAD_NODE_STATUS_TTL` | `time.Duration` | The TTL to delete the offloaded node status. Currently only used for testing. | | ||
| `POD_GC_TRANSIENT_ERROR_MAX_REQUEUES` | `int` | The maximum number of requeues of pods in the GC queue when encountering transient errors. | |
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 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.
Removed and rebased.
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'll add this in #5060 once this has been merged.
Signed-off-by: terrytangyuan <[email protected]>
Signed-off-by: terrytangyuan <[email protected]>
Signed-off-by: terrytangyuan <[email protected]>
Signed-off-by: terrytangyuan <[email protected]>
Signed-off-by: terrytangyuan <[email protected]>
Signed-off-by: terrytangyuan <[email protected]>
Currently we have the use of environment variables in many places at different levels but there's no documentation on them. This PR takes an initial stab at documenting them.
cc @alexec @simster7
Signed-off-by: terrytangyuan [email protected]
Checklist: