Created
March 24, 2022 14:18
-
-
Save juan-lee/ae23efe0318d356feebc40e4502443d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
labels: | |
component: osdisk-optimizer | |
name: osdisk-optimizer | |
namespace: kube-system | |
spec: | |
selector: | |
matchLabels: | |
component: osdisk-optimizer | |
tier: node | |
template: | |
metadata: | |
labels: | |
component: osdisk-optimizer | |
tier: node | |
spec: | |
containers: | |
- command: | |
- nsenter | |
- --target | |
- "1" | |
- --mount | |
- --uts | |
- --ipc | |
- --net | |
- --pid | |
- -- | |
- sh | |
- -c | |
- | | |
df -h | |
echo Default /sys/block/sda/device/queue_depth $(cat /sys/block/sda/device/queue_depth) | |
echo Default /sys/block/sda/queue/nr_requests $(cat /sys/block/sda/queue/nr_requests) | |
echo Updating queue_depth and nr_requests | |
echo 128 > /sys/block/sda/device/queue_depth | |
echo 128 > /sys/block/sda/queue/nr_requests | |
echo Current /sys/block/sda/device/queue_depth $(cat /sys/block/sda/device/queue_depth) | |
echo Current /sys/block/sda/queue/nr_requests $(cat /sys/block/sda/queue/nr_requests) | |
while true; do sleep 100000; done | |
image: alpine | |
imagePullPolicy: IfNotPresent | |
name: osdisk-optimizer | |
resources: | |
requests: | |
cpu: 10m | |
securityContext: | |
privileged: true | |
dnsPolicy: ClusterFirst | |
hostPID: true | |
hostNetwork: true | |
tolerations: | |
- effect: NoSchedule | |
operator: Exists | |
- effect: NoExecute | |
operator: Exists | |
- key: CriticalAddonsOnly | |
operator: Exists | |
restartPolicy: Always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment