From 0cf7cad2c2a6bd04c086cfa7e4e2cb4750c04755 Mon Sep 17 00:00:00 2001 From: Sean Nguyen Date: Mon, 9 May 2022 13:45:28 -0700 Subject: [PATCH] feat(argo-workflows): add support for Deployment annotations (#1198) * feat(argo-workflows): add support for Deployment annotations bump version and add changelog update documentation Signed-off-by: snooyen * Apply suggestions from code review Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-workflows/Chart.yaml | 5 +++-- charts/argo-workflows/README.md | 2 ++ .../templates/controller/workflow-controller-deployment.yaml | 4 ++++ .../argo-workflows/templates/server/server-deployment.yaml | 4 ++++ charts/argo-workflows/values.yaml | 4 ++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index c8fd0491..3f920a69 100644 --- a/charts/argo-workflows/Chart.yaml +++ b/charts/argo-workflows/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argo-workflows description: A Helm chart for Argo Workflows type: application -version: 0.14.5 +version: 0.15.0 appVersion: v3.3.2 icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm @@ -15,4 +15,5 @@ maintainers: - name: benjaminws annotations: artifacthub.io/changes: | - - "[Fixed]: Add missing create verb to pod/exec for the workflow role" + - "[Added]: Add support for controller Deployment annotations via controller.deploymentAnnotations chart value." + - "[Added]: Add support for server Deployment annotations via server.deploymentAnnotations chart value." diff --git a/charts/argo-workflows/README.md b/charts/argo-workflows/README.md index db550341..c07258d8 100644 --- a/charts/argo-workflows/README.md +++ b/charts/argo-workflows/README.md @@ -67,6 +67,7 @@ Fields to note: | controller.clusterWorkflowTemplates.enabled | bool | `true` | Create a ClusterRole and CRB for the controller to access ClusterWorkflowTemplates. | | controller.containerRuntimeExecutor | string | `"emissary"` | Specifies the container runtime interface to use (one of: `docker`, `kubelet`, `k8sapi`, `pns`, `emissary`) | | controller.containerRuntimeExecutors | list | `[]` | Specifies the executor to use. This has precedence over `controller.containerRuntimeExecutor`. | +| controller.deploymentAnnotations | object | `{}` | deploymentAnnotations is an optional map of annotations to be applied to the controller Deployment | | controller.extraArgs | list | `[]` | Extra arguments to be added to the controller | | controller.extraContainers | list | `[]` | Extra containers to be added to the controller deployment | | controller.extraEnv | list | `[]` | Extra environment variables to provide to the controller container | @@ -145,6 +146,7 @@ Fields to note: | server.baseHref | string | `"/"` | Value for base href in index.html. Used if the server is running behind reverse proxy under subpath different from /. | | server.clusterWorkflowTemplates.enableEditing | bool | `true` | Give the server permissions to edit ClusterWorkflowTemplates. | | server.clusterWorkflowTemplates.enabled | bool | `true` | Create a ClusterRole and CRB for the server to access ClusterWorkflowTemplates. | +| server.deploymentAnnotations | object | `{}` | optional map of annotations to be applied to the ui Deployment | | server.enabled | bool | `true` | Deploy the Argo Server | | server.extraArgs | list | `[]` | Extra arguments to provide to the Argo server binary, such as for disabling authentication. | | server.extraContainers | list | `[]` | Extra containers to be added to the server deployment | diff --git a/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml index 5fff5eba..153efeef 100644 --- a/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml @@ -5,6 +5,10 @@ metadata: labels: {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.controller.image.tag | trunc 63 | quote }} + {{- with .Values.controller.deploymentAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.controller.replicas }} selector: diff --git a/charts/argo-workflows/templates/server/server-deployment.yaml b/charts/argo-workflows/templates/server/server-deployment.yaml index 77d0c0a7..f80ff838 100644 --- a/charts/argo-workflows/templates/server/server-deployment.yaml +++ b/charts/argo-workflows/templates/server/server-deployment.yaml @@ -6,6 +6,10 @@ metadata: labels: {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.server.image.tag | trunc 63 | quote }} + {{- with .Values.server.deploymentAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.server.replicas }} selector: diff --git a/charts/argo-workflows/values.yaml b/charts/argo-workflows/values.yaml index 1fae66e5..361386d5 100644 --- a/charts/argo-workflows/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -64,6 +64,8 @@ controller: namespaceParallelism: # -- Resolves ongoing, uncommon AWS EKS bug: https://github.com/argoproj/argo-workflows/pull/4224 initialDelay: + # -- deploymentAnnotations is an optional map of annotations to be applied to the controller Deployment + deploymentAnnotations: {} # -- podAnnotations is an optional map of annotations to be applied to the controller Pods podAnnotations: {} # -- Optional labels to add to the controller pods @@ -291,6 +293,8 @@ server: repository: argoproj/argocli # -- Overrides the image tag whose default is the chart appVersion. tag: "" + # -- optional map of annotations to be applied to the ui Deployment + deploymentAnnotations: {} # -- optional map of annotations to be applied to the ui Pods podAnnotations: {} # -- Optional labels to add to the UI pods