From cc0746951b344fe455fbdeab9438a3bb3566eea7 Mon Sep 17 00:00:00 2001 From: Andrew Suderman Date: Tue, 22 Oct 2019 10:10:13 -0600 Subject: [PATCH 1/5] Update argo chart for 2.4.2 (#130) * Updating chart to 2.4.1 Adding a helm flag instead of --no-hooks for sustainability Add better readme around CRDs Fixing controller clusterrole adding workflowtemplate to argo-ui clusterrole * Bumping to newest patch * Bumping to newest patch 2.4.2 --- charts/argo/Chart.yaml | 4 ++-- charts/argo/README.md | 2 +- charts/argo/templates/ui-cluster-role.yaml | 5 +++-- .../templates/workflow-aggregate-roles.yaml | 8 ++++++-- .../workflow-controller-clusterrole.yaml | 19 ++++++++++++++++++- charts/argo/templates/workflow-crd.yaml | 2 ++ .../argo/templates/workflow-template-crd.yaml | 18 ++++++++++++++++++ charts/argo/values.yaml | 3 ++- 8 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 charts/argo/templates/workflow-template-crd.yaml diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml index 1ffb5594..8ea0a280 100644 --- a/charts/argo/Chart.yaml +++ b/charts/argo/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -appVersion: "v2.3.0" +appVersion: "v2.4.2" description: A Helm chart for Argo Workflows name: argo -version: 0.5.4 +version: 0.6.0 icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png diff --git a/charts/argo/README.md b/charts/argo/README.md index ac2c234d..348a0e0a 100644 --- a/charts/argo/README.md +++ b/charts/argo/README.md @@ -8,7 +8,7 @@ If you want your deployment of this helm chart to most closely match the [argo C This chart uses an install hook to configure the CRD definition. Installation of CRDs is a somewhat privileged process in itself and in RBAC enabled clusters the `default` service account for namespaces does not typically have the ability to do create these. A few options are: -- Setup the CRD yourself manually and use the `--no-hooks` options of `helm install` +- Setup the CRD yourself manually and use `--set installCRD=false` when installing the helm chart. Find the CRDs in the [argo codebase](https://raw.githubusercontent.com/argoproj/argo/master/manifests/base/crds/workflow-crd.yaml) - Manually create a ServiceAccount in the Namespace which your release will be deployed w/ appropriate bindings to perform this action and set the `init.serviceAccount` attribute - Augment the `default` ServiceAccount permissions in the Namespace in which your Release is deployed to have the appropriate permissions diff --git a/charts/argo/templates/ui-cluster-role.yaml b/charts/argo/templates/ui-cluster-role.yaml index 2e3c975e..7540e8fd 100644 --- a/charts/argo/templates/ui-cluster-role.yaml +++ b/charts/argo/templates/ui-cluster-role.yaml @@ -1,4 +1,4 @@ -{{- if .Values.ui.enabled -}} +{{- if .Values.ui.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -24,8 +24,9 @@ rules: - argoproj.io resources: - workflows + - workflowtemplates verbs: - get - list - watch - {{- end -}} +{{- end }} diff --git a/charts/argo/templates/workflow-aggregate-roles.yaml b/charts/argo/templates/workflow-aggregate-roles.yaml index 5164ade0..a6d3a7dd 100644 --- a/charts/argo/templates/workflow-aggregate-roles.yaml +++ b/charts/argo/templates/workflow-aggregate-roles.yaml @@ -14,11 +14,12 @@ rules: resources: - workflows - workflows/finalizers + - workflowtemplates + - workflowtemplates/finalizers verbs: - get - list - watch - --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -35,6 +36,8 @@ rules: resources: - workflows - workflows/finalizers + - workflowtemplates + - workflowtemplates/finalizers verbs: - create - delete @@ -44,7 +47,6 @@ rules: - patch - update - watch - --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -61,6 +63,8 @@ rules: resources: - workflows - workflows/finalizers + - workflowtemplates + - workflowtemplates/finalizers verbs: - create - delete diff --git a/charts/argo/templates/workflow-controller-clusterrole.yaml b/charts/argo/templates/workflow-controller-clusterrole.yaml index db17f777..57013987 100644 --- a/charts/argo/templates/workflow-controller-clusterrole.yaml +++ b/charts/argo/templates/workflow-controller-clusterrole.yaml @@ -42,4 +42,21 @@ rules: - watch - update - patch - - delete \ No newline at end of file + - delete +- apiGroups: + - argoproj.io + resources: + - workflowtemplates + - workflowtemplates/finalizers + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - get + - list + diff --git a/charts/argo/templates/workflow-crd.yaml b/charts/argo/templates/workflow-crd.yaml index 64a77d7f..75aa6154 100644 --- a/charts/argo/templates/workflow-crd.yaml +++ b/charts/argo/templates/workflow-crd.yaml @@ -1,3 +1,4 @@ +{{- if .installCRD }} apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -14,3 +15,4 @@ spec: plural: workflows shortNames: - wf +{{- end }} diff --git a/charts/argo/templates/workflow-template-crd.yaml b/charts/argo/templates/workflow-template-crd.yaml new file mode 100644 index 00000000..0ecc8cd6 --- /dev/null +++ b/charts/argo/templates/workflow-template-crd.yaml @@ -0,0 +1,18 @@ +{{- if .installCRD }} +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: workflowtemplates.argoproj.io + annotations: + helm.sh/hook: crd-install + helm.sh/hook-delete-policy: before-hook-creation +spec: + group: argoproj.io + version: v1alpha1 + scope: Namespaced + names: + kind: WorkflowTemplate + plural: workflowtemplates + shortNames: + - wftmpl +{{- end }} diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index ff23183c..5a5cc114 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -4,9 +4,10 @@ images: ui: argoui executor: argoexec pullPolicy: Always - tag: v2.3.0 + tag: v2.4.2 crdVersion: v1alpha1 +installCRD: true init: # By default the installation will not set an explicit one, which will mean it uses `default` for the namespace the chart is From b2e9de601964882391c0708272ee518a1f22af99 Mon Sep 17 00:00:00 2001 From: Antoine Dao Date: Wed, 23 Oct 2019 02:12:08 +1000 Subject: [PATCH 2/5] argo-cd: add server init containers (#131) --- charts/argo-cd/Chart.yaml | 2 +- charts/argo-cd/README.md | 2 ++ .../templates/argocd-repo-server-deployment.yaml | 8 ++++++++ .../templates/argocd-server-deployment.yaml | 1 + charts/argo-cd/values.yaml | 14 ++++++++++++++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index e4cb814c..1f21a8ae 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v1 appVersion: "1.2.3" description: A Helm chart for Argo-CD name: argo-cd -version: 0.6.1 +version: 0.7.1 icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 4db2516a..52bd4afb 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -75,6 +75,8 @@ $ helm install --name my-release argo/argo-cd | repoServer.servicePort | int | `8081` | Service port for repo server | | repoServer.volumeMounts | list | `[]` | Additional volume mounts | | repoServer.volumes | list | `[]` | Additional volumes | +| repoServer.initContainers | list | `[]` | Initialisation containers, see [values.yaml](./values.yaml) for syntax for Helm v2.12.3 | +| repoServer.imagePullSecrets | list | `[]` | List of image pull secrets, see [values.yaml](./values.yaml) for syntax for a secret called "docker-auth-secret" | | server.annotations | object | `{}` | Annotations for the server deployment | | server.containerPort | int | `8080` | Container port for server | | server.extraArgs | list | `[]` | Add additional arguments | diff --git a/charts/argo-cd/templates/argocd-repo-server-deployment.yaml b/charts/argo-cd/templates/argocd-repo-server-deployment.yaml index 2dcc1a79..51c28d62 100644 --- a/charts/argo-cd/templates/argocd-repo-server-deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server-deployment.yaml @@ -59,3 +59,11 @@ spec: {{- if .Values.repoServer.volumes }} {{ toYaml .Values.repoServer.volumes | nindent 6 | trim }} {{- end }} + {{- if .Values.repoServer.initContainers }} + initContainers: + {{ toYaml .Values.repoServer.initContainers | nindent 6 | trim }} + {{- end }} + {{- if .Values.repoServer.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.repoServer.imagePullSecrets | nindent 6 | trim }} + {{- end }} \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-server-deployment.yaml b/charts/argo-cd/templates/argocd-server-deployment.yaml index a25f2b8c..1a94ecba 100644 --- a/charts/argo-cd/templates/argocd-server-deployment.yaml +++ b/charts/argo-cd/templates/argocd-server-deployment.yaml @@ -74,3 +74,4 @@ spec: {{- if .Values.server.volumes }} {{ toYaml .Values.server.volumes | nindent 6 | trim }} {{- end }} + diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index bbdd8ec6..32e131a4 100644 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -38,6 +38,20 @@ repoServer: pullPolicy: Always volumeMounts: [] volumes: [] + # - name: custom-tools + # emptyDir: {} + initContainers: [] + # - name: download-tools + # image: alpine:3.8 + # command: [sh, -c] + # args: + # - wget -qO- https://storage.googleapis.com/kubernetes-helm/helm-v2.12.3-linux-amd64.tar.gz | tar -xvzf - && + # mv linux-amd64/helm /custom-tools/ + # volumeMounts: + # - mountPath: /custom-tools + # name: custom-tools + imagePullSecrets: [] + # - name: docker-auth-secret dexServer: containerPortHttp: 5556 From 04d7d2c3907b97252e3e2d98a557974c2ca10900 Mon Sep 17 00:00:00 2001 From: Andrew Suderman Date: Tue, 22 Oct 2019 14:37:58 -0600 Subject: [PATCH 3/5] Update argo events to 0.10 (#132) --- charts/argo-events/Chart.yaml | 6 +++--- charts/argo-events/README.md | 8 ++++++-- charts/argo-events/templates/gateway-crd.yaml | 2 ++ charts/argo-events/templates/sensor-crd.yaml | 2 ++ charts/argo-events/values.yaml | 9 ++++++--- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/charts/argo-events/Chart.yaml b/charts/argo-events/Chart.yaml index c88c5997..cdb6dde0 100644 --- a/charts/argo-events/Chart.yaml +++ b/charts/argo-events/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart to install Argo-Events in k8s Cluster name: argo-events -version: 0.4.3 +version: 0.5.0 keywords: - argo-events - sensor-controller @@ -11,5 +11,5 @@ sources: maintainers: - name: Vaibhav Page - name: Matt Magaldi -appVersion: 0.9.2 -icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png \ No newline at end of file +appVersion: 0.10 +icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png diff --git a/charts/argo-events/README.md b/charts/argo-events/README.md index dee9b291..174a8114 100644 --- a/charts/argo-events/README.md +++ b/charts/argo-events/README.md @@ -1,8 +1,8 @@ # Argo-Events Chart This is a **community maintained** chart. It installs the [argo-events](https://github.com/argoproj/argo-events) application. This application comes packaged with: -- Sensor Custom Resource Definition -- Gateway Custom Resource Definition +- Sensor Custom Resource Definition (See CRD Notes) +- Gateway Custom Resource Definition (See CRD Notes) - Sensor Controller Deployment - Sensor Controller ConfigMap - Gateway Controller Deployment @@ -10,3 +10,7 @@ This is a **community maintained** chart. It installs the [argo-events](https:// - Service Account - Cluster Roles - Cluster Role Bindings + +## Notes on CRD Installation + +Some users would prefer to install the CRDs _outside_ of the chart. You can disable the CRD installation of this chart by using `--set installCRD=false` when installing the chart. diff --git a/charts/argo-events/templates/gateway-crd.yaml b/charts/argo-events/templates/gateway-crd.yaml index 6cab34ba..d31dc574 100644 --- a/charts/argo-events/templates/gateway-crd.yaml +++ b/charts/argo-events/templates/gateway-crd.yaml @@ -1,3 +1,4 @@ +{{- if .Values.installCRD }} # Define a "gateway" custom resource definition apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition @@ -12,3 +13,4 @@ spec: singular: gateway scope: Namespaced version: v1alpha1 +{{- end }} diff --git a/charts/argo-events/templates/sensor-crd.yaml b/charts/argo-events/templates/sensor-crd.yaml index 5b50b240..a9c2ca5d 100644 --- a/charts/argo-events/templates/sensor-crd.yaml +++ b/charts/argo-events/templates/sensor-crd.yaml @@ -1,3 +1,4 @@ +{{- if .Values.installCRD }} # Define a "sensor" custom resource definition apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition @@ -12,3 +13,4 @@ spec: singular: sensor scope: Namespaced version: v1alpha1 +{{- end }} diff --git a/charts/argo-events/values.yaml b/charts/argo-events/values.yaml index 53f1c470..a0841052 100644 --- a/charts/argo-events/values.yaml +++ b/charts/argo-events/values.yaml @@ -4,6 +4,9 @@ registry: argoproj # The image pull policy imagePullPolicy: Always +# If set to false, skip installing the CRDs. Requires user to have them installed prior to helm chart installation. +installCRD: true + # ServiceAccount to use for running controller. serviceAccount: argo-events-sa # Create service accounts in additional namespaces specified @@ -13,7 +16,7 @@ additionalSaNamespaces: [] instanceID: argo-events -# set `singleNamespace` to false to have the controllers +# set `singleNamespace` to false to have the controllers # listen on all namespaces. Otherwise the controllers will listen # on the namespace provided namespace: argo-events @@ -23,11 +26,11 @@ singleNamespace: true sensorController: name: sensor-controller image: sensor-controller - tag: v0.9.2 + tag: v0.10 replicaCount: 1 gatewayController: name: gateway-controller image: gateway-controller - tag: v0.9.2 + tag: v0.10 replicaCount: 1 From caf9ff6e490eefe108160996d828411f7f7e74ca Mon Sep 17 00:00:00 2001 From: John Behling Date: Tue, 22 Oct 2019 17:08:29 -0500 Subject: [PATCH 4/5] [argo] Add workflow persistence configuration (#133) --- charts/argo/Chart.yaml | 2 +- .../workflow-controller-config-map.yaml | 3 +++ charts/argo/values.yaml | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml index 8ea0a280..2c23f5a5 100644 --- a/charts/argo/Chart.yaml +++ b/charts/argo/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v1 appVersion: "v2.4.2" description: A Helm chart for Argo Workflows name: argo -version: 0.6.0 +version: 0.6.1 icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png diff --git a/charts/argo/templates/workflow-controller-config-map.yaml b/charts/argo/templates/workflow-controller-config-map.yaml index b635ec81..43699820 100644 --- a/charts/argo/templates/workflow-controller-config-map.yaml +++ b/charts/argo/templates/workflow-controller-config-map.yaml @@ -43,3 +43,6 @@ data: {{- if .Values.controller.telemetryConfig.enabled }} telemetryConfig: {{ toYaml .Values.controller.telemetryConfig | indent 6}}{{- end }} + {{- if .Values.controller.persistence }} + persistence: +{{ toYaml .Values.controller.persistence | indent 6 }}{{- end }} diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index 5a5cc114..c4e77c2a 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -29,6 +29,24 @@ controller: enabled: false path: /metrics port: 8080 + persistence: {} + # connectionPool: + # maxIdleConns: 100 + # maxOpenConns: 0 + # # save the entire workflow into etcd and DB + # nodeStatusOffLoad: false + # postgresql: + # host: localhost + # port: 5432 + # database: postgres + # tableName: argo_workflows + # # the database secrets must be in the same namespace of the controller + # userNameSecret: + # name: argo-postgres-config + # key: username + # passwordSecret: + # name: argo-postgres-config + # key: password telemetryConfig: enabled: false path: /telemetry From 2d12ab41349e1c374a05de9282cbf09acc762370 Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Thu, 24 Oct 2019 09:17:26 -0700 Subject: [PATCH 5/5] changes on master to scripts/publish.sh, (#135) --- .github/pull_request_template.md | 1 + scripts/publish.sh | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f3d086a0..c0058839 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,3 +3,4 @@ Checklist: * [ ] I have update the chart version in `Chart.yaml` following Semantic Versioning. * [ ] Any new values are backwards compatible and/or have sensible default. * [ ] I have followed the testing instructions in the [contributing guide](https://github.com/argoproj/argo-helm/blob/master/CONTRIBUTING.md). +* [ ] I have signed the CLA. diff --git a/scripts/publish.sh b/scripts/publish.sh index c43cd79f..8b943495 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,16 +1,17 @@ #!/bin/bash +set -eux SRCROOT="$(cd "$(dirname "$0")/.." && pwd)" GIT_PUSH=${GIT_PUSH:-true} rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-helm.git $SRCROOT/output -cd $SRCROOT/charts -for dir in *; +for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d); do echo "Processing $dir" helm package $dir done +cp $SRCROOT/*.tgz output/ cd $SRCROOT/output && helm repo index . cd $SRCROOT/output && git status