Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make hostNetwork configurable #107

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION ?= v1.0.0
VERSION ?= v1.0.1

IMAGE_BUILDER ?= docker
IMAGE_BUILD_CMD ?= buildx
Expand Down
4 changes: 2 additions & 2 deletions charts/warm-metal-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: v1.0.0
appVersion: v1.0.1
2 changes: 1 addition & 1 deletion charts/warm-metal-csi-driver/templates/nodeplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ spec:
- mountPath: {{ .Values.crioMountProgram }}
name: crio-mount-program
{{- end }}
hostNetwork: true
hostNetwork: {{.Values.hostNetwork}}
serviceAccountName: {{ include "warm-metal-csi-driver.fullname" . }}-nodeplugin
volumes:
- hostPath:
Expand Down
1 change: 1 addition & 0 deletions charts/warm-metal-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ enableAsyncPullMount: false
pullImageSecretForDaemonset:

csiPlugin:
hostNetwork: false
resources: {}
image:
tag: ""
Expand Down
3 changes: 2 additions & 1 deletion pkg/pullexecutor/pullexecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ func (m *PullExecutor) StartPulling(o *PullOptions) error {
c, cancel := context.WithTimeout(context.Background(), pullCtxTimeout)
defer cancel()

if pullstatus.Get(o.NamedRef) == pullstatus.StillPulling {
if pullstatus.Get(o.NamedRef) == pullstatus.StillPulling ||
pullstatus.Get(o.NamedRef) == pullstatus.Pulled {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix for what appears to be a race condition when I was testing #81
Basically when two requests sent back-to-back with little time duration between them, one of them succeeds while the other goes into the mutex section and continues to pull the same image again (if pullAlways: true). I haven't seen this issue outside #81 but thought it would be good to get the fix in before we get #81 merged.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

return
}

Expand Down
Loading