diff --git a/charts/argo-ci/values.yaml b/charts/argo-ci/values.yaml index 387abd54..59e4daec 100644 --- a/charts/argo-ci/values.yaml +++ b/charts/argo-ci/values.yaml @@ -5,7 +5,7 @@ workflowNamespace: default argo: imagesNamespace: argoproj - enableWebConsole: false installMinio: true minioBucketName: argo-artifacts useReleaseAsInstanceID: true + \ No newline at end of file diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml index 324cd011..cb72b8ef 100644 --- a/charts/argo/Chart.yaml +++ b/charts/argo/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: A Helm chart for Kubernetes name: argo -version: 0.2.1 +version: 0.3.0 diff --git a/charts/argo/README.md b/charts/argo/README.md index d9ec2be3..e0c74948 100644 --- a/charts/argo/README.md +++ b/charts/argo/README.md @@ -22,7 +22,6 @@ Fields to note: * `controller.instanceID.useReleaseName`: If set to true then chart set controller instance id to release name * `controller.instanceID.explicitID`: Allows customization of an instance id for the workflow controller to monitor * `controller.workflowNamespaces`: This is a list of namespaces where workflows will be ran -* `ui.enableWebConsole`: Enables ability to SSH into pod using web UI * `minio.install`: If this is true, we'll install [minio](https://github.com/kubernetes/charts/tree/master/stable/minio) and build out the artifactRepository section in workflow controller config map. * `artifactRepository.s3.accessKeySecret` and `artifactRepository.s3.secretKeySecret` These by default link to minio default credentials stored in the secret deployed by the minio chart. diff --git a/charts/argo/templates/NOTES.txt b/charts/argo/templates/NOTES.txt index 6fc97d57..6a15d44b 100644 --- a/charts/argo/templates/NOTES.txt +++ b/charts/argo/templates/NOTES.txt @@ -1,14 +1,11 @@ -1. Make sure Workflow CRD is created by running: - -echo '{"apiVersion": "apiextensions.k8s.io/v1beta1","kind": "CustomResourceDefinition", "metadata": {"name": "workflows.argoproj.io"}, - "spec": {"group": "argoproj.io","names": - {"kind": "Workflow","listKind": "WorkflowList","plural": "workflows","shortNames": ["wf"],"singular": "workflow"}, "scope": "Namespaced","version": "v1alpha1"}}' \ -| kubectl create -f - - -2. Get Argo UI external IP/domain by running: +1. Get Argo UI external IP/domain by running: kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-{{ .Values.uiName }} +2. Submit the hello-world workflow by running: + +argo submit https://raw.githubusercontent.com/argoproj/argo/master/examples/hello-world.yaml --watch + {{ if .Values.minio.install }} 3. Access Minio UI and create bucket '{{ .Values.minio.defaultBucket.name }}'. Minio UI is available on port 9000 and available via external URL. URL might be retrieved using following diff --git a/charts/argo/templates/_helpers.tpl b/charts/argo/templates/_helpers.tpl index 2e375b59..f0d83d2e 100644 --- a/charts/argo/templates/_helpers.tpl +++ b/charts/argo/templates/_helpers.tpl @@ -14,23 +14,3 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} - -{{- define "workflow-crd-json" }} -{ - "apiVersion": "apiextensions.k8s.io/v1beta1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "workflows.argoproj.io" - }, - "spec": { - "group": "argoproj.io", - "names": { - "kind": "Workflow", - "plural": "workflows", - "shortNames": ["wf"] - }, - "scope": "Namespaced", - "version": "v1alpha1" - } -} -{{- end}} diff --git a/charts/argo/templates/_workflow-crd.tpl b/charts/argo/templates/_workflow-crd.tpl deleted file mode 100644 index 29bc2b27..00000000 --- a/charts/argo/templates/_workflow-crd.tpl +++ /dev/null @@ -1,19 +0,0 @@ -{{- define "workflow-crd-json" }} -{ - "apiVersion": "apiextensions.k8s.io/v1beta1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "workflows.argoproj.io" - }, - "spec": { - "group": "argoproj.io", - "names": { - "kind": "Workflow", - "plural": "workflows", - "shortNames": ["wf"] - }, - "scope": "Namespaced", - "version": "v1alpha1" - } -} -{{- end}} diff --git a/charts/argo/templates/apply-workflow-crd-job.yaml b/charts/argo/templates/apply-workflow-crd-job.yaml deleted file mode 100644 index eb656d4a..00000000 --- a/charts/argo/templates/apply-workflow-crd-job.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Release.Name }}-apply-workflow-crd - annotations: - helm.sh/hook: pre-install - helm.sh/hook-delete-policy: hook-succeeded -spec: - backoffLimit: 5 - activeDeadlineSeconds: 100 - template: - spec: - serviceAccountName: {{ .Values.init.serviceAccount | quote }} - containers: - - name: kubectl-apply - image: lachlanevenson/k8s-kubectl - command: ["/bin/sh"] - args: ["-c", 'echo ''{{- include "workflow-crd-json" .}}'' | kubectl apply -f -'] - restartPolicy: Never diff --git a/charts/argo/templates/ui-deployment.yaml b/charts/argo/templates/ui-deployment.yaml index 0ed78888..fd8b1608 100644 --- a/charts/argo/templates/ui-deployment.yaml +++ b/charts/argo/templates/ui-deployment.yaml @@ -24,7 +24,10 @@ spec: env: - name: IN_CLUSTER value: "true" - {{- if .Values.ui.enableWebConsole }} - - name: ENABLE_WEB_CONSOLE - value: "true" - {{- end }} + - name: ARGO_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: BASE_HREF + value: / \ No newline at end of file diff --git a/charts/argo/templates/workflow-controller-clusterrole.yaml b/charts/argo/templates/workflow-controller-clusterrole.yaml index 35451f3e..db17f777 100644 --- a/charts/argo/templates/workflow-controller-clusterrole.yaml +++ b/charts/argo/templates/workflow-controller-clusterrole.yaml @@ -15,6 +15,7 @@ rules: - watch - update - patch + - delete - apiGroups: - "" resources: @@ -34,9 +35,11 @@ rules: - argoproj.io resources: - workflows + - workflows/finalizers verbs: - get - list - watch - update - patch + - delete \ No newline at end of file diff --git a/charts/argo/templates/workflow-controller-config-map.yaml b/charts/argo/templates/workflow-controller-config-map.yaml index 597d8e35..241fbdee 100644 --- a/charts/argo/templates/workflow-controller-config-map.yaml +++ b/charts/argo/templates/workflow-controller-config-map.yaml @@ -31,4 +31,3 @@ data: endpoint: {{ .Values.artifactRepository.s3.endpoint | default (printf "%s-%s" .Release.Name "minio:9000") }} insecure: {{ .Values.artifactRepository.s3.insecure }} {{- end}} - executorImage: "{{ .Values.images.namespace }}/{{ .Values.images.executor }}:{{ .Values.images.tag }}" diff --git a/charts/argo/templates/workflow-controller-deployment.yaml b/charts/argo/templates/workflow-controller-deployment.yaml index 9f5d8da0..ea151b21 100644 --- a/charts/argo/templates/workflow-controller-deployment.yaml +++ b/charts/argo/templates/workflow-controller-deployment.yaml @@ -26,6 +26,8 @@ spec: args: - "--configmap" - "{{ .Release.Name }}-{{ .Values.controller.name}}-configmap" + - "--executor-image" + - "{{ .Values.images.namespace }}/{{ .Values.images.executor }}:{{ .Values.images.tag }}" - "--loglevel" - "{{ .Values.controller.logging.level }}" - "--gloglevel" diff --git a/charts/argo/templates/workflow-crd.yaml b/charts/argo/templates/workflow-crd.yaml new file mode 100644 index 00000000..f65e5d14 --- /dev/null +++ b/charts/argo/templates/workflow-crd.yaml @@ -0,0 +1,15 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: workflows.argoproj.io + annotations: + helm.sh/hook: crd-install +spec: + group: argoproj.io + version: v1alpha1 + scope: Namespaced + names: + kind: Workflow + plural: workflows + shortNames: + - wf diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index abd9c628..bb0985fa 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -3,7 +3,7 @@ images: controller: workflow-controller ui: argoui executor: argoexec - tag: v2.1.1 + tag: v2.2.1 crdVersion: v1alpha1 @@ -35,8 +35,6 @@ ui: # optional map of annotations to be applied to the ui Pods podAnnotations: {} name: ui - # Enables ability to SSH into pod using web UI - enableWebConsole: false serviceType: ClusterIP servicePort: 80 serviceAccount: argo-ui