Add standardized helm chart for appc
[oom.git] / kubernetes / mysql / templates / nfs-provisoner.yaml
1 #{{ if not .Values.disableNfsProvisioner }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
6   namespace: {{ include "common.namespace" . }}
7   labels:
8     app: {{ include "common.name" . }}
9     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
10     release: {{ .Release.Name }}
11     heritage: {{ .Release.Service }}
12 spec:
13   #replicas: {{ .Values.replicaCount }}
14   strategy:
15     type: Recreate
16   template:
17     metadata:
18       labels:
19         app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
20         release: {{ .Release.Name }}
21     spec:
22       containers:
23         - name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
24           image: "{{ .Values.global.nfsprovisionerRepository | default .Values.nfsprovisionerRepository }}/{{ .Values.nfsprovisionerImage }}"
25           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
26           ports:
27             - name: nfs
28               containerPort: {{ .Values.service.nfsPort }}
29             - name: mountd
30               containerPort: {{ .Values.service.mountdPort }}
31             - name: rpcbind
32               containerPort: {{ .Values.service.rpcbindPort }}
33             - name: rpcbind-udp
34               containerPort: {{ .Values.service.rpcbindUdpPort }}
35               protocol: UDP
36           securityContext:
37             capabilities:
38               add:
39                 - DAC_READ_SEARCH
40                 - SYS_RESOURCE
41           args:
42             - "-provisioner={{ include "common.fullname" . }}/nfs"
43           env:
44             - name: POD_IP
45               valueFrom:
46                 fieldRef:
47                   fieldPath: status.podIP
48             - name: SERVICE_NAME
49               value: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
50             - name: POD_NAMESPACE
51               valueFrom:
52                 fieldRef:
53                   fieldPath: metadata.namespace
54           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55           volumeMounts:
56             - name: export-volume
57               mountPath: /export
58       volumes:
59         - name: export-volume
60           hostPath:
61             path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
62 #{{ end }}