diff --git a/charts/argo/.gitignore b/charts/argo/.gitignore new file mode 100644 index 00000000..ebf1d3dc --- /dev/null +++ b/charts/argo/.gitignore @@ -0,0 +1 @@ +charts diff --git a/charts/argo/.helmignore b/charts/argo/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/charts/argo/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml new file mode 100644 index 00000000..0c147c64 --- /dev/null +++ b/charts/argo/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +name: argo +version: 0.1.0 diff --git a/charts/argo/requirements.lock b/charts/argo/requirements.lock new file mode 100644 index 00000000..3b7481c2 --- /dev/null +++ b/charts/argo/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: minio + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 0.4.3 +digest: sha256:b67924f37f043c1fa76d5eeae48fc89bfb66d4f181bc470e321db4054959e63e +generated: 2018-01-02T13:30:37.422817-08:00 diff --git a/charts/argo/requirements.yaml b/charts/argo/requirements.yaml new file mode 100644 index 00000000..fd789f07 --- /dev/null +++ b/charts/argo/requirements.yaml @@ -0,0 +1,5 @@ +dependencies: +- name: minio + version: 0.4.3 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: installMinio diff --git a/charts/argo/templates/NOTES.txt b/charts/argo/templates/NOTES.txt new file mode 100644 index 00000000..d86b4b2d --- /dev/null +++ b/charts/argo/templates/NOTES.txt @@ -0,0 +1,19 @@ +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: + +kubectl get services -o wide | grep {{ .Release.Name }}-{{ .Values.uiName }} + +{{ if .Values.installMinio }} + +3. Access Minio UI and create bucket '{{ .Values.minioBucketName }}'. 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 + +{{ end }} diff --git a/charts/argo/templates/_helpers.tpl b/charts/argo/templates/_helpers.tpl new file mode 100644 index 00000000..f0d83d2e --- /dev/null +++ b/charts/argo/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/charts/argo/templates/ui-deployment.yaml b/charts/argo/templates/ui-deployment.yaml new file mode 100644 index 00000000..bf237b6b --- /dev/null +++ b/charts/argo/templates/ui-deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-{{ .Values.uiName}} + labels: + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + template: + metadata: + labels: + app: {{ .Release.Name }}-{{ .Values.uiName}} + release: {{ .Release.Name }} + spec: + containers: + - name: ui + image: "{{ .Values.imagesNamespace }}/{{ .Values.uiImage }}:{{ .Values.imagesTag }}" + env: + - name: IN_CLUSTER + value: "true" diff --git a/charts/argo/templates/ui-service.yaml b/charts/argo/templates/ui-service.yaml new file mode 100644 index 00000000..103167d0 --- /dev/null +++ b/charts/argo/templates/ui-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-{{ .Values.uiName}} + labels: + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 8001 + selector: + app: {{ .Release.Name }}-{{ .Values.uiName}} + sessionAffinity: None + type: LoadBalancer diff --git a/charts/argo/templates/workflow-controller-config-map.yaml b/charts/argo/templates/workflow-controller-config-map.yaml new file mode 100644 index 00000000..030b779b --- /dev/null +++ b/charts/argo/templates/workflow-controller-config-map.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-{{ .Values.controllerName}}-configmap + labels: + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + config: | + artifactRepository: +{{ if .Values.installMinio }} + s3: + accessKeySecret: + key: accesskey + name: {{ .Release.Name }}-minio-user + bucket: {{ .Values.minioBucketName }} + endpoint: {{ .Release.Name }}-minio-svc:9000 + insecure: true + secretKeySecret: + key: secretkey + name: {{ .Release.Name }}-minio-user +{{ end }} + executorImage: "{{ .Values.imagesNamespace }}/{{ .Values.executorImage }}:{{ .Values.imagesTag }}" diff --git a/charts/argo/templates/workflow-controller-deployment.yaml b/charts/argo/templates/workflow-controller-deployment.yaml new file mode 100644 index 00000000..808e57dd --- /dev/null +++ b/charts/argo/templates/workflow-controller-deployment.yaml @@ -0,0 +1,27 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-{{ .Values.controllerName}} + labels: + app: {{ .Release.Name }}-{{ .Values.controllerName}} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + template: + metadata: + labels: + app: {{ .Release.Name }}-{{ .Values.controllerName}} + release: {{ .Release.Name }} + spec: + containers: + - name: controller + image: "{{ .Values.imagesNamespace }}/{{ .Values.controllerImage }}:{{ .Values.imagesTag }}" + command: [ "workflow-controller" ] + args: ["--configmap", "{{ .Release.Name }}-{{ .Values.controllerName}}-configmap"] + env: + - name: ARGO_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml new file mode 100644 index 00000000..832c66d8 --- /dev/null +++ b/charts/argo/values.yaml @@ -0,0 +1,14 @@ +imagesNamespace: argoproj +controllerImage: workflow-controller +uiImage: argoui +imagesTag: latest +controllerName: workflow-controller +enableWebConsole: false +executorImage: argoexec +uiName: ui +crdVersion: v1alpha1 +instanceID: +serviceAccount: + +installMinio: true +minioBucketName: argo-artifacts