You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "omada-controller.fullname" . }}
labels:
{{- include "omada-controller.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "omada-controller.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "omada-controller.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "omada-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 }}
env:
- name: TZ
value: {{ .Values.TZ | quote }}
ports:
- name: manage
containerPort: 8088
protocol: TCP
- name: portal
containerPort: 8888
protocol: TCP
livenessProbe:
tcpSocket:
port: 8088
initialDelaySeconds: 60
readinessProbe:
tcpSocket:
port: 8088
initialDelaySeconds: 60
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: work
mountPath: /opt/tplink/EAPController/work
volumeMounts:
- name: data
mountPath: /opt/tplink/EAPController/data
volumeMounts:
- name: logs
mountPath: /opt/tplink/EAPController/logs
volumes:
- name: work
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "omada-controller.fullname" . }}-work
{{- else }}
emptyDir: {}
{{- end }}
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "omada-controller.fullname" . }}-data
{{- else }}
emptyDir: {}
{{- end }}
- name: logs
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "omada-controller.fullname" . }}-logs
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.hostNetwork }}
hostNetwork: {{ .Values.hostNetwork }}
{{- end }}