github.com/openebs/node-disk-manager@v1.9.1-0.20230225014141-4531f06ffa1e/integration_tests/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 - --feature-gates="APIService" 37 - --feature-gates="ChangeDetection" 38 # Default address is 0.0.0.0:9115, do not use quotes around the address 39 # - --api-service-address=0.0.0.0:9115 40 # - --feature-gates="UseOSDisk" 41 imagePullPolicy: IfNotPresent 42 securityContext: 43 privileged: true 44 volumeMounts: 45 - name: config 46 mountPath: /host/node-disk-manager.config 47 subPath: node-disk-manager.config 48 readOnly: true 49 # make udev database available inside container 50 - name: udev 51 mountPath: /run/udev 52 - name: procmount 53 mountPath: /host/proc 54 readOnly: true 55 - name: devmount 56 mountPath: /dev 57 - name: basepath 58 mountPath: /var/openebs/ndm 59 - name: sparsepath 60 mountPath: /var/openebs/sparse 61 env: 62 # namespace in which NDM is installed will be passed to NDM Daemonset 63 # as environment variable 64 - name: NAMESPACE 65 valueFrom: 66 fieldRef: 67 fieldPath: metadata.namespace 68 # pass hostname as env variable using downward API to the NDM container 69 - name: NODE_NAME 70 valueFrom: 71 fieldRef: 72 fieldPath: spec.nodeName 73 # specify the directory where the sparse files need to be created. 74 # if not specified, then sparse files will not be created. 75 - name: SPARSE_FILE_DIR 76 value: "/var/openebs/sparse" 77 # Size of the sparse file to be created. 78 - name: SPARSE_FILE_SIZE 79 value: "1073741824" 80 # Specify the number of sparse files to be created 81 - name: SPARSE_FILE_COUNT 82 value: "1" 83 # Set the core dump env to enable core dump for NDM daemon 84 #- name: ENABLE_COREDUMP 85 # value: "1" 86 volumes: 87 - name: config 88 configMap: 89 name: node-disk-manager-config 90 - name: udev 91 hostPath: 92 path: /run/udev 93 type: Directory 94 - name: procmount 95 # mount /proc/1/mounts (mount file of process 1 of host) inside container 96 # to read which partition is mounted on / path 97 hostPath: 98 path: /proc 99 type: Directory 100 - name: devmount 101 # the /dev directory is mounted so that we have access to the devices that 102 # are connected at runtime of the pod. 103 hostPath: 104 path: /dev 105 type: Directory 106 - name: basepath 107 hostPath: 108 path: /var/openebs/ndm 109 type: DirectoryOrCreate 110 - name: sparsepath 111 hostPath: 112 path: /var/openebs/sparse 113 ---