149 lines
6 KiB
YAML
149 lines
6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "argo-events.controller.fullname" . }}
|
|
namespace: {{ include "argo-events.namespace" . | quote }}
|
|
labels:
|
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
|
app.kubernetes.io/version: {{ include "argo-events.controller_chart_version_label" . }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "argo-events.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
|
revisionHistoryLimit: 5
|
|
replicas: {{ .Values.controller.replicas }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/argo-events-controller/config.yaml") . | sha256sum }}
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.controller.podAnnotations) }}
|
|
{{- range $key, $value := . }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }}
|
|
app.kubernetes.io/version: {{ include "argo-events.controller_chart_version_label" . }}
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.controller.podLabels) }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.controller.priorityClassName }}
|
|
priorityClassName: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.global.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Values.controller.name }}
|
|
image: {{ default .Values.global.image.repository .Values.controller.image.repository }}:{{ default (include "argo-events.defaultTag" .) .Values.controller.image.tag }}
|
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.controller.image.imagePullPolicy }}
|
|
args:
|
|
- controller
|
|
{{- if .Values.controller.rbac.namespaced }}
|
|
- --namespaced
|
|
{{- end }}
|
|
{{- if .Values.controller.rbac.managedNamespace }}
|
|
- --managed-namespace
|
|
- {{ .Values.controller.rbac.managedNamespace }}
|
|
{{- end }}
|
|
{{- with .Values.controller.containerSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
env:
|
|
- name: ARGO_EVENTS_IMAGE
|
|
value: {{ default .Values.global.image.repository .Values.controller.image.repository }}:{{ default (include "argo-events.defaultTag" .) .Values.controller.image.tag }}
|
|
- name: NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
{{- with .Values.controller.env }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controller.envFrom }}
|
|
envFrom:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/argo-events
|
|
{{- with .Values.controller.volumeMounts }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 7777
|
|
protocol: TCP
|
|
- name: probe
|
|
containerPort: 8081
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
port: probe
|
|
path: /healthz
|
|
initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.controller.livenessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }}
|
|
readinessProbe:
|
|
httpGet:
|
|
port: probe
|
|
path: /readyz
|
|
initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.controller.readinessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }}
|
|
{{- with .Values.controller.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
{{- with .Values.controller.extraContainers }}
|
|
{{- toYaml . | nindent 6 }}
|
|
{{- end -}}
|
|
{{- with .Values.controller.initContainers }}
|
|
initContainers:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controller.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controller.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controller.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controller.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- range $constraint := . }}
|
|
- {{ toYaml $constraint | nindent 8 | trim }}
|
|
{{- if not $constraint.labelSelector }}
|
|
labelSelector:
|
|
matchLabels:
|
|
{{- include "argo-events.selectorLabels" (dict "context" $ "name" $.Values.controller.name) | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "argo-events.controller.serviceAccountName" . }}
|
|
{{- with .Values.global.hostAliases }}
|
|
hostAliases:
|
|
{{- toYaml . | nindent 6 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: {{ include "argo-events.controller.fullname" . }}
|
|
{{- with .Values.controller.volumes }}
|
|
{{- toYaml . | nindent 6 }}
|
|
{{- end }}
|