diff --git a/charts/argo/README.md b/charts/argo/README.md index d9ec2be3..7e7f4288 100644 --- a/charts/argo/README.md +++ b/charts/argo/README.md @@ -3,14 +3,6 @@ This chart is used to set up argo and it's needed dependencies through one comma If you want your deployment of this helm chart to most closely match the [argo CLI](https://github.com/argoproj/argo), you should deploy it in the `kube-system` namespace. -## Pre-Requisites -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` -- 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 - ## Usage Notes: This chart defaults to setting the `controller.instanceID.enabled` to `false` now, which means the deployed controller will act upon any workflow deployed to the cluster. If you would like to limit the behavior and deploy multiple workflow controllers, please use the `controller.instanceID.enabled` attribute along with one of it's configuration options to set the `instanceID` of the workflow controller to be properly scoped for your needs. @@ -25,4 +17,3 @@ Fields to note: * `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 4fc67e30..517a6896 100644 --- a/charts/argo/templates/NOTES.txt +++ b/charts/argo/templates/NOTES.txt @@ -1,17 +1,10 @@ -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 get services -o wide | grep {{ .Release.Name }}-{{ .Values.uiName }} {{ 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 +2. 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 command: kubectl get services -o wide | grep {{ .Release.Name }}-minio-svc 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/workflow-crd.yaml b/charts/argo/templates/workflow-crd.yaml new file mode 100644 index 00000000..6ad2171c --- /dev/null +++ b/charts/argo/templates/workflow-crd.yaml @@ -0,0 +1,20 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: workflows.argoproj.io + labels: + app: {{ .Chart.Name }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + helm.sh/hook: crd-install +spec: + group: argoproj.io + version: v1alpha1 + scope: Namespaced + names: + kind: Workflow + plural: workflows + shortNames: + - wf