Skip to content

Commit

Permalink
feat(argo-workflows): Moved .Values.images values to global
Browse files Browse the repository at this point in the history
Signed-off-by: yu-croco <yuki.kita22@gmail.com>
  • Loading branch information
yu-croco committed Jul 19, 2022
1 parent 8ef5710 commit 67b4294
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 31 deletions.
4 changes: 2 additions & 2 deletions charts/argo-workflows/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: argo-workflows
description: A Helm chart for Argo Workflows
type: application
version: 0.16.7
version: 0.17.0
appVersion: v3.3.8
icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png
home: https://github.com/argoproj/argo-helm
Expand All @@ -15,4 +15,4 @@ maintainers:
- name: benjaminws
annotations:
artifacthub.io/changes: |
- "[Changed]: Assign common labels to some resources"
- "[Changed]: Moved `.Values.images` values to global"
11 changes: 6 additions & 5 deletions charts/argo-workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ Fields to note:
|-----|------|---------|-------------|
| createAggregateRoles | bool | `true` | Create clusterroles that extend existing clusterroles to interact with argo-cd crds |
| fullnameOverride | string | `nil` | String to fully override "argo-workflows.fullname" template |
| images.pullPolicy | string | `"Always"` | imagePullPolicy to apply to all containers |
| images.pullSecrets | list | `[]` | Secrets with credentials to pull images from a private registry |
| global.image.pullPolicy | string | `"IfNotPresent"` | If defined, a imagePullPolicy applied to all Argo Workflows deployments |
| global.image.pullSecrets | list | `[]` | Secrets with credentials to pull images from a private registry |
| global.image.tag | string | `""` | Overrides the global Argo Workflows image tag whose default is the chart appVersion |
| kubeVersionOverride | string | `""` | Override the Kubernetes version, which is used to evaluate certain manifests |
| nameOverride | string | `nil` | String to partially override "argo-workflows.fullname" template |
| singleNamespace | bool | `false` | Restrict Argo to operate only in a single namespace (the namespace of the Helm release) by apply Roles and RoleBindings instead of the Cluster equivalents, and start workflow-controller with the --namespaced flag. Use it in clusters with strict access policy. |
Expand Down Expand Up @@ -73,7 +74,7 @@ Fields to note:
| controller.extraEnv | list | `[]` | Extra environment variables to provide to the controller container |
| controller.image.registry | string | `"quay.io"` | Registry to use for the controller |
| controller.image.repository | string | `"argoproj/workflow-controller"` | Registry to use for the controller |
| controller.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| controller.image.tag | string | `""` | Overrides the image tag whose default is `global.image.tag`. |
| controller.initialDelay | string | `nil` | Resolves ongoing, uncommon AWS EKS bug: https://github.com/argoproj/argo-workflows/pull/4224 |
| controller.instanceID.enabled | bool | `false` | Configures the controller to filter workflow submissions to only those which have a matching instanceID attribute. |
| controller.instanceID.explicitID | string | `""` | Use a custom instanceID |
Expand Down Expand Up @@ -143,7 +144,7 @@ Fields to note:
| executor.env | object | `{}` | Adds environment variables for the executor. |
| executor.image.registry | string | `"quay.io"` | Registry to use for the Workflow Executors |
| executor.image.repository | string | `"argoproj/argoexec"` | Repository to use for the Workflow Executors |
| executor.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| executor.image.tag | string | `""` | Overrides the image tag whose default is `global.image.tag`. |
| executor.resources | object | `{}` | Resource limits and requests for the Workflow Executors |
| executor.securityContext | object | `{}` | sets security context for the executor container |

Expand All @@ -162,7 +163,7 @@ Fields to note:
| server.extraEnv | list | `[]` | Extra environment variables to provide to the argo-server container |
| server.image.registry | string | `"quay.io"` | Registry to use for the server |
| server.image.repository | string | `"argoproj/argocli"` | Repository to use for the server |
| server.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| server.image.tag | string | `""` | Overrides the image tag whose default is `global.image.tag`. |
| server.ingress.annotations | object | `{}` | Additional ingress annotations |
| server.ingress.enabled | bool | `false` | Enable an ingress resource |
| server.ingress.extraPaths | list | `[]` | Additional ingress paths |
Expand Down
7 changes: 7 additions & 0 deletions charts/argo-workflows/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,10 @@ Return the target Kubernetes version
{{- define "argo-workflows.kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }}
{{- end -}}

{{/*
Return the default Argo Workflows app version
*/}}
{{- define "argo-workflows.defaultTag" -}}
{{- default .Chart.AppVersion .Values.global.image.tag }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data:
{{- end }}
{{- if or .Values.mainContainer.resources .Values.mainContainer.env .Values.mainContainer.securityContext}}
mainContainer:
imagePullPolicy: {{ .Values.images.pullPolicy }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
{{- with .Values.mainContainer.resources }}
resources: {{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -45,7 +45,7 @@ data:
{{- end }}
{{- if or .Values.executor.resources .Values.executor.env .Values.executor.securityContext}}
executor:
imagePullPolicy: {{ .Values.images.pullPolicy }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
{{- with .Values.executor.resources }}
resources: {{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ template "argo-workflows.controller.fullname" . }}
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 }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.controller.image.tag | trunc 63 | quote }}
{{- with .Values.controller.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -18,7 +18,7 @@ spec:
metadata:
labels:
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }}
app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.controller.image.tag | trunc 63 | quote }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.controller.image.tag | trunc 63 | quote }}
{{- with.Values.controller.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -34,14 +34,14 @@ spec:
{{- end }}
containers:
- name: controller
image: "{{ .Values.controller.image.registry }}/{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
image: "{{ .Values.controller.image.registry }}/{{ .Values.controller.image.repository }}:{{ default (include "argo-workflows.defaultTag" .) .Values.controller.image.tag }}"
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
command: [ "workflow-controller" ]
args:
- "--configmap"
- "{{ template "argo-workflows.controller.fullname" . }}-configmap"
- "--executor-image"
- "{{ .Values.executor.image.registry }}/{{ .Values.executor.image.repository }}:{{ .Values.executor.image.tag | default .Chart.AppVersion }}"
- "{{ .Values.executor.image.registry }}/{{ .Values.executor.image.repository }}:{{ default (include "argo-workflows.defaultTag" .) .Values.executor.image.tag | default .Chart.AppVersion }}"
- "--loglevel"
- "{{ .Values.controller.logging.level }}"
- "--gloglevel"
Expand Down Expand Up @@ -86,7 +86,7 @@ spec:
{{- with .Values.controller.extraContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.images.pullSecrets }}
{{- with .Values.global.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: {{ template "argo-workflows.controller.fullname" . }}
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 }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.controller.image.tag | trunc 63 | quote }}
{{- with .Values.controller.serviceLabels }}
{{ toYaml . | nindent 4 }}
{{- end }}
Expand Down
10 changes: 5 additions & 5 deletions charts/argo-workflows/templates/server/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: {{ template "argo-workflows.server.fullname" . }}
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 }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.server.image.tag | trunc 63 | quote }}
{{- with .Values.server.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -19,7 +19,7 @@ spec:
metadata:
labels:
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }}
app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.server.image.tag | trunc 63 | quote }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.server.image.tag | trunc 63 | quote }}
{{- with .Values.server.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -35,8 +35,8 @@ spec:
{{- end }}
containers:
- name: argo-server
image: "{{ .Values.server.image.registry }}/{{ .Values.server.image.repository }}:{{ .Values.server.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
image: "{{ .Values.server.image.registry }}/{{ .Values.server.image.repository }}:{{ default (include "argo-workflows.defaultTag" .) .Values.server.image.tag }}"
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
securityContext:
{{- toYaml .Values.server.securityContext | nindent 12 }}
args:
Expand Down Expand Up @@ -87,7 +87,7 @@ spec:
{{- with .Values.server.extraContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.images.pullSecrets }}
{{- with .Values.global.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-workflows/templates/server/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: {{ template "argo-workflows.server.fullname" . }}
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 }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.server.image.tag | trunc 63 | quote }}
{{- with .Values.server.serviceAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
21 changes: 12 additions & 9 deletions charts/argo-workflows/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
images:
# -- imagePullPolicy to apply to all containers
pullPolicy: Always
# -- Secrets with credentials to pull images from a private registry
pullSecrets: []
# - name: argo-pull-secret
global:
image:
# -- Overrides the global Argo Workflows image tag whose default is the chart appVersion
tag: ""
# -- If defined, a imagePullPolicy applied to all Argo Workflows deployments
pullPolicy: IfNotPresent
# -- Secrets with credentials to pull images from a private registry
pullSecrets: []
# - name: argo-pull-secret

# -- Create clusterroles that extend existing clusterroles to interact with argo-cd crds
## Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles
Expand Down Expand Up @@ -45,7 +48,7 @@ controller:
registry: quay.io
# -- Registry to use for the controller
repository: argoproj/workflow-controller
# -- Overrides the image tag whose default is the chart appVersion.
# -- Overrides the image tag whose default is `global.image.tag`.
tag: ""
# -- parallelism dictates how many workflows can be running at the same time
parallelism:
Expand Down Expand Up @@ -280,7 +283,7 @@ executor:
registry: quay.io
# -- Repository to use for the Workflow Executors
repository: argoproj/argoexec
# -- Overrides the image tag whose default is the chart appVersion.
# -- Overrides the image tag whose default is `global.image.tag`.
tag: ""
# -- Resource limits and requests for the Workflow Executors
resources: {}
Expand All @@ -302,7 +305,7 @@ server:
registry: quay.io
# -- Repository to use for the server
repository: argoproj/argocli
# -- Overrides the image tag whose default is the chart appVersion.
# -- Overrides the image tag whose default is `global.image.tag`.
tag: ""
# -- optional map of annotations to be applied to the ui Deployment
deploymentAnnotations: {}
Expand Down

0 comments on commit 67b4294

Please sign in to comment.