Merge "Add chart for redis cluster"
[oom.git] / kubernetes / common / mysql / templates / nfs-provisoner.yaml
1 {{/*
2 # Copyright © 2017 Amdocs, Bell Canada
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 */}}
16
17 #{{ if not .Values.disableNfsProvisioner }}
18 apiVersion: extensions/v1beta1
19 kind: Deployment
20 metadata:
21   name: {{ .Release.Name }}-{{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
22   namespace: {{ include "common.namespace" . }}
23   labels:
24     app: {{ include "common.name" . }}
25     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26     release: {{ .Release.Name }}
27     heritage: {{ .Release.Service }}
28 spec:
29   #replicas: {{ .Values.replicaCount }}
30   strategy:
31     type: Recreate
32   template:
33     metadata:
34       labels:
35         app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
36         release: {{ .Release.Name }}
37     spec:
38       containers:
39         - name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
40           image: "{{ .Values.global.nfsprovisionerRepository | default .Values.nfsprovisionerRepository }}/{{ .Values.nfsprovisionerImage }}"
41           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42           ports:
43             - name: nfs
44               containerPort: {{ .Values.service.nfsPort }}
45             - name: mountd
46               containerPort: {{ .Values.service.mountdPort }}
47             - name: rpcbind
48               containerPort: {{ .Values.service.rpcbindPort }}
49             - name: rpcbind-udp
50               containerPort: {{ .Values.service.rpcbindUdpPort }}
51               protocol: UDP
52           securityContext:
53             capabilities:
54               add:
55                 - DAC_READ_SEARCH
56                 - SYS_RESOURCE
57           args:
58             - "-provisioner={{ include "common.fullname" . }}/nfs"
59           env:
60             - name: POD_IP
61               valueFrom:
62                 fieldRef:
63                   fieldPath: status.podIP
64             - name: SERVICE_NAME
65               value: {{ .Release.Name }}-{{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
66             - name: POD_NAMESPACE
67               valueFrom:
68                 fieldRef:
69                   fieldPath: metadata.namespace
70           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71           volumeMounts:
72             - name: export-volume
73               mountPath: /export
74       volumes:
75         - name: export-volume
76           hostPath:
77             path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
78 #{{ end }}