mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 11:45:20 +00:00
Enable parameterized kubelet mount path during node-agent installation (#9074)
Enable parameterized kubelet mount path during node-agent installation Signed-off-by: longyuxiang <longyuxiang@kylinos.cn>
This commit is contained in:
@@ -63,6 +63,10 @@ func TestDaemonSet(t *testing.T) {
|
||||
ds = DaemonSet("velero", WithServiceAccountName("test-sa"))
|
||||
assert.Equal(t, "test-sa", ds.Spec.Template.Spec.ServiceAccountName)
|
||||
|
||||
ds = DaemonSet("velero", WithKubeletRootDir("/data/test/kubelet"))
|
||||
assert.Equal(t, "/data/test/kubelet/pods", ds.Spec.Template.Spec.Volumes[0].HostPath.Path)
|
||||
assert.Equal(t, "/data/test/kubelet/plugins", ds.Spec.Template.Spec.Volumes[1].HostPath.Path)
|
||||
|
||||
ds = DaemonSet("velero", WithNodeAgentDisableHostPath(true))
|
||||
assert.Len(t, ds.Spec.Template.Spec.Volumes, 1)
|
||||
assert.Len(t, ds.Spec.Template.Spec.Containers[0].VolumeMounts, 1)
|
||||
|
||||
Reference in New Issue
Block a user