argocd-helm/charts/argo/templates/apply-workflow-crd-job.yaml
Lukasz Lempart be46446e0c Parameterize artifact repository settings (#4)
* Parameterize artifact configuration

**What**
- Add parameterization of artifact store configuration

**Why**
Enables configuration of artifact repo secrets or omitting for use with IAM credentials

* Add workflow CRD definition to argo chart

**Why**
The workflow CRD must exist in order for argo to function

* artifactRepository values follow tree structure

* Deploy CRD as a pre-install hook

**What**
Using `lachlanevenson/k8s-kubectl`, which appears to be the most popular, off the shelf container with `kubectl` applied, run a job to apply the `workflow` crd.

**Why**
CRD is not, and cannot, be parameterized with release and so attempting to deploy as a regular template causes failures when installing subsequent releases.
2018-03-23 21:10:05 -07:00

18 lines
No EOL
488 B
YAML

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:
containers:
- name: kubectl-apply
image: lachlanevenson/k8s-kubectl
command: ["/bin/sh"]
args: ["-c", 'echo ''{{- include "workflow-crd-json" .}}'' | kubectl apply -f -']
restartPolicy: Never