feat: Update Argo Chart to support v2.6 ()

pull/257/head^2
Pablo Osinaga 2020-03-07 18:08:28 +01:00 committed by GitHub
parent 8caf81a4ef
commit b3fa82df77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 271 additions and 162 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v1
appVersion: "v2.4.3"
appVersion: "v2.6.1"
description: A Helm chart for Argo Workflows
name: argo
version: 0.6.8
version: 0.7.0
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
home: https://github.com/argoproj/argo-helm
maintainers:

View File

@ -0,0 +1,17 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cronworkflows.argoproj.io
annotations:
helm.sh/hook: crd-install
helm.sh/hook-delete-policy: before-hook-creation
spec:
group: argoproj.io
names:
kind: CronWorkflow
plural: cronworkflows
shortNames:
- cronwf
- cwf
scope: Namespaced
version: v1alpha1

View File

@ -6,11 +6,21 @@ metadata:
helm.sh/hook: crd-install
helm.sh/hook-delete-policy: before-hook-creation
spec:
additionalPrinterColumns:
- JSONPath: .status.phase
description: Status of the workflow
name: Status
type: string
- JSONPath: .status.startedAt
description: When the workflow was started
format: date-time
name: Age
type: date
group: argoproj.io
version: v1alpha1
scope: Namespaced
names:
kind: Workflow
plural: workflows
shortNames:
- wf
scope: Namespaced
version: v1alpha1

View File

@ -1,6 +1,6 @@
1. Get Argo UI external IP/domain by running:
1. Get Argo Server external IP/domain by running:
kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-{{ .Values.uiName }}
kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-{{ .Values.server.name }}
2. Submit the hello-world workflow by running:

View File

@ -0,0 +1,19 @@
{{- if .Values.installCRD }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cronworkflows.argoproj.io
annotations:
helm.sh/hook: crd-install
helm.sh/hook-delete-policy: before-hook-creation
spec:
group: argoproj.io
names:
kind: CronWorkflow
plural: cronworkflows
shortNames:
- cronwf
- cwf
scope: Namespaced
version: v1alpha1
{{- end }}

View File

@ -1,9 +1,23 @@
{{- if .Values.ui.enabled }}
{{- if .Values.server.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name}}-cluster-role
name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
@ -25,8 +39,13 @@ rules:
resources:
- workflows
- workflowtemplates
- cronworkflows
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
{{- end }}

View File

@ -1,14 +1,14 @@
{{- if .Values.ui.enabled -}}
{{- if .Values.server.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name}}-crb
name: {{ .Release.Name }}-{{ .Values.server.name}}-crb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Release.Name }}-{{ .Values.ui.name}}-cluster-role
name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-role
subjects:
- kind: ServiceAccount
name: {{ .Values.ui.serviceAccount }}
name: {{ .Values.server.serviceAccount }}
namespace: {{ .Release.Namespace }}
{{- end -}}

View File

@ -0,0 +1,25 @@
{{- if .Values.server.enabled -}}
{{- if .Values.server.pdb.enabled -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ .Release.Name }}-{{ .Values.server.name}}
labels:
app: {{ .Release.Name }}-{{ .Values.server.name}}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.server.pdb.minAvailable }}
minAvailable: {{ .Values.server.pdb.minAvailable }}
{{- else if .Values.server.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.server.pdb.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Values.server.name}}
release: {{ .Release.Name }}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,78 @@
{{- if .Values.server.enabled -}}apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Values.server.name}}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.server.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Values.server.name}}
release: {{ .Release.Name }}
app: {{ .Release.Name }}-{{ .Values.server.name}}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Values.server.name}}
release: {{ .Release.Name }}
{{- if .Values.server.podLabels }}
{{- toYaml .Values.server.podLabels | nindent 8 }}
{{- end }}
{{- if .Values.server.podAnnotations }}
annotations:
{{ toYaml .Values.server.podAnnotations | indent 8}}{{- end }}
spec:
serviceAccountName: {{ .Values.server.serviceAccount | quote }}
containers:
- name: argo-server
args:
- server
image: "{{ .Values.images.namespace }}/{{ .Values.images.server }}:{{ default .Values.images.tag .Values.server.image.tag }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
{{- if .Values.server.podPortName }}
ports:
- name: {{ .Values.server.podPortName }}
ports:
containerPort: 2746
readinessProbe:
httpGet:
path: /
port: 2746
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 20
{{- end }}
env:
{{- if .Values.server.forceNamespaceIsolation }}
- name: FORCE_NAMESPACE_ISOLATION
value: "true"
{{- end }}
- name: IN_CLUSTER
value: "true"
- name: ARGO_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: BASE_HREF
value: /
resources:
{{- toYaml .Values.server.resources | nindent 12 }}
{{- with .Values.server.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.server.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.server.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end -}}

View File

@ -1,22 +1,22 @@
{{- if .Values.ui.enabled -}}
{{- if .Values.ui.ingress.enabled -}}
{{- $serviceName := printf "%s-%s" .Release.Name .Values.ui.name -}}
{{- $servicePort := .Values.ui.servicePort -}}
{{- if .Values.server.enabled -}}
{{- if .Values.server.ingress.enabled -}}
{{- $serviceName := printf "%s-%s" .Release.Name .Values.server.name -}}
{{- $servicePort := .Values.server.servicePort -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name }}
name: {{ .Release.Name }}-{{ .Values.server.name }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{- range $key, $value := .Values.ui.ingress.annotations }}
{{- range $key, $value := .Values.server.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range .Values.ui.ingress.hosts }}
{{- range .Values.server.ingress.hosts }}
- host: {{ . }}
http:
paths:
@ -24,9 +24,9 @@ spec:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end -}}
{{- if .Values.ui.ingress.tls }}
{{- if .Values.server.ingress.tls }}
tls:
{{ toYaml .Values.ui.ingress.tls | indent 4 }}
{{ toYaml .Values.server.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,6 @@
{{- if .Values.server.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.server.serviceAccount }}
{{- end -}}

View File

@ -0,0 +1,33 @@
{{- if .Values.server.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-{{ .Values.server.name }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.server.serviceLabels }}
{{- toYaml .Values.server.serviceLabels | nindent 4 }}
{{- end }}
{{- if .Values.server.serviceAnnotations }}
annotations:
{{ toYaml .Values.server.serviceAnnotations | indent 4}}{{- end }}
spec:
ports:
- port: {{ .Values.server.servicePort }}
{{- if .Values.server.servicePortName }}
name: {{ .Values.server.servicePortName }}
{{- end }}
targetPort: 2746
selector:
app: {{ .Release.Name }}-{{ .Values.server.name }}
sessionAffinity: None
type: {{ .Values.server.serviceType }}
{{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerIP }}
loadBalancerIP: {{ .Values.server.loadBalancerIP | quote }}
{{- end }}
{{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.server.loadBalancerSourceRanges | indent 4 }}{{- end }}
{{- end -}}

View File

@ -1,25 +0,0 @@
{{- if .Values.ui.enabled -}}
{{- if .Values.ui.pdb.enabled -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name}}
labels:
app: {{ .Release.Name }}-{{ .Values.ui.name}}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.ui.pdb.minAvailable }}
minAvailable: {{ .Values.ui.pdb.minAvailable }}
{{- else if .Values.ui.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.ui.pdb.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Values.ui.name}}
release: {{ .Release.Name }}
{{- end -}}
{{- end -}}

View File

@ -1,68 +0,0 @@
{{- if .Values.ui.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name}}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.ui.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Values.ui.name}}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Values.ui.name}}
release: {{ .Release.Name }}
{{- if .Values.ui.podLabels }}
{{- toYaml .Values.ui.podLabels | nindent 8 }}
{{- end }}
{{- if .Values.ui.podAnnotations }}
annotations:
{{ toYaml .Values.ui.podAnnotations | indent 8}}{{- end }}
spec:
serviceAccountName: {{ .Values.ui.serviceAccount | quote }}
containers:
- name: ui
image: "{{ .Values.images.namespace }}/{{ .Values.images.ui }}:{{ default .Values.images.tag .Values.ui.image.tag }}"
imagePullPolicy: {{ .Values.images.pullPolicy }}
{{- if .Values.ui.podPortName }}
ports:
- name: {{ .Values.ui.podPortName }}
containerPort: 8001
protocol: TCP
{{- end }}
env:
{{- if .Values.ui.forceNamespaceIsolation }}
- name: FORCE_NAMESPACE_ISOLATION
value: "true"
{{- end }}
- name: IN_CLUSTER
value: "true"
- name: ARGO_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: BASE_HREF
value: /
resources:
{{- toYaml .Values.ui.resources | nindent 12 }}
{{- with .Values.ui.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ui.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ui.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end -}}

View File

@ -1,6 +0,0 @@
{{- if .Values.ui.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.ui.serviceAccount }}
{{- end -}}

View File

@ -1,34 +0,0 @@
{{- if .Values.ui.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-{{ .Values.ui.name }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.ui.serviceLabels }}
{{- toYaml .Values.ui.serviceLabels | nindent 4 }}
{{- end }}
{{- if .Values.ui.serviceAnnotations }}
annotations:
{{ toYaml .Values.ui.serviceAnnotations | indent 4}}{{- end }}
spec:
ports:
- port: {{ .Values.ui.servicePort }}
{{- if .Values.ui.servicePortName }}
name: {{ .Values.ui.servicePortName }}
{{- end }}
protocol: TCP
targetPort: 8001
selector:
app: {{ .Release.Name }}-{{ .Values.ui.name }}
sessionAffinity: None
type: {{ .Values.ui.serviceType }}
{{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerIP }}
loadBalancerIP: {{ .Values.ui.loadBalancerIP | quote }}
{{- end }}
{{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }}
{{- end -}}

View File

@ -16,6 +16,8 @@ rules:
- workflows/finalizers
- workflowtemplates
- workflowtemplates/finalizers
- cronworkflows
- cronworkflows/finalizers
verbs:
- get
- list
@ -38,6 +40,8 @@ rules:
- workflows/finalizers
- workflowtemplates
- workflowtemplates/finalizers
- cronworkflows
- cronworkflows/finalizers
verbs:
- create
- delete
@ -65,6 +69,8 @@ rules:
- workflows/finalizers
- workflowtemplates
- workflowtemplates/finalizers
- cronworkflows
- cronworkflows/finalizers
verbs:
- create
- delete

View File

@ -43,6 +43,7 @@ rules:
- update
- patch
- delete
- create
- apiGroups:
- argoproj.io
resources:
@ -52,6 +53,24 @@ rules:
- get
- list
- watch
- apiGroups:
- argoproj.io
resources:
- cronworkflows
- cronworkflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- ""
resources:

View File

@ -7,12 +7,22 @@ metadata:
helm.sh/hook: crd-install
helm.sh/hook-delete-policy: before-hook-creation
spec:
additionalPrinterColumns:
- JSONPath: .status.phase
description: Status of the workflow
name: Status
type: string
- JSONPath: .status.startedAt
description: When the workflow was started
format: date-time
name: Age
type: date
group: argoproj.io
version: v1alpha1
scope: Namespaced
names:
kind: Workflow
plural: workflows
shortNames:
- wf
scope: Namespaced
version: v1alpha1
{{- end }}

View File

@ -1,10 +1,10 @@
images:
namespace: argoproj
controller: workflow-controller
ui: argoui
server: argocli
executor: argoexec
pullPolicy: Always
tag: v2.4.3
tag: v2.6.1
crdVersion: v1alpha1
installCRD: true
@ -100,7 +100,7 @@ executor:
# Overrides .images.tag if defined.
tag: ""
ui:
server:
enabled: true
# only show workflows where UI installed
forceNamespaceIsolation: false
@ -111,11 +111,11 @@ ui:
podAnnotations: {}
# Optional labels to add to the UI pods
podLabels: {}
name: ui
name: server
serviceType: ClusterIP
servicePort: 80
servicePort: 2746
# servicePortName: http
serviceAccount: argo-ui
serviceAccount: argo-server
# Annotations to be applied to the UI Service
serviceAnnotations: {}
# Optional labels to add to the UI Service