Skip to content

Commit 063d102

Browse files
feat(helm): enable host network configuration for controllers and webhook
Signed-off-by: Gentleelephant <[email protected]>
1 parent 4913bc7 commit 063d102

10 files changed

+40
-6
lines changed

deploy/helm/fluid/charts/fluid/templates/controller/alluxioruntime_controller.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ spec:
3434
tolerations:
3535
{{ toYaml .Values.runtime.alluxio.tolerations | indent 6}}
3636
{{- end }}
37-
#hostNetwork: true
37+
{{- if .Values.csi.config.hostNetwork }}
38+
hostNetwork: true
39+
dnsPolicy: ClusterFirstWithHostNet
40+
{{- end }}
3841
{{- include "common.nodeSelectors" .}}
3942
containers:
4043
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.runtime.alluxio.controller.imagePrefix .Values.runtime.alluxio.controller.imageName .Values.runtime.alluxio.controller.imageTag . ) }}

deploy/helm/fluid/charts/fluid/templates/controller/dataset_controller.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ spec:
3232
tolerations:
3333
{{ toYaml .Values.dataset.tolerations | indent 6}}
3434
{{- end }}
35-
#hostNetwork: true
35+
{{- if .Values.csi.config.hostNetwork }}
36+
hostNetwork: true
37+
dnsPolicy: ClusterFirstWithHostNet
38+
{{- end }}
3639
{{- include "common.nodeSelectors" .}}
3740
containers:
3841
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.dataset.controller.imagePrefix .Values.dataset.controller.imageName .Values.dataset.controller.imageTag . ) }}

deploy/helm/fluid/charts/fluid/templates/controller/efcruntime_controller.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ spec:
3434
tolerations:
3535
{{ toYaml .Values.runtime.efc.tolerations | indent 6 }}
3636
{{- end }}
37-
#hostNetwork: true
37+
{{- if .Values.csi.config.hostNetwork }}
38+
hostNetwork: true
39+
dnsPolicy: ClusterFirstWithHostNet
40+
{{- end }}
3841
{{- include "common.nodeSelectors" .}}
3942
containers:
4043
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.runtime.efc.controller.imagePrefix .Values.runtime.efc.controller.imageName .Values.runtime.efc.controller.imageTag . ) }}

deploy/helm/fluid/charts/fluid/templates/controller/fluidapp_controller.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ spec:
3030
tolerations:
3131
{{ toYaml .Values.fluidapp.tolerations | indent 6 }}
3232
{{- end }}
33-
#hostNetwork: true
33+
{{- if .Values.csi.config.hostNetwork }}
34+
hostNetwork: true
35+
dnsPolicy: ClusterFirstWithHostNet
36+
{{- end }}
3437
{{- include "common.nodeSelectors" .}}
3538
containers:
3639
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.fluidapp.controller.imagePrefix .Values.fluidapp.controller.imageName .Values.fluidapp.controller.imageTag . ) }}

deploy/helm/fluid/charts/fluid/templates/controller/goosefsruntime_controller.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ spec:
3434
tolerations:
3535
{{ toYaml .Values.runtime.goosefs.tolerations | indent 6 }}
3636
{{- end }}
37-
#hostNetwork: true
37+
{{- if .Values.csi.config.hostNetwork }}
38+
hostNetwork: true
39+
dnsPolicy: ClusterFirstWithHostNet
40+
{{- end }}
3841
{{- include "common.nodeSelectors" .}}
3942
containers:
4043
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.runtime.goosefs.controller.imagePrefix .Values.runtime.goosefs.controller.imageName .Values.runtime.goosefs.controller.imageTag . ) }}

deploy/helm/fluid/charts/fluid/templates/controller/jindoruntime_controller.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ spec:
3535
{{ toYaml .Values.runtime.jindo.tolerations | indent 6 }}
3636
{{- end }}
3737
{{- include "common.nodeSelectors" .}}
38+
{{- if .Values.csi.config.hostNetwork }}
39+
hostNetwork: true
40+
dnsPolicy: ClusterFirstWithHostNet
41+
{{- end }}
3842
containers:
3943
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.runtime.jindo.controller.imagePrefix .Values.runtime.jindo.controller.imageName .Values.runtime.jindo.controller.imageTag . ) }}
4044
name: manager

deploy/helm/fluid/charts/fluid/templates/controller/juicefsruntime_controller.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ spec:
3535
{{ toYaml .Values.runtime.juicefs.tolerations | indent 6 }}
3636
{{- end }}
3737
#hostNetwork: true
38+
{{- if .Values.csi.config.hostNetwork }}
39+
hostNetwork: true
40+
dnsPolicy: ClusterFirstWithHostNet
41+
{{- end }}
3842
{{- include "common.nodeSelectors" .}}
3943
containers:
4044
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.runtime.juicefs.controller.imagePrefix .Values.runtime.juicefs.controller.imageName .Values.runtime.juicefs.controller.imageTag . ) }}

deploy/helm/fluid/charts/fluid/templates/controller/thinruntime_controller.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ spec:
3434
tolerations:
3535
{{ toYaml .Values.runtime.thin.tolerations | indent 6 }}
3636
{{- end }}
37-
#hostNetwork: true
37+
{{- if .Values.csi.config.hostNetwork }}
38+
hostNetwork: true
39+
dnsPolicy: ClusterFirstWithHostNet
40+
{{- end }}
3841
{{- include "common.nodeSelectors" .}}
3942
containers:
4043
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.runtime.thin.controller.imagePrefix .Values.runtime.thin.controller.imageName .Values.runtime.thin.controller.imageTag . ) }}

deploy/helm/fluid/charts/fluid/templates/controller/vineyardruntime_controller.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ spec:
3535
{{ toYaml .Values.runtime.vineyard.tolerations | indent 6 }}
3636
{{- end }}
3737
{{- include "common.nodeSelectors" .}}
38+
{{- if .Values.csi.config.hostNetwork }}
39+
hostNetwork: true
40+
dnsPolicy: ClusterFirstWithHostNet
41+
{{- end }}
3842
containers:
3943
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.runtime.vineyard.controller.imagePrefix .Values.runtime.vineyard.controller.imageName .Values.runtime.vineyard.controller.imageTag . ) }}
4044
name: manager

deploy/helm/fluid/charts/fluid/templates/webhook/webhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ spec:
2727
serviceAccountName: fluid-webhook
2828
{{ include "fluid.controlplane.affinity" . | nindent 6}}
2929
{{- include "common.nodeSelectors" .}}
30+
{{- if .Values.csi.config.hostNetwork }}
31+
hostNetwork: true
32+
dnsPolicy: ClusterFirstWithHostNet
33+
{{- end }}
3034
containers:
3135
- image: {{ include "fluid.controlplane.imageTransform" (list .Values.webhook.imagePrefix .Values.webhook.imageName .Values.webhook.imageTag . ) }}
3236
name: manager

0 commit comments

Comments
 (0)