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: labels:
{{- include "unifi-controller.labels" . | nindent 4 }} {{- include "unifi-controller.labels" . | nindent 4 }}
spec: spec:
{{- if not .Values.autoscaling.enabled }} replicas: 1
replicas: {{ .Values.replicaCount }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "unifi-controller.selectorLabels" . | nindent 6 }} {{- include "unifi-controller.selectorLabels" . | nindent 6 }}
@ -35,16 +33,30 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
ports: ports:
- name: http - name: http
containerPort: {{ .Values.service.port }} containerPort: 8080
protocol: TCP protocol: TCP
livenessProbe: - name: https
httpGet: containerPort: 8443
path: / protocol: TCP
port: http - name: stun
readinessProbe: containerPort: 3478
httpGet: protocol: UDP
path: / - name: l2discover
port: http 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: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}

View File

@ -7,9 +7,25 @@ metadata:
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
- port: {{ .Values.service.port }} - port: 8080
targetPort: http targetPort: 8080
protocol: TCP protocol: TCP
name: http 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: selector:
{{- include "unifi-controller.selectorLabels" . | nindent 4 }} {{- include "unifi-controller.selectorLabels" . | nindent 4 }}

View File

@ -11,5 +11,5 @@ spec:
- name: wget - name: wget
image: busybox image: busybox
command: ['wget'] command: ['wget']
args: ['{{ include "unifi-controller.fullname" . }}:{{ .Values.service.port }}'] args: ['{{ include "unifi-controller.fullname" . }}:8080']
restartPolicy: Never restartPolicy: Never