blob: 355ad382351e15ce441ca4af68517a320e94d258 [file] [log] [blame]
jmaca4ddffa2018-04-08 19:28:01 +00001{{/*
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
Jerome Douceraindee57fd2018-04-13 12:24:53 -040017{{ if not .Values.disableNfsProvisioner }}
Mike Elliott13fed112018-02-28 08:33:33 -050018apiVersion: extensions/v1beta1
19kind: Deployment
20metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000021 name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
Mike Elliott13fed112018-02-28 08:33:33 -050022 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 }}
28spec:
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
BorislavG1ffbd992018-04-24 07:56:27 +000065 value: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
Mike Elliott13fed112018-02-28 08:33:33 -050066 - 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:
BorislavG56857c42018-05-03 14:29:51 +000077 path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
Jerome Douceraindee57fd2018-04-13 12:24:53 -040078{{ end }}