{{/* Copyright 2017 The Openstack-Helm Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */}} {{- if .Values.manifests.deployment }} {{- $envAll := . }} --- kind: Deployment apiVersion: apps/v1beta1 metadata: name: nfs-provisioner spec: replicas: {{ .Values.pod.replicas.server }} strategy: type: Recreate template: metadata: labels: {{ tuple $envAll "nfs" "provisioner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: affinity: {{ tuple $envAll "nfs" "provisioner" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} containers: - name: nfs-provisioner {{ tuple $envAll "nfs_provisioner" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} securityContext: capabilities: add: - DAC_READ_SEARCH - SYS_RESOURCE ports: - name: nfs containerPort: 2049 - name: mountd containerPort: 20048 - name: rpcbind containerPort: 111 - name: rpcbind-udp containerPort: 111 protocol: UDP env: - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP - name: SERVICE_NAME value: {{ tuple "nfs" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace args: - "-provisioner={{ .Values.storageclass.provisioner }}" - "-grace-period=10" volumeMounts: - name: export-volume mountPath: /export volumes: - name: export-volume hostPath: path: {{ .Values.storage.host.host_path }} {{- end }}