github.com/openebs/node-disk-manager@v1.9.1-0.20230225014141-4531f06ffa1e/deploy/yamls/node-disk-manager.yaml (about) 1 # Create NDM daemonset 2 apiVersion: apps/v1 3 kind: DaemonSet 4 metadata: 5 name: node-disk-manager 6 namespace: openebs 7 spec: 8 updateStrategy: 9 type: RollingUpdate 10 selector: 11 matchLabels: 12 name: node-disk-manager 13 template: 14 metadata: 15 labels: 16 name: node-disk-manager 17 spec: 18 # By default the node-disk-manager will be run on all kubernetes nodes 19 # If you would like to limit this to only some nodes, say the nodes 20 # that have storage attached, you could label those node and use nodeSelector. 21 # Example: Label the storage nodes with - "openebs.io/nodegroup"="storage-node" 22 # kubectl label node <node-name> "openebs.io/nodegroup"="storage-node" 23 # nodeSelector: 24 # "openebs.io/nodegroup": "storage-node" 25 # Use host network as container network to monitor udev source using netlink 26 # to detect disk attach and detach events using fd. 27 hostNetwork: true 28 hostPID: true 29 serviceAccountName: openebs-maya-operator 30 containers: 31 - name: node-disk-manager 32 image: openebs/node-disk-manager:ci 33 args: 34 - -v=4 35 - --feature-gates="GPTBasedUUID" 36 # Use partition table UUID instead of create single partition to get 37 # partition UUID. Require `GPTBasedUUID` to be enabled with. 38 # - --feature-gates="PartitionTableUUID" 39 - --feature-gates="APIService" 40 # Detect changes to device size, filesystem and mount-points without restart. 41 #- --feature-gates="ChangeDetection" 42 # Default address is 0.0.0.0:9115, do not use quotes around the address 43 # - --api-service-address=0.0.0.0:9115 44 - --feature-gates="UseOSDisk" 45 imagePullPolicy: IfNotPresent 46 securityContext: 47 privileged: true 48 volumeMounts: 49 - name: config 50 mountPath: /host/node-disk-manager.config 51 subPath: node-disk-manager.config 52 readOnly: true 53 # make udev database available inside container 54 - name: udev 55 mountPath: /run/udev 56 - name: procmount 57 mountPath: /host/proc 58 readOnly: true 59 - name: devmount 60 mountPath: /dev 61 - name: basepath 62 mountPath: /var/openebs/ndm 63 - name: sparsepath 64 mountPath: /var/openebs/sparse 65 env: 66 # namespace in which NDM is installed will be passed to NDM Daemonset 67 # as environment variable 68 - name: NAMESPACE 69 valueFrom: 70 fieldRef: 71 fieldPath: metadata.namespace 72 # pass hostname as env variable using downward API to the NDM container 73 - name: NODE_NAME 74 valueFrom: 75 fieldRef: 76 fieldPath: spec.nodeName 77 # specify the directory where the sparse files need to be created. 78 # if not specified, then sparse files will not be created. 79 - name: SPARSE_FILE_DIR 80 value: "/var/openebs/sparse" 81 # Size of the sparse file to be created. 82 - name: SPARSE_FILE_SIZE 83 value: "1073741824" 84 # Specify the number of sparse files to be created 85 - name: SPARSE_FILE_COUNT 86 value: "0" 87 # Set the core dump env to enable core dump for NDM daemon 88 #- name: ENABLE_COREDUMP 89 # value: "1" 90 volumes: 91 - name: config 92 configMap: 93 name: node-disk-manager-config 94 - name: udev 95 hostPath: 96 path: /run/udev 97 type: Directory 98 - name: procmount 99 # mount /proc/1/mounts (mount file of process 1 of host) inside container 100 # to read which partition is mounted on / path 101 hostPath: 102 path: /proc 103 type: Directory 104 - name: devmount 105 # the /dev directory is mounted so that we have access to the devices that 106 # are connected at runtime of the pod. 107 hostPath: 108 path: /dev 109 type: Directory 110 - name: basepath 111 hostPath: 112 path: /var/openebs/ndm 113 type: DirectoryOrCreate 114 - name: sparsepath 115 hostPath: 116 path: /var/openebs/sparse 117 ---