apiVersion: v1 kind: ConfigMap metadata: name: set-nfs-readahead-rule-config namespace: default data: 99-nfs.rules: | SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="/usr/bin/awk -v bdi=$kernel 'BEGIN{ret=1} {if ($4 == bdi) {ret=0}} END{exit ret}' /proc/fs/nfsfs/volumes", ATTR{read_ahead_kb}="15380" --- apiVersion: apps/v1 kind: DaemonSet metadata: name: set-nfs-readahead-rule namespace: default spec: selector: matchLabels: name: set-nfs-readahead-rule template: metadata: labels: name: set-nfs-readahead-rule spec: volumes: - name: config-volume configMap: name: set-nfs-readahead-rule-config - name: host-mount hostPath: path: /etc/udev/rules.d containers: - name: main-container image: k8s.gcr.io/pause:3.1 initContainers: - name: init-privileged command: - /bin/sh - -c - | #!/bin/sh cp /tmp/99-nfs.rules /host/99-nfs.rules /usr/bin/nsenter -m/proc/1/ns/mnt -- udevadm control --reload image: alpine imagePullPolicy: Always volumeMounts: - name: config-volume mountPath: /tmp - name: host-mount mountPath: /host resources: limits: memory: 200Mi requests: cpu: 100m memory: 200Mi securityContext: privileged: true stdin: true stdinOnce: true terminationMessagePath: /dev/termination-log terminationMessagePolicy: File tty: true nodeSelector: kubernetes.io/os: linux kubernetes.azure.com/mode: user tolerations: - key: workload.sas.com/class operator: Equal value: compute effect: NoSchedule - key: workload.sas.com/class operator: Equal value: connect effect: NoSchedule - key: workload.sas.com/class operator: Equal value: cas effect: NoSchedule priorityClassName: system-node-critical dnsPolicy: ClusterFirst enableServiceLinks: true hostPID: true