mirror of
https://github.com/Thumbscrew/k8s-charts.git
synced 2025-04-24 08:29:52 +00:00
add persistence and service annotations
This commit is contained in:
parent
e02c2087da
commit
afbb940694
@ -66,6 +66,17 @@ spec:
|
||||
value: {{ .Values.config.jvmMemory.limit }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: unifi-config
|
||||
mountPath: /config
|
||||
volumes:
|
||||
- name: unifi-config
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "unifi-controller.fullname" . }}-pvc{{- end }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
32
charts/unifi-controller/templates/pvc.yaml
Normal file
32
charts/unifi-controller/templates/pvc.yaml
Normal file
@ -0,0 +1,32 @@
|
||||
{{- if .Values.persistence.enabled -}}
|
||||
{{- if not .Values.persistence.existingClaim -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "unifi-controller.fullname" . }}-pvc
|
||||
labels:
|
||||
{{- include "unifi-controller.labels" . | nindent 4 }}
|
||||
# app.kubernetes.io/name: {{ include "unifi-controller.name" . }}
|
||||
# helm.sh/chart: {{ include "unifi-controller.chart" . }}
|
||||
# app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
# app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
# app.kubernetes.io/component: app
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.persistence.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
@ -2,6 +2,10 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "unifi-controller.fullname" . }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "unifi-controller.labels" . | nindent 4 }}
|
||||
spec:
|
||||
|
@ -18,6 +18,14 @@ config:
|
||||
startup: default
|
||||
limit: default
|
||||
|
||||
persistence:
|
||||
enabled: false
|
||||
existingClaim: ""
|
||||
annotations: {}
|
||||
accessMode: ReadWriteOnce
|
||||
storageClass: ""
|
||||
size: 1Gi
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
@ -42,6 +50,7 @@ securityContext: {}
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
annotations: {}
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
|
Loading…
Reference in New Issue
Block a user