Skip to content

Commit

Permalink
Changing volume types: type: "Directory" to type: "DirectoryOrCreate"…
Browse files Browse the repository at this point in the history
… to avoid "hostPath type check failed" error.

With this volume type, we can avoid "MountVolume.SetUp failed for volume "kubecgroup" : hostPath type check failed: /sys/fs/cgroup/cpuset/kubepods.slice/ is not a directory"

This way if the volume directory is not present, the directory will be created.
I tested in my deployment and it works well.
  • Loading branch information
sigitp-git authored Sep 10, 2024
1 parent 0f6a784 commit 69d5e72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deployment/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ spec:
name: kubeletsocket
- hostPath:
path: /sys/fs/cgroup/cpuset/kubepods.slice/
type: "Directory"
type: "DirectoryOrCreate"
name: kubecgroup
- hostPath:
path: /var/lib/kubelet/cpu_manager_state
type: "File"
name: cpucheckpoint
- hostPath:
path: /sys/class/net
type: "Directory"
type: "DirectoryOrCreate"
name: sysclassnet
- hostPath:
path: /sys/bus/pci/devices
type: "Directory"
type: "DirectoryOrCreate"
name: sysbuspcidevices
- hostPath:
path: /sys/devices
type: "Directory"
type: "DirectoryOrCreate"
name: sysdevices
---
apiVersion: v1
Expand Down

0 comments on commit 69d5e72

Please sign in to comment.