|
| 1 | +# Source: csi-wekafsplugin/templates/nodeserver-daemonset.yaml |
| 2 | +kind: DaemonSet |
| 3 | +apiVersion: apps/v1 |
| 4 | +metadata: |
| 5 | + name: csi-wekafsplugin-node |
| 6 | + namespace: csi-wekafsplugin |
| 7 | +spec: |
| 8 | + selector: |
| 9 | + matchLabels: |
| 10 | + app: csi-wekafsplugin-node |
| 11 | + template: |
| 12 | + metadata: |
| 13 | + labels: |
| 14 | + app: csi-wekafsplugin-node |
| 15 | + component: csi-wekafsplugin-node |
| 16 | + release: csi-wekafsplugin |
| 17 | + annotations: |
| 18 | + prometheus.io/scrape: 'true' |
| 19 | + prometheus.io/path: '/metrics' |
| 20 | + prometheus.io/port: '9094' |
| 21 | + spec: |
| 22 | + serviceAccountName: csi-wekafsplugin-node |
| 23 | + hostNetwork: true |
| 24 | + initContainers: |
| 25 | + - name: init |
| 26 | + volumeMounts: |
| 27 | + - mountPath: /etc/nodeinfo |
| 28 | + name: nodeinfo |
| 29 | + image: "quay.io/weka.io/csi-wekafs:v2.5.1" |
| 30 | + imagePullPolicy: IfNotPresent |
| 31 | + securityContext: |
| 32 | + # This doesn't need to run as root. |
| 33 | + runAsUser: 9376 |
| 34 | + runAsGroup: 9376 |
| 35 | + env: |
| 36 | + - name: NODENAME |
| 37 | + valueFrom: |
| 38 | + fieldRef: |
| 39 | + fieldPath: spec.nodeName |
| 40 | + command: |
| 41 | + - bash |
| 42 | + args: |
| 43 | + - -c |
| 44 | + - kubectl label node $NODENAME "topology.csi.weka.io/transport-" ; kubectl get node $NODENAME -o json | jq '.metadata' > /etc/nodeinfo/metadata |
| 45 | + containers: |
| 46 | + - name: wekafs |
| 47 | + securityContext: |
| 48 | + privileged: true |
| 49 | + image: quay.io/weka.io/csi-wekafs:v2.5.1 |
| 50 | + imagePullPolicy: Always |
| 51 | + args: |
| 52 | + - "--v=5" |
| 53 | + - "--drivername=$(CSI_DRIVER_NAME)" |
| 54 | + - "--endpoint=$(CSI_ENDPOINT)" |
| 55 | + - "--nodeid=$(KUBE_NODE_NAME)" |
| 56 | + - "--dynamic-path=$(CSI_DYNAMIC_PATH)" |
| 57 | + - "--csimode=$(X_CSI_MODE)" |
| 58 | + - "--newvolumeprefix=csivol-" |
| 59 | + - "--newsnapshotprefix=csisnp-" |
| 60 | + - "--seedsnapshotprefix=csisnp-seed-" |
| 61 | + - "--selinux-support" |
| 62 | + - "--enablemetrics" |
| 63 | + - "--metricsport=9094" |
| 64 | + - "--allowinsecurehttps" |
| 65 | + - "--mutuallyexclusivemountoptions=readcache,writecache,coherent,forcedirect" |
| 66 | + - "--mutuallyexclusivemountoptions=sync,async" |
| 67 | + - "--mutuallyexclusivemountoptions=ro,rw" |
| 68 | + - "--grpcrequesttimeoutseconds=30" |
| 69 | + - "--concurrency.nodePublishVolume=5" |
| 70 | + - "--concurrency.nodeUnpublishVolume=5" |
| 71 | + - "--allownfsfailback" |
| 72 | + - "--nfsprotocolversion=4.1" |
| 73 | + ports: |
| 74 | + - containerPort: 9899 |
| 75 | + name: healthz |
| 76 | + protocol: TCP |
| 77 | + - containerPort: 9094 |
| 78 | + name: metrics |
| 79 | + protocol: TCP |
| 80 | + livenessProbe: |
| 81 | + failureThreshold: 5 |
| 82 | + httpGet: |
| 83 | + path: /healthz |
| 84 | + port: healthz |
| 85 | + initialDelaySeconds: 10 |
| 86 | + timeoutSeconds: 3 |
| 87 | + periodSeconds: 2 |
| 88 | + env: |
| 89 | + - name: CSI_DRIVER_NAME |
| 90 | + value: csi.weka.io |
| 91 | + - name: CSI_ENDPOINT |
| 92 | + value: unix:///csi/csi.sock |
| 93 | + - name: KUBE_NODE_NAME |
| 94 | + valueFrom: |
| 95 | + fieldRef: |
| 96 | + fieldPath: spec.nodeName |
| 97 | + - name: CSI_DYNAMIC_PATH |
| 98 | + value: csi-volumes |
| 99 | + - name: X_CSI_MODE |
| 100 | + value: node |
| 101 | + - name: KUBE_NODE_IP_ADDRESS |
| 102 | + valueFrom: |
| 103 | + fieldRef: |
| 104 | + fieldPath: status.hostIP |
| 105 | + volumeMounts: |
| 106 | + - mountPath: /csi |
| 107 | + name: socket-dir |
| 108 | + - mountPath: /var/lib/kubelet/pods |
| 109 | + mountPropagation: Bidirectional |
| 110 | + name: mountpoint-dir |
| 111 | + - mountPath: /var/lib/kubelet/plugins |
| 112 | + mountPropagation: Bidirectional |
| 113 | + name: plugins-dir |
| 114 | + - mountPath: /var/lib/csi-wekafs-data |
| 115 | + name: csi-data-dir |
| 116 | + - mountPath: /dev |
| 117 | + name: dev-dir |
| 118 | + - mountPath: /etc/nodeinfo |
| 119 | + name: nodeinfo |
| 120 | + readOnly: true |
| 121 | + - mountPath: /etc/selinux/config |
| 122 | + name: selinux-config |
| 123 | + - name: liveness-probe |
| 124 | + volumeMounts: |
| 125 | + - mountPath: /csi |
| 126 | + name: socket-dir |
| 127 | + image: registry.k8s.io/sig-storage/livenessprobe:v2.14.0 |
| 128 | + args: |
| 129 | + - "--v=5" |
| 130 | + - "--csi-address=$(ADDRESS)" |
| 131 | + - "--health-port=$(HEALTH_PORT)" |
| 132 | + env: |
| 133 | + - name: ADDRESS |
| 134 | + value: unix:///csi/csi.sock |
| 135 | + - name: HEALTH_PORT |
| 136 | + value: "9899" |
| 137 | + - name: csi-registrar |
| 138 | + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.12.0 |
| 139 | + args: |
| 140 | + - "--v=5" |
| 141 | + - "--csi-address=$(ADDRESS)" |
| 142 | + - "--kubelet-registration-path=$(KUBELET_REGISTRATION_PATH)" |
| 143 | + - "--timeout=60s" |
| 144 | + - "--health-port=9809" |
| 145 | + ports: |
| 146 | + - containerPort: 9809 |
| 147 | + name: healthz |
| 148 | + livenessProbe: |
| 149 | + httpGet: |
| 150 | + port: healthz |
| 151 | + path: /healthz |
| 152 | + initialDelaySeconds: 5 |
| 153 | + timeoutSeconds: 5 |
| 154 | + securityContext: |
| 155 | + privileged: true |
| 156 | + env: |
| 157 | + - name: ADDRESS |
| 158 | + value: unix:///csi/csi.sock |
| 159 | + - name: KUBELET_REGISTRATION_PATH |
| 160 | + value: "/var/lib/kubelet/plugins/csi-wekafs-node/csi.sock" |
| 161 | + volumeMounts: |
| 162 | + - mountPath: /csi |
| 163 | + name: socket-dir |
| 164 | + - mountPath: /registration |
| 165 | + name: registration-dir |
| 166 | + - mountPath: /var/lib/csi-wekafs-data |
| 167 | + name: csi-data-dir |
| 168 | + tolerations: |
| 169 | + - effect: NoSchedule |
| 170 | + key: node-role.kubernetes.io/master |
| 171 | + operator: Exists |
| 172 | + volumes: |
| 173 | + - hostPath: |
| 174 | + path: /var/lib/kubelet/pods |
| 175 | + type: DirectoryOrCreate |
| 176 | + name: mountpoint-dir |
| 177 | + - hostPath: |
| 178 | + path: /var/lib/kubelet/plugins_registry |
| 179 | + type: Directory |
| 180 | + name: registration-dir |
| 181 | + - hostPath: |
| 182 | + path: /var/lib/kubelet/plugins |
| 183 | + type: Directory |
| 184 | + name: plugins-dir |
| 185 | + - hostPath: |
| 186 | + path: /var/lib/kubelet/plugins/csi-wekafs-node |
| 187 | + type: DirectoryOrCreate |
| 188 | + name: socket-dir |
| 189 | + - hostPath: |
| 190 | + # 'path' is where PV data is persisted on host. |
| 191 | + # using /tmp is also possible while the PVs will not available after plugin container recreation or host reboot |
| 192 | + path: /var/lib/csi-wekafs-data/ |
| 193 | + type: DirectoryOrCreate |
| 194 | + name: csi-data-dir |
| 195 | + - hostPath: |
| 196 | + path: /dev |
| 197 | + type: Directory |
| 198 | + name: dev-dir |
| 199 | + # if enforced selinux or automatically detected OpenShift Container Platform, pass selinux-config |
| 200 | + - hostPath: |
| 201 | + path: /etc/selinux/config |
| 202 | + type: File |
| 203 | + name: selinux-config |
| 204 | + - name: nodeinfo |
| 205 | + emptyDir: {} |
0 commit comments