* feat(argo-rollouts): deployment annotations for controller, dashboard Signed-off-by: Michael Weber <michael.weber@jumpcloud.com> * chore: Apply changes from code review Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> --------- Signed-off-by: Michael Weber <michael.weber@jumpcloud.com> Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
100 lines
3.6 KiB
YAML
100 lines
3.6 KiB
YAML
{{- if .Values.dashboard.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.dashboard.deploymentAnnotations) }}
|
|
annotations:
|
|
{{- range $key, $value := . }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
name: {{ include "argo-rollouts.fullname" . }}-dashboard
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels:
|
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
|
strategy:
|
|
type: Recreate
|
|
replicas: {{ .Values.dashboard.replicas }}
|
|
template:
|
|
metadata:
|
|
{{- with (mergeOverwrite (deepCopy .Values.podAnnotations) .Values.dashboard.podAnnotations) }}
|
|
annotations:
|
|
{{- range $key, $value := . }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "argo-rollouts.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
|
{{- range $key, $value := .Values.podLabels }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "argo-rollouts.serviceAccountName" . }}-dashboard
|
|
containers:
|
|
- image: "{{ .Values.dashboard.image.registry }}/{{ .Values.dashboard.image.repository }}:{{ default .Chart.AppVersion .Values.dashboard.image.tag }}"
|
|
imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }}
|
|
args:
|
|
{{- with .Values.dashboard.extraArgs }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.dashboard.extraEnv }}
|
|
env:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
name: argo-rollouts-dashboard
|
|
ports:
|
|
- containerPort: {{ .Values.dashboard.service.targetPort }}
|
|
name: dashboard
|
|
securityContext:
|
|
{{- toYaml .Values.dashboard.containerSecurityContext | nindent 10 }}
|
|
resources:
|
|
{{- toYaml .Values.dashboard.resources | nindent 10 }}
|
|
{{- with .Values.dashboard.volumeMounts }}
|
|
volumeMounts:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.dashboard.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml .Values.dashboard.nodeSelector | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.dashboard.podSecurityContext | nindent 8 }}
|
|
{{- if .Values.dashboard.tolerations }}
|
|
tolerations:
|
|
{{- toYaml .Values.dashboard.tolerations | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.dashboard.affinity }}
|
|
affinity:
|
|
{{- toYaml .Values.dashboard.affinity | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.dashboard.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- range $constraint := . }}
|
|
- {{ toYaml $constraint | nindent 8 | trim }}
|
|
{{- if not $constraint.labelSelector }}
|
|
labelSelector:
|
|
matchLabels:
|
|
{{- include "argo-rollouts.selectorLabels" $ | nindent 12 }}
|
|
app.kubernetes.io/component: {{ $.Values.dashboard.component }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.dashboard.priorityClassName }}
|
|
priorityClassName: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.dashboard.volumes }}
|
|
volumes:
|
|
{{- toYaml . | nindent 6 }}
|
|
{{- end }}
|
|
{{- end }}
|