From 5dac28cedb9ab96b78b9116d007f72bd1719eb71 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 4 Nov 2023 18:26:52 -0400 Subject: [PATCH 1/3] docs: improve consistency in `environment-variables.md` - consistently use "Server and Controller" instead of `argo-server` and `workflow-controller` (or the lowercase variants) - consistent with the rest of this page and the rest of the docs - those names are primarily referenced in the manifests - consistently use the sentence "You can set environment variables [...] like the following" - there were a few variations on this before - consistently use "Deployment's container spec" - similarly a few variations before - link to the `workflow-controller-configmap` when it is mentioned - keep references to it consistent across the docs; always use `workflow-controller-configmap` - comment out ellipses in code block so that the block is all valid code Signed-off-by: Anton Gilgur --- docs/environment-variables.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index efe9a030675e..e396680dc938 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -54,8 +54,8 @@ most users. Environment variables may be removed at any time. | `WORKFLOW_GC_PERIOD` | `time.Duration` | `5m` | The periodicity for GC of workflows. | | `SEMAPHORE_NOTIFY_DELAY` | `time.Duration` | `1s` | Tuning Delay when notifying semaphore waiters about availability in the semaphore | -CLI parameters of the `argo-server` and `workflow-controller` can be specified as environment variables with the `ARGO_` -prefix. For example: +CLI parameters of the Server and Controller can be specified as environment variables with the `ARGO_` prefix. +For example: ```bash workflow-controller --managed-namespace=argo @@ -67,7 +67,7 @@ Can be expressed as: ARGO_MANAGED_NAMESPACE=argo workflow-controller ``` -You can set environment variable for the argo-server deployment, for example: +You can set environment variables for the Server Deployment's container spec like the following: ```yaml apiVersion: apps/v1 @@ -92,12 +92,10 @@ spec: - name: GRPC_MESSAGE_SIZE value: "209715200" ports: - .. - ... - .... + # ... ``` -You can set the environment variables for controller in controller's container spec like the following: +You can set environment variables for the Controller Deployment's container spec like the following: ```yaml apiVersion: apps/v1 @@ -131,8 +129,7 @@ spec: | `RESOURCE_STATE_CHECK_INTERVAL` | `time.Duration` | `5s` | The time interval between resource status checks against the specified success and failure conditions. | | `WAIT_CONTAINER_STATUS_CHECK_INTERVAL` | `time.Duration` | `5s` | The time interval for wait container to check whether the containers have completed. | -You can set the environment variables for executor by customizing executor container's environment variables in your -controller's config-map like the following: +You can set environment variables for the Executor in your [`workflow-controller-configmap`](workflow-controller-configmap.md) like the following: ```yaml apiVersion: v1 From e55576f2d13cee7b435d37f784d59bf6c54caf66 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 4 Nov 2023 18:43:06 -0400 Subject: [PATCH 2/3] move Server env vars and examples to Server block - instead of being in the Controller block - `GRPC_MESSAGE_SIZE` was used in the example yet wasn't in the Server's env var list - it was incorrectly in the Controller list, confirmed it was only used [in Server code](https://github.com/argoproj/argo-workflows/blob/a47e46208cd0029ef2e35019207d0b1ee4f85ea4/server/apiserver/argoserver.go#L119) - also add its default into the table Signed-off-by: Anton Gilgur --- docs/environment-variables.md | 73 +++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index e396680dc938..187be9b8c919 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -30,7 +30,6 @@ most users. Environment variables may be removed at any time. | `DISABLE_MAX_RECURSION` | `bool` | `false` | Set to true to disable the recursion preventer, which will stop a workflow running which has called into a child template 100 times | | `EXPRESSION_TEMPLATES` | `bool` | `true` | Escape hatch to disable expression templates. | | `EVENT_AGGREGATION_WITH_ANNOTATIONS` | `bool` | `false` | Whether event annotations will be used when aggregating events. | -| `GRPC_MESSAGE_SIZE` | `string` | Use different GRPC Max message size for Argo server deployment (supporting huge workflows). | | `GZIP_IMPLEMENTATION` | `string` | `PGZip` | The implementation of compression/decompression. Currently only "`PGZip`" and "`GZip`" are supported. | | `INFORMER_WRITE_BACK` | `bool` | `true` | Whether to write back to informer instead of catching up. | | `HEALTHZ_AGE` | `time.Duration` | `5m` | How old a un-reconciled workflow is to report unhealthy. | @@ -54,7 +53,7 @@ most users. Environment variables may be removed at any time. | `WORKFLOW_GC_PERIOD` | `time.Duration` | `5m` | The periodicity for GC of workflows. | | `SEMAPHORE_NOTIFY_DELAY` | `time.Duration` | `1s` | Tuning Delay when notifying semaphore waiters about availability in the semaphore | -CLI parameters of the Server and Controller can be specified as environment variables with the `ARGO_` prefix. +CLI parameters of the Controller can be specified as environment variables with the `ARGO_` prefix. For example: ```bash @@ -67,34 +66,6 @@ Can be expressed as: ARGO_MANAGED_NAMESPACE=argo workflow-controller ``` -You can set environment variables for the Server Deployment's container spec like the following: - -```yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: argo-server -spec: - selector: - matchLabels: - app: argo-server - template: - metadata: - labels: - app: argo-server - spec: - containers: - - args: - - server - image: argoproj/argocli:latest - name: argo-server - env: - - name: GRPC_MESSAGE_SIZE - value: "209715200" - ports: - # ... -``` - You can set environment variables for the Controller Deployment's container spec like the following: ```yaml @@ -153,3 +124,45 @@ data: | `FEEDBACK_MODAL` | `bool` | `true` | Show this modal. | | `NEW_VERSION_MODAL` | `bool` | `true` | Show this modal. | | `POD_NAMES` | `string` | `v2` | Whether to have pod names contain the template name (v2) or be the node id (v1) - should be set the same for Controller | +| `GRPC_MESSAGE_SIZE` | `string` | `104857600` | Use different GRPC Max message size for Server (supporting huge workflows). | + +CLI parameters of the Server can be specified as environment variables with the `ARGO_` prefix. +For example: + +```bash +argo server --managed-namespace=argo +``` + +Can be expressed as: + +```bash +ARGO_MANAGED_NAMESPACE=argo argo server +``` + +You can set environment variables for the Server Deployment's container spec like the following: + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: argo-server +spec: + selector: + matchLabels: + app: argo-server + template: + metadata: + labels: + app: argo-server + spec: + containers: + - args: + - server + image: argoproj/argocli:latest + name: argo-server + env: + - name: GRPC_MESSAGE_SIZE + value: "209715200" + ports: + # ... +``` From b0d2fe69b82c31df6a38d205da7351f8bb97c450 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 4 Nov 2023 18:53:46 -0400 Subject: [PATCH 3/3] improve first paragraph - use `!!! Warning` block instead of a unicode character - this is more consistent with the rest of the docs and a more clear warning - be more direct with the description of the document, per [k8s style guide](https://kubernetes.io/docs/contribute/style/style-guide/#use-simple-and-direct-language) - consistently use 1 sentence per line Signed-off-by: Anton Gilgur --- docs/environment-variables.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 187be9b8c919..30365feb53fd 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -1,10 +1,10 @@ # Environment Variables -This document outlines the set of environment variables that can be used to customize the behavior at different -levels. +This document outlines environment variables that can be used to customize behavior. -⚠️ Environment variables are typically added to test out experimental features and should not be used by -most users. Environment variables may be removed at any time. +!!! Warning + Environment variables are typically added to test out experimental features and should not be used by most users. + Environment variables may be removed at any time. ## Controller