77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
{{- if .Values.worker.enabled -}}
|
|
{{- if .Values.beat.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "django.fullname" . }}-beat
|
|
labels:
|
|
{{- include "django.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: beat
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
{{- include "django.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: beat
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
|
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
|
tag: "{{ .Values.image.tag }}"
|
|
labels:
|
|
{{- include "django.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: beat
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
{{- if .Values.beat.args }}
|
|
args: {{- toYaml .Values.beat.args | nindent 10}}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
resources:
|
|
limits:
|
|
cpu: 50m
|
|
memory: 96Mi
|
|
requests:
|
|
cpu: 1m
|
|
memory: 32Mi
|
|
env:
|
|
- name: SERVER_ROLE
|
|
value: "beat"
|
|
{{- if .Values.postgresql.enabled }}
|
|
- name: DATABASE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "django.postgresql.fullname" . }}
|
|
key: postgres-password
|
|
{{- end }}
|
|
envFrom:
|
|
- secretRef:
|
|
name: {{ include "django.fullname" . }}
|
|
- configMapRef:
|
|
name: {{ include "django.fullname" . }}
|
|
{{- with .Values.beat.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.beat.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.beat.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|