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

@ -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 }}