Be able to define extra configuration in argo (#100)

This commit is contained in:
Sam Wyma 2019-09-23 16:49:13 +01:00 committed by Alex Collins
parent 10ea33f7d1
commit d135aa72dd
8 changed files with 96 additions and 3 deletions

View file

@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "v2.3.0"
description: A Helm chart for Argo Workflows
name: argo
version: 0.5.2
version: 0.5.3

View file

@ -0,0 +1,25 @@
{{- 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

@ -8,6 +8,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.ui.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Values.ui.name}}
@ -17,6 +18,9 @@ spec:
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 }}
@ -26,6 +30,12 @@ spec:
- 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

View file

@ -7,12 +7,18 @@ metadata:
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:

View file

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

View file

@ -8,6 +8,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Values.controller.name}}
@ -17,6 +18,9 @@ spec:
labels:
app: {{ .Release.Name }}-{{ .Values.controller.name}}
release: {{ .Release.Name }}
{{- if .Values.controller.podLabels }}
{{ toYaml .Values.controller.podLabels | nindent 8}}
{{- end }}
{{- if .Values.controller.podAnnotations }}
annotations:
{{ toYaml .Values.controller.podAnnotations | indent 8}}{{- end }}

View file

@ -8,19 +8,22 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.controller.serviceLabels }}
{{ toYaml .Values.controller.serviceLabels | nindent 4}}
{{- end }}
{{- if .Values.controller.serviceAnnotations }}
annotations:
{{ toYaml .Values.controller.serviceAnnotations | indent 4}}{{- end }}
spec:
ports:
{{- if .Values.controller.metricsConfig.enabled }}
- name: metrics
- name: {{ .Values.controller.metricsServicePortName }}
port: {{ .Values.controller.metricsServicePort }}
protocol: TCP
targetPort: {{ .Values.controller.metricsConfig.port }}
{{- end }}
{{- if .Values.controller.telemetryConfig.enabled }}
- name: telemetry
- name: {{ .Values.controller.telemetryServicePortName }}
port: {{ .Values.controller.telemetryServicePort }}
protocol: TCP
targetPort: {{ .Values.controller.telemetryConfig.port }}

View file

@ -21,6 +21,9 @@ controller:
tag: ""
# podAnnotations is an optional map of annotations to be applied to the controller Pods
podAnnotations: {}
# Optional labels to add to the controller pods
podLabels: {}
# podPortName: http
metricsConfig:
enabled: false
path: /metrics
@ -50,13 +53,22 @@ controller:
globallevel: "0"
serviceType: ClusterIP
metricsServicePort: 8080
metricsServicePortName: metrics
telemetryServicePort: 8081
telemetryServicePortName: telemetry
# Annotations to be applied to the controller Service
serviceAnnotations: {}
# Optional labels to add to the controller Service
serviceLabels: {}
# Source ranges to allow access to service from. Only applies to
# service type `LoadBalancer`
loadBalancerSourceRanges: []
resources: {}
replicas: 1
pdb:
enabled: false
# minAvailable: 1
# maxUnavailable: 1
executor:
image:
@ -72,12 +84,17 @@ ui:
tag: ""
# optional map of annotations to be applied to the ui Pods
podAnnotations: {}
# Optional labels to add to the UI pods
podLabels: {}
name: ui
serviceType: ClusterIP
servicePort: 80
# servicePortName: http
serviceAccount: argo-ui
# Annotations to be applied to the UI Service
serviceAnnotations: {}
# Optional labels to add to the UI Service
serviceLabels: {}
# Static IP address to assign to loadBalancer
# service type `LoadBalancer`
loadBalancerIP: ""
@ -85,6 +102,11 @@ ui:
# service type `LoadBalancer`
loadBalancerSourceRanges: []
resources: {}
replicas: 1
pdb:
enabled: false
# minAvailable: 1
# maxUnavailable: 1
## Ingress configuration.
## ref: https://kubernetes.io/docs/user-guide/ingress/