add ports

This commit is contained in:
James 2023-03-14 21:07:11 +00:00
parent 808c970b78
commit 9a72eef374
3 changed files with 43 additions and 15 deletions

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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