Skip to content

Commit

Permalink
feat(CSI-227): allow host networking via configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyberezansky committed Jul 31, 2024
1 parent 4c8a15f commit 698dc68
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:

allowPrivilegedContainer: true
allowHostDirVolumePlugin: true
{{- if .Values.hostNetwork }}
allowHostNetwork: true
{{- end }}
allowedVolumeTypes:
- hostPath
- secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ spec:
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8}}
{{- end }}
serviceAccountName: {{ .Release.Name }}-controller
{{- if .Values.hostNetwork }}
hostNetwork: {{ .Values.hostNetwork }}
{{- end }}
containers:
- name: csi-attacher
image: {{ required "csi attacher sidercar image." .Values.images.attachersidecar }}
Expand Down
7 changes: 5 additions & 2 deletions charts/csi-wekafsplugin/templates/nodeserver-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- if .Values.hostNetwork }}
hostNetwork: {{ .Values.hostNetwork }}
{{- end }}
initContainers:
- name: init
volumeMounts:
Expand Down Expand Up @@ -104,7 +107,7 @@ spec:
- "--concurrency.nodeUnpublishVolume={{ .Values.node.concurrency.nodeUnpublishVolume | default "1" }}"
{{- end }}
ports:
- containerPort: 9898
- containerPort: 9899
name: healthz
protocol: TCP
{{- if .Values.metrics.enabled }}
Expand Down Expand Up @@ -171,7 +174,7 @@ spec:
- name: ADDRESS
value: unix:///csi/csi.sock
- name: HEALTH_PORT
value: "9898"
value: "9899"

- name: csi-registrar
image: {{ required "Provide the csi node registrar sidecar container image." .Values.images.registrarsidecar }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:

allowPrivilegedContainer: true
allowHostDirVolumePlugin: true
{{- if .Values.hostNetwork }}
allowHostNetwork: true
{{- end }}
allowedVolumeTypes:
- hostPath
- secret
Expand Down
2 changes: 2 additions & 0 deletions charts/csi-wekafsplugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ metrics:
# -- Tracing URL (For Jaeger tracing engine / OpenTelemetry), optional
# @ignore
tracingUrl: ""
# -- Set to true to use host networking
hostNetwork: false
pluginConfig:
# -- CSI Driver support for fsGroupPolicy, may be either "File" or "None". Default is "File"
# -- WARNING: Changing this value might require uninstall and re-install of the plugin
Expand Down

0 comments on commit 698dc68

Please sign in to comment.