diff --git a/charts/unifi-controller/templates/deployment.yaml b/charts/unifi-controller/templates/deployment.yaml index 22d09be..736c07c 100644 --- a/charts/unifi-controller/templates/deployment.yaml +++ b/charts/unifi-controller/templates/deployment.yaml @@ -5,9 +5,7 @@ metadata: labels: {{- include "unifi-controller.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} + replicas: 1 selector: matchLabels: {{- include "unifi-controller.selectorLabels" . | nindent 6 }} @@ -35,16 +33,30 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http - containerPort: {{ .Values.service.port }} + containerPort: 8080 protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http + - 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 resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/charts/unifi-controller/templates/service.yaml b/charts/unifi-controller/templates/service.yaml index 2382a97..b04887b 100644 --- a/charts/unifi-controller/templates/service.yaml +++ b/charts/unifi-controller/templates/service.yaml @@ -7,9 +7,25 @@ metadata: spec: type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.port }} - targetPort: http + - port: 8080 + targetPort: 8080 protocol: TCP name: http + - port: 8443 + targetPort: 8443 + protocol: TCP + name: https + - port: 3478 + targetPort: 3478 + protocol: TCP + name: stun + - port: 1900 + targetPort: 1900 + protocol: UDP + name: l2discover + - port: 5514 + targetPort: 5514 + protocol: UDP + name: syslog selector: {{- include "unifi-controller.selectorLabels" . | nindent 4 }} diff --git a/charts/unifi-controller/templates/tests/test-connection.yaml b/charts/unifi-controller/templates/tests/test-connection.yaml index c625799..ea0cb3c 100644 --- a/charts/unifi-controller/templates/tests/test-connection.yaml +++ b/charts/unifi-controller/templates/tests/test-connection.yaml @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "unifi-controller.fullname" . }}:{{ .Values.service.port }}'] + args: ['{{ include "unifi-controller.fullname" . }}:8080'] restartPolicy: Never