2018-02-15 01:55:43 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
|
|
|
name: local-volume-provisioner
|
|
|
|
namespace: {{ local_volume_provisioner_namespace }}
|
|
|
|
labels:
|
|
|
|
k8s-app: local-volume-provisioner
|
|
|
|
version: {{ local_volume_provisioner_image_tag }}
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: local-volume-provisioner
|
|
|
|
version: {{ local_volume_provisioner_image_tag }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: local-volume-provisioner
|
|
|
|
version: {{ local_volume_provisioner_image_tag }}
|
|
|
|
spec:
|
2018-09-25 14:50:22 +00:00
|
|
|
priorityClassName: {% if local_volume_provisioner_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
2018-02-15 01:55:43 +00:00
|
|
|
serviceAccountName: local-volume-provisioner
|
2018-06-12 00:10:13 +00:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2018-02-15 01:55:43 +00:00
|
|
|
containers:
|
|
|
|
- name: provisioner
|
|
|
|
image: {{ local_volume_provisioner_image_repo }}:{{ local_volume_provisioner_image_tag }}
|
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
env:
|
|
|
|
- name: MY_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2018-08-10 14:14:34 +00:00
|
|
|
- name: MY_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2018-02-15 01:55:43 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: local-volume-provisioner
|
|
|
|
mountPath: /etc/provisioner/config
|
|
|
|
readOnly: true
|
2020-06-25 13:22:38 +00:00
|
|
|
- mountPath: /dev
|
|
|
|
name: provisioner-dev
|
2019-04-08 07:32:26 +00:00
|
|
|
{% for class_name, class_config in local_volume_provisioner_storage_classes.items() %}
|
2019-01-08 20:36:44 +00:00
|
|
|
- name: local-volume-provisioner-hostpath-{{ class_name }}
|
|
|
|
mountPath: {{ class_config.mount_dir }}
|
2018-08-10 14:14:34 +00:00
|
|
|
mountPropagation: "HostToContainer"
|
2018-10-05 12:52:25 +00:00
|
|
|
{% endfor %}
|
2018-02-15 01:55:43 +00:00
|
|
|
volumes:
|
|
|
|
- name: local-volume-provisioner
|
|
|
|
configMap:
|
|
|
|
name: local-volume-provisioner
|
2020-06-25 13:22:38 +00:00
|
|
|
- name: provisioner-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
2019-04-08 07:32:26 +00:00
|
|
|
{% for class_name, class_config in local_volume_provisioner_storage_classes.items() %}
|
2019-01-08 20:36:44 +00:00
|
|
|
- name: local-volume-provisioner-hostpath-{{ class_name }}
|
2018-02-15 01:55:43 +00:00
|
|
|
hostPath:
|
2019-01-08 20:36:44 +00:00
|
|
|
path: {{ class_config.host_dir }}
|
2018-10-05 12:52:25 +00:00
|
|
|
{% endfor %}
|