Get resource_type of kubernetes cgroup
Cgroup name of Kubernetes is determined by the cgroup driver of Docker. If cgroup driver of Docker is systemd, there will be an error in deploying HugePages. https: //github.com/kubernetes/kubernetes/blob/release-1.26/pkg/kubelet/cm/cgroup_manager_linux.go#L77-L81 Change-Id: If709a968dde24d01e17fef63f09ebf9d7a23fc62
This commit is contained in:
parent
c4e0007717
commit
03c22c3c76
@ -27,9 +27,20 @@ fi
|
||||
#NOTE: Lint and package chart
|
||||
make -C ${OSH_INFRA_PATH} libvirt
|
||||
|
||||
#NOTE: Get resource_type of kubernetes cgroup
|
||||
KUBERNETES_CGROUP=$(sudo docker info | grep "Cgroup Driver" | awk -F': ' '{print $2}' | grep -q systemd && echo kubepods.slice || echo kubepods)
|
||||
|
||||
#NOTE: Deploy libvirt
|
||||
tee /tmp/libvirt.yaml << EOF
|
||||
conf:
|
||||
kubernetes:
|
||||
cgroup: ${KUBERNETES_CGROUP}
|
||||
EOF
|
||||
|
||||
#NOTE: Deploy libvirt
|
||||
helm upgrade --install libvirt ${OSH_INFRA_PATH}/libvirt \
|
||||
--namespace=openstack \
|
||||
--values=/tmp/libvirt.yaml \
|
||||
--set conf.ceph.enabled=${CEPH_ENABLED} \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_LIBVIRT}
|
||||
|
Loading…
Reference in New Issue
Block a user