Skip to content

Commit 2da2ca1

Browse files
authored
feat: make hostNetwork configurable (#107)
* disable it by default (fixes port conflict issue on the node if another port is trying to acquire the same port) * chore: update `VERSION` in the `Makefile` * chore: replace `hostNetwork: true` with `hostNetwork: false` * fix: template substituion for `hostNetwork`
1 parent c350f34 commit 2da2ca1

File tree

10 files changed

+12
-10
lines changed

10 files changed

+12
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION ?= v1.0.0
1+
VERSION ?= v1.0.1
22

33
IMAGE_BUILDER ?= docker
44
IMAGE_BUILD_CMD ?= buildx

charts/warm-metal-csi-driver/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.0
18+
version: 1.0.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: v1.0.0
23+
appVersion: v1.0.1

charts/warm-metal-csi-driver/templates/nodeplugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ spec:
122122
- mountPath: {{ .Values.crioMountProgram }}
123123
name: crio-mount-program
124124
{{- end }}
125-
hostNetwork: true
125+
hostNetwork: {{.Values.csiPlugin.hostNetwork}}
126126
serviceAccountName: {{ include "warm-metal-csi-driver.fullname" . }}-nodeplugin
127127
volumes:
128128
- hostPath:

charts/warm-metal-csi-driver/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ enableAsyncPullMount: false
99
pullImageSecretForDaemonset:
1010

1111
csiPlugin:
12+
hostNetwork: false
1213
resources: {}
1314
image:
1415
tag: ""

cmd/install/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ spec:
278278
labels:
279279
app: csi-image-warm-metal
280280
spec:
281-
hostNetwork: true
281+
hostNetwork: false
282282
serviceAccountName: csi-image-warm-metal
283283
containers:
284284
- name: node-driver-registrar

pkg/pullexecutor/pullexecutor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ func (m *PullExecutor) StartPulling(o *PullOptions) error {
102102
c, cancel := context.WithTimeout(context.Background(), pullCtxTimeout)
103103
defer cancel()
104104

105-
if pullstatus.Get(o.NamedRef) == pullstatus.StillPulling {
105+
if pullstatus.Get(o.NamedRef) == pullstatus.StillPulling ||
106+
pullstatus.Get(o.NamedRef) == pullstatus.Pulled {
106107
return
107108
}
108109

sample/install/cri-o.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ spec:
126126
- mountPath: /run/containers/storage
127127
mountPropagation: Bidirectional
128128
name: crio-run-root
129-
hostNetwork: true
129+
hostNetwork: false
130130
serviceAccountName: csi-image-warm-metal
131131
volumes:
132132
- hostPath:

sample/install/k3s-containerd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ spec:
117117
- mountPath: /var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs
118118
mountPropagation: Bidirectional
119119
name: snapshot-root-0
120-
hostNetwork: true
120+
hostNetwork: false
121121
serviceAccountName: csi-image-warm-metal
122122
volumes:
123123
- hostPath:

sample/install/minikube-containerd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ spec:
123123
- mountPath: /mnt/vda1/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs
124124
mountPropagation: Bidirectional
125125
name: snapshot-root-0
126-
hostNetwork: true
126+
hostNetwork: false
127127
serviceAccountName: csi-image-warm-metal
128128
volumes:
129129
- hostPath:

sample/install/snap-microk8s-containerd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ spec:
117117
- mountPath: /var/snap/microk8s/common/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs
118118
mountPropagation: Bidirectional
119119
name: snapshot-root-0
120-
hostNetwork: true
120+
hostNetwork: false
121121
serviceAccountName: csi-image-warm-metal
122122
volumes:
123123
- hostPath:

0 commit comments

Comments
 (0)