diff --git a/installer/README.md b/installer/README.md index e3e657596f..b7c12b3507 100644 --- a/installer/README.md +++ b/installer/README.md @@ -130,6 +130,8 @@ The following are the list configurable parameters of Volcano Chart and their de |`custom.scheduler_resources`|Resources for Scheduler pods|`~`| |`custom.scheduler_log_level`|Settings log print level for Scheduler|`3`| |`custom.webhooks_namespace_selector_expressions`|Additional namespace selector expressions for Volcano admission webhooks|`~`| +|`service.ipFamilyPolicy`|Settings service the family policy|``| +|`service.ipFamilies`|Settings service the address families|`[]`| Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/installer/helm/chart/volcano/templates/admission.yaml b/installer/helm/chart/volcano/templates/admission.yaml index 03f3d8ab56..0cbeda36c9 100644 --- a/installer/helm/chart/volcano/templates/admission.yaml +++ b/installer/helm/chart/volcano/templates/admission.yaml @@ -176,6 +176,12 @@ metadata: name: {{ .Release.Name }}-admission-service namespace: {{ .Release.Namespace }} spec: + {{- if .Values.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} + {{- end }} + {{- if .Values.service.ipFamilies }} + ipFamilies: {{ toYaml .Values.service.ipFamilies | nindent 4 }} + {{- end }} ports: - port: 443 protocol: TCP diff --git a/installer/helm/chart/volcano/templates/grafana.yaml b/installer/helm/chart/volcano/templates/grafana.yaml index 65db8679a4..0ea9f905c9 100644 --- a/installer/helm/chart/volcano/templates/grafana.yaml +++ b/installer/helm/chart/volcano/templates/grafana.yaml @@ -151,6 +151,12 @@ metadata: prometheus.io/scrape: 'true' prometheus.io/port: '3000' spec: + {{- if .Values.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} + {{- end }} + {{- if .Values.service.ipFamilies }} + ipFamilies: {{ toYaml .Values.service.ipFamilies | nindent 4 }} + {{- end }} selector: app: grafana type: NodePort diff --git a/installer/helm/chart/volcano/templates/kubestatemetrics.yaml b/installer/helm/chart/volcano/templates/kubestatemetrics.yaml index 005add4328..8dac2ba4bd 100644 --- a/installer/helm/chart/volcano/templates/kubestatemetrics.yaml +++ b/installer/helm/chart/volcano/templates/kubestatemetrics.yaml @@ -205,6 +205,12 @@ metadata: prometheus.io/port: "8080" prometheus.io/scrape: "true" spec: + {{- if .Values.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} + {{- end }} + {{- if .Values.service.ipFamilies }} + ipFamilies: {{ toYaml .Values.service.ipFamilies | nindent 4 }} + {{- end }} ports: - name: http-metrics port: 8080 diff --git a/installer/helm/chart/volcano/templates/prometheus.yaml b/installer/helm/chart/volcano/templates/prometheus.yaml index 987fa6b7a3..04017b2956 100644 --- a/installer/helm/chart/volcano/templates/prometheus.yaml +++ b/installer/helm/chart/volcano/templates/prometheus.yaml @@ -257,6 +257,12 @@ metadata: prometheus.io/port: '9090' spec: + {{- if .Values.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} + {{- end }} + {{- if .Values.service.ipFamilies }} + ipFamilies: {{ toYaml .Values.service.ipFamilies | nindent 4 }} + {{- end }} selector: app: prometheus-server type: NodePort diff --git a/installer/helm/chart/volcano/templates/scheduler.yaml b/installer/helm/chart/volcano/templates/scheduler.yaml index 3a56a2f639..e69f2ac3d2 100644 --- a/installer/helm/chart/volcano/templates/scheduler.yaml +++ b/installer/helm/chart/volcano/templates/scheduler.yaml @@ -221,6 +221,12 @@ metadata: {{- toYaml .Values.custom.common_labels | nindent 4 }} {{- end }} spec: + {{- if .Values.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} + {{- end }} + {{- if .Values.service.ipFamilies }} + ipFamilies: {{ toYaml .Values.service.ipFamilies | nindent 4 }} + {{- end }} ports: - port: 8080 protocol: TCP diff --git a/installer/helm/chart/volcano/values.yaml b/installer/helm/chart/volcano/values.yaml index e7050f7071..c091eb643b 100644 --- a/installer/helm/chart/volcano/values.yaml +++ b/installer/helm/chart/volcano/values.yaml @@ -156,4 +156,16 @@ custom: # runAsUser: 2000 admission_default_csc: ~ scheduler_default_csc: ~ - controller_default_csc: ~ \ No newline at end of file + controller_default_csc: ~ + +service: + # @param service.ipFamilyPolicy [string], support SingleStack, PreferDualStack and RequireDualStack + # + ipFamilyPolicy: "" + # @param service.ipFamilies [array] List of IP families (e.g. IPv4, IPv6) assigned to the service. + # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/ + # E.g. + # ipFamilies: + # - IPv6 + # - IPv4 + ipFamilies: [] \ No newline at end of file