From 5112c7782423349707c1c13d3da973009c53d830 Mon Sep 17 00:00:00 2001 From: Prateek Khera <34710743+prateekkhera92@users.noreply.github.com> Date: Fri, 10 Jun 2022 22:20:01 +0530 Subject: [PATCH] feat(argo-workflows): Add mainContainer config in configmap (#1310) * Specify logformat for Argo-CD notifications component (#1303) * Add: Specify logformat for Argo-CD notifications component Signed-off-by: Nicolas Lamirault * Update: Chart changelog Signed-off-by: Nicolas Lamirault * Fix: documentation Signed-off-by: Nicolas Lamirault Signed-off-by: Prateek Khera * feat(argo-rollouts): readonly dashboard (#1304) * feat-argo-rollouts-readonly-dashboard Signed-off-by: foxtel-temujincabigao <86087373+foxtel-temujincabigao@users.noreply.github.com>" Signed-off-by: foxtel-temujincabigao <86087373+foxtel-temujincabigao@users.noreply.github.com> * fixing readme values version link Signed-off-by: foxtel-temujincabigao <86087373+foxtel-temujincabigao@users.noreply.github.com> Signed-off-by: foxtel-temujincabigao <86087373+foxtel-temujincabigao@users.noreply.github.com> Co-authored-by: Marco Kilchhofer Signed-off-by: Prateek Khera * fix(argo-workflows): Remove unsupported value (#1302) * fix(argo-workflows): Add comment about removed flag Signed-off-by: yu-croco * fix(argo-workflows): Remove unsupported value Signed-off-by: yu-croco Signed-off-by: Prateek Khera * add mainContainer config in configmap Signed-off-by: Prateek Khera * update version Signed-off-by: Prateek Khera * add mainContainer to values Signed-off-by: Prateek Khera * add mainContainer to readme Signed-off-by: Prateek Khera * add changelog Signed-off-by: Prateek Khera * add Workflow Main Container key Signed-off-by: Prateek Khera * fix(argo-cd): AppSet and Notifications respect global.podAnnotations (#1308) Signed-off-by: Marco Kilchhofer Signed-off-by: Prateek Khera * feat(argo-cd): support separate imagePullSecrets (#1311) Signed-off-by: yu-croco Co-authored-by: Marco Kilchhofer Signed-off-by: Prateek Khera * chore: Update some tools' version on GitHub Actions (#1312) Signed-off-by: yu-croco Signed-off-by: Prateek Khera * chore(CODEOWNERS): Add jmeridth as approver (#1271) Signed-off-by: jmeridth Co-authored-by: Marco Kilchhofer Signed-off-by: Prateek Khera * feat(argo-cd): Support annotations in argocd-configs secrets (#1314) * feat(argo-cd): support annotations in argocd-configs secrets Signed-off-by: yu-croco * fix(argo-cd): align to exitsing format Signed-off-by: yu-croco Signed-off-by: Prateek Khera * add new line to fix failed liniting Signed-off-by: Prateek Khera * remove auto-generating readme Signed-off-by: Prateek Khera * match readme as per the comment in values file Signed-off-by: Prateek Khera * add image pullpolicy to values.yaml Signed-off-by: Prateek Khera * add image pullpolicy to values.yaml Signed-off-by: Prateek Khera * add image pullpolicy to readme Signed-off-by: Prateek Khera * fix ordering in readme Signed-off-by: Prateek Khera * Exclude "mainContainer" prefix from General parameters Signed-off-by: Marco Kilchhofer Co-authored-by: Nicolas Lamirault Co-authored-by: foxtel-temujincabigao <86087373+foxtel-temujincabigao@users.noreply.github.com> Co-authored-by: Marco Kilchhofer Co-authored-by: Aikawa Co-authored-by: Prateek Khera Co-authored-by: JM" (Jason Meridth) --- charts/argo-workflows/Chart.yaml | 4 ++-- charts/argo-workflows/README.md | 9 +++++++++ charts/argo-workflows/README.md.gotmpl | 12 +++++++++++- .../controller/workflow-controller-config-map.yaml | 13 +++++++++++++ charts/argo-workflows/values.yaml | 11 +++++++++++ 5 files changed, 46 insertions(+), 3 deletions(-) diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index 7c690002..62c849ff 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.16.2 +version: 0.16.3 appVersion: v3.3.6 icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm @@ -15,4 +15,4 @@ maintainers: - name: benjaminws annotations: artifacthub.io/changes: | - - "[Fixed]: Remove unsupported value" + - "[Added]: Support for mainContainer config" diff --git a/charts/argo-workflows/README.md b/charts/argo-workflows/README.md index 233af32e..b3aae666 100644 --- a/charts/argo-workflows/README.md +++ b/charts/argo-workflows/README.md @@ -127,6 +127,15 @@ Fields to note: | controller.workflowRestrictions | object | `{}` | Restricts the Workflows that the controller will process. Only valid for 2.9+ | | controller.workflowWorkers | string | `nil` | Number of workflow workers | +### Workflow Main Container + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| mainContainer.env | object | `{}` | Adds environment variables for the Workflow main container | +| mainContainer.imagePullPolicy | string | `"Always"` | imagePullPolicy to apply to Workflow main container | +| mainContainer.resources | object | `{}` | Resource limits and requests for the Workflow main container | +| mainContainer.securityContext | object | `{}` | sets security context for the Workflow main container | + ### Workflow Executor | Key | Type | Default | Description | diff --git a/charts/argo-workflows/README.md.gotmpl b/charts/argo-workflows/README.md.gotmpl index 4f5fe410..27f43013 100644 --- a/charts/argo-workflows/README.md.gotmpl +++ b/charts/argo-workflows/README.md.gotmpl @@ -42,7 +42,7 @@ Fields to note: | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} - {{- if not (or (hasPrefix "workflow" .Key) (hasPrefix "controller" .Key) (hasPrefix "executor" .Key) (hasPrefix "server" .Key) (hasPrefix "artifactRepository" .Key) (hasPrefix "use" .Key) ) }} + {{- if not (or (hasPrefix "workflow" .Key) (hasPrefix "controller" .Key) (hasPrefix "executor" .Key) (hasPrefix "server" .Key) (hasPrefix "artifactRepository" .Key) (hasPrefix "use" .Key) (hasPrefix "mainContainer" .Key) ) }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} @@ -67,6 +67,16 @@ Fields to note: {{- end }} {{- end }} +### Workflow Main Container + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +{{- range .Values }} + {{- if hasPrefix "mainContainer" .Key }} +| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | + {{- end }} +{{- end }} + ### Workflow Executor | Key | Type | Default | Description | diff --git a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml index 5cdb7f50..75b4af1a 100644 --- a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml @@ -30,6 +30,19 @@ data: {{- with .Values.controller.initialDelay }} initialDelay: {{ . }} {{- end }} + {{- if or .Values.mainContainer.resources .Values.mainContainer.env .Values.mainContainer.securityContext}} + mainContainer: + imagePullPolicy: {{ .Values.images.pullPolicy }} + {{- with .Values.mainContainer.resources }} + resources: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.mainContainer.env }} + env: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.mainContainer.securityContext }} + securityContext: {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} {{- if or .Values.executor.resources .Values.executor.env .Values.executor.securityContext}} executor: imagePullPolicy: {{ .Values.images.pullPolicy }} diff --git a/charts/argo-workflows/values.yaml b/charts/argo-workflows/values.yaml index 5131be6b..70e76ceb 100644 --- a/charts/argo-workflows/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -262,6 +262,17 @@ controller: # -- Extra containers to be added to the controller deployment extraContainers: [] +# mainContainer adds default config for main container that could be overriden in workflows template +mainContainer: + # -- imagePullPolicy to apply to Workflow main container + imagePullPolicy: Always + # -- Resource limits and requests for the Workflow main container + resources: {} + # -- Adds environment variables for the Workflow main container + env: {} + # -- sets security context for the Workflow main container + securityContext: {} + # executor controls how the init and wait container should be customized executor: image: