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.

122 lines
3.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "omada-controller.fullname" . }}
labels:
{{- include "omada-controller.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "omada-controller.selectorLabels" . | nindent 6 }}
strategy:
type: Recreate
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.env.TZ | quote }}
- name: MANAGE_HTTPS_PORT
value: {{ .Values.env.MANAGE_HTTPS_PORT | quote }}
ports:
- name: manage
containerPort: 8088
protocol: TCP
- name: managessl
containerPort: {{ .Values.env.MANAGE_HTTPS_PORT }}
protocol: TCP
- name: portalssl
containerPort: 8843
protocol: TCP
- name: eapdiscovery
containerPort: 29810
protocol: UDP
- name: eapmanage
containerPort: 29811
protocol: TCP
- name: eapadopt
containerPort: 29812
protocol: TCP
- name: eapupgrade
containerPort: 29813
protocol: TCP
- name: managev2
containerPort: 29814
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: work
mountPath: /opt/tplink/EAPController/work
- name: data
mountPath: /opt/tplink/EAPController/data
- name: logs
mountPath: /opt/tplink/EAPController/logs
{{- if .Values.tlsSecretName }}
- name: tls-certs
mountPath: /cert
readOnly: true
{{- end }}
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 }}
{{- if .Values.tlsSecretName }}
- name: tls-certs
secret:
secretName: {{ .Values.tlsSecretName | quote }}
{{- 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 }}