charts/unifi/templates/deployment.yaml

99 lines
3.0 KiB
YAML
Raw Normal View History

2018-06-30 03:18:07 +00:00
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "unifi.fullname" . }}
labels:
app: {{ template "unifi.name" . }}
chart: {{ template "unifi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "unifi.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "unifi.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: https-gui
containerPort: 8443
2018-09-11 14:29:08 +00:00
protocol: TCP
- name: controller
containerPort: 8080
2018-09-11 14:29:08 +00:00
protocol: TCP
- name: discovery
containerPort: 10001
2018-09-11 14:29:08 +00:00
protocol: UDP
- name: stun
containerPort: 3478
2018-09-11 14:29:08 +00:00
protocol: UDP
2018-08-02 03:19:40 +00:00
livenessProbe:
httpGet:
path: /status
port: https-gui
2018-08-02 03:19:40 +00:00
scheme: HTTPS
initialDelaySeconds: 30
readinessProbe:
httpGet:
path: /status
port: https-gui
2018-08-02 03:19:40 +00:00
scheme: HTTPS
initialDelaySeconds: 15
2018-06-30 03:18:07 +00:00
env:
- name: TZ
value: "{{ .Values.timezone }}"
- name: RUNAS_UID0
2018-09-11 14:29:08 +00:00
value: "{{ .Values.runAsRoot }}"
2018-06-30 03:18:07 +00:00
{{- if .Values.mongodb.enabled }}
- name: DB_URI
2018-09-11 14:29:08 +00:00
value: "{{ .Values.mongodb.dbUri }}"
2018-06-30 03:18:07 +00:00
- name: STATDB_URI
2018-09-11 14:29:08 +00:00
value: "{{ .Values.mongodb.statDbUri }}"
2018-06-30 03:18:07 +00:00
- name: DB_NAME
2018-09-11 14:29:08 +00:00
value: "{{ .Values.mongodb.databaseName }}"
2018-06-30 03:18:07 +00:00
{{- end }}
volumeMounts:
2018-09-11 14:29:08 +00:00
- mountPath: /unifi/data
name: unifi-data
subPath: data
- mountPath: /unifi/log
name: unifi-data
subPath: log
- mountPath: /unifi/cert
name: unifi-data
subPath: cert
- mountPath: /unifi/init.d
name: unifi-data
subPath: init.d
2018-06-30 03:18:07 +00:00
resources:
{{ toYaml .Values.resources | indent 12 }}
volumes:
2018-09-11 14:29:08 +00:00
- name: unifi-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "unifi.fullname" . }}{{- end }}
{{- else }}
emptyDir: {}
{{ end }}
2018-06-30 03:18:07 +00:00
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}