Initial commit
This commit is contained in:
57
nfs-client-provisioner/templates/deployment.yaml
Normal file
57
nfs-client-provisioner/templates/deployment.yaml
Normal file
@ -0,0 +1,57 @@
|
||||
{{- if .Values.nfs.server }}
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: {{ template "nfs-client-provisioner.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "nfs-client-provisioner.name" . }}
|
||||
chart: {{ template "nfs-client-provisioner.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "nfs-client-provisioner.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "nfs-client-provisioner.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
serviceAccountName: {{ if .Values.rbac.create }}{{ template "nfs-client-provisioner.fullname" . }}{{ else }}{{ .Values.rbac.serviceAccountName | quote }}{{ end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: nfs-client-root
|
||||
mountPath: /persistentvolumes
|
||||
env:
|
||||
- name: PROVISIONER_NAME
|
||||
value: {{ template "nfs-client-provisioner.provisionerName" . }}
|
||||
- name: NFS_SERVER
|
||||
value: {{ .Values.nfs.server }}
|
||||
- name: NFS_PATH
|
||||
value: {{ .Values.nfs.path }}
|
||||
volumes:
|
||||
- name: nfs-client-root
|
||||
nfs:
|
||||
server: {{ .Values.nfs.server }}
|
||||
path: {{ .Values.nfs.path }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user