argocd-helm/charts/argo-events/templates/eventbus-controller-deployment.yaml
Calum MacRae b862c6239f
feat(argo-events): Ability to specify custom env variables (#516)
* feat(argo-events): Add debugLogging value for controller components

Signed-off-by: Calum MacRae <hi@cmacr.ae>

* fix: quote strings

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

* Rework to generic extraEnv

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

* Fix chart icon url

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2021-08-08 00:43:28 +02:00

81 lines
3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Values.eventbusController.name }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name }}-{{ .Values.eventbusController.name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.eventbusController.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Values.eventbusController.name }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Values.eventbusController.name }}
release: {{ .Release.Name }}
{{- with .Values.eventbusController.podLabels }}
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.eventbusController.podAnnotations }}
annotations: {{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount }}
containers:
- name: {{ .Values.eventbusController.name }}
image: "{{ .Values.registry }}/{{ .Values.eventbusController.image }}:{{ .Values.eventbusController.tag }}"
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.singleNamespace }}
args:
- --namespaced
{{- end }}
env:
{{- with .Values.eventbusController.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NATS_STREAMING_IMAGE
value: {{ .Values.eventbusController.natsStreamingImage }}
- name: NATS_METRICS_EXPORTER_IMAGE
value: {{ .Values.eventbusController.natsMetricsExporterImage }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
resources: {{- toYaml .Values.eventbusController.resources | nindent 12 }}
{{- with .Values.eventbusController.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
{{- with .Values.securityContext }}
securityContext: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.eventbusController.nodeSelector }}
nodeSelector: {{ toYaml .Values.eventbusController.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.eventbusController.tolerations }}
tolerations: {{ toYaml .Values.eventbusController.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.eventbusController.affinity }}
affinity: {{ toYaml .Values.eventbusController.affinity | nindent 8 }}
{{- end }}