jmac | a4ddffa | 2018-04-08 19:28:01 +0000 | [diff] [blame] | 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 | |
Jerome Doucerain | dee57fd | 2018-04-13 12:24:53 -0400 | [diff] [blame] | 17 | {{ if not .Values.disableNfsProvisioner }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 18 | apiVersion: extensions/v1beta1 |
| 19 | kind: Deployment |
| 20 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 21 | name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 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 |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 65 | value: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 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: |
BorislavG | 56857c4 | 2018-05-03 14:29:51 +0000 | [diff] [blame] | 77 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} |
Jerome Doucerain | dee57fd | 2018-04-13 12:24:53 -0400 | [diff] [blame] | 78 | {{ end }} |