Skip to content

Commit

Permalink
chore: remove unused mount volumes (#139)
Browse files Browse the repository at this point in the history
* chore: remove unused mount volumes

Signed-off-by: chenk <hen.keinan@gmail.com>

* chore: remove unused mount volumes

Signed-off-by: chenk <hen.keinan@gmail.com>

---------

Signed-off-by: chenk <hen.keinan@gmail.com>
  • Loading branch information
chen-keinan authored Mar 29, 2023
1 parent c2dd721 commit 410c58d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
18 changes: 0 additions & 18 deletions pkg/jobs/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,11 @@ func TestLoadBuilder(t *testing.T) {
MountPath: "/etc/kubernetes",
ReadOnly: true,
},
{
Name: "usr-bin",
MountPath: "/usr/local/mount-from-host/bin",
ReadOnly: true,
},
{
Name: "etc-cni-netd",
MountPath: "/etc/cni/net.d/",
ReadOnly: true,
},
{
Name: "opt-cni-bin",
MountPath: "/opt/cni/bin/",
ReadOnly: true,
},
},
},
},
Expand Down Expand Up @@ -149,18 +139,10 @@ func TestLoadBuilder(t *testing.T) {
Name: "etc-kubernetes",
VolumeSource: corev1.VolumeSource{HostPath: &corev1.HostPathVolumeSource{Path: "/etc/kubernetes"}},
},
{
Name: "usr-bin",
VolumeSource: corev1.VolumeSource{HostPath: &corev1.HostPathVolumeSource{Path: "/usr/bin"}},
},
{
Name: "etc-cni-netd",
VolumeSource: corev1.VolumeSource{HostPath: &corev1.HostPathVolumeSource{Path: "/etc/cni/net.d/"}},
},
{
Name: "opt-cni-bin",
VolumeSource: corev1.VolumeSource{HostPath: &corev1.HostPathVolumeSource{Path: "/opt/cni/bin/"}},
},
},
},
},
Expand Down
13 changes: 1 addition & 12 deletions pkg/jobs/template/node-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,10 @@ spec:
- name: etc-kubernetes
mountPath: /etc/kubernetes
readOnly: true
- name: usr-bin
mountPath: /usr/local/mount-from-host/bin
readOnly: true
- name: etc-cni-netd
mountPath: /etc/cni/net.d/
readOnly: true
- name: opt-cni-bin
mountPath: /opt/cni/bin/
readOnly: true

restartPolicy: Never
securityContext:
runAsGroup: 0
Expand Down Expand Up @@ -90,12 +85,6 @@ spec:
- name: etc-kubernetes
hostPath:
path: /etc/kubernetes
- name: usr-bin
hostPath:
path: /usr/bin
- name: etc-cni-netd
hostPath:
path: /etc/cni/net.d/
- name: opt-cni-bin
hostPath:
path: /opt/cni/bin/

0 comments on commit 410c58d

Please sign in to comment.