k8s-charts/charts/unifi-controller/templates/deployment.yaml
2023-03-14 21:16:27 +00:00

81 lines
2.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "unifi-controller.fullname" . }}
labels:
{{- include "unifi-controller.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "unifi-controller.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "unifi-controller.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "unifi-controller.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
protocol: TCP
- name: https
containerPort: 8443
protocol: TCP
- name: stun
containerPort: 3478
protocol: UDP
- name: l2discover
containerPort: 1900
protocol: UDP
- name: syslog
containerPort: 5514
protocol: UDP
# livenessProbe:
# httpGet:
# path: /
# port: http
# initialDelaySeconds: 30
# readinessProbe:
# httpGet:
# path: /
# port: http
# initialDelaySeconds: 120
env:
- name: TZ
value: {{ .Values.config.timezone }}
- name: MEM_STARTUP
value: {{ .Values.config.jvmMemory.startup }}
- name: MEM_LIMIT
value: {{ .Values.config.jvmMemory.limit }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}