From f3d33949fc0571d4f909474bbc5a6a0ca3a91d61 Mon Sep 17 00:00:00 2001 From: dongjiang1989 Date: Wed, 25 Sep 2024 17:14:28 +0800 Subject: [PATCH] Squashed commit of the following: commit 45a28ba843f7321a9798cc9abbd0d9bd61ee0aa5 Author: dongjiang1989 Date: Tue Sep 24 11:41:05 2024 +0800 update Signed-off-by: dongjiang1989 commit 33ecdf8f4787be6ff7f8acde0e21a3b3f5a120c3 Author: dongjiang1989 Date: Tue Sep 24 11:37:37 2024 +0800 update readme Signed-off-by: dongjiang1989 commit 2d089eb15b1a395d5ad52557fc965c6d01c09523 Author: dongjiang1989 Date: Fri Sep 20 09:41:43 2024 +0800 allow configuration of ipFamilyPolicy Signed-off-by: dongjiang1989 Signed-off-by: dongjiang1989 --- installer/README.md | 2 ++ .../helm/chart/volcano/templates/admission.yaml | 6 ++++++ .../helm/chart/volcano/templates/grafana.yaml | 6 ++++++ .../chart/volcano/templates/kubestatemetrics.yaml | 6 ++++++ .../helm/chart/volcano/templates/prometheus.yaml | 6 ++++++ .../helm/chart/volcano/templates/scheduler.yaml | 6 ++++++ installer/helm/chart/volcano/values.yaml | 14 +++++++++++++- 7 files changed, 45 insertions(+), 1 deletion(-) 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