Skip to content

Commit

Permalink
Merge pull request #3741 from dongjiang1989/dualstack-support
Browse files Browse the repository at this point in the history
feat: allow configuration of ipFamilyPolicy
  • Loading branch information
volcano-sh-bot authored Sep 30, 2024
2 parents 9712489 + f3d3394 commit 639a4ba
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 1 deletion.
2 changes: 2 additions & 0 deletions installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,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,

Expand Down
6 changes: 6 additions & 0 deletions installer/helm/chart/volcano/templates/admission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions installer/helm/chart/volcano/templates/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions installer/helm/chart/volcano/templates/kubestatemetrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions installer/helm/chart/volcano/templates/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions installer/helm/chart/volcano/templates/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion installer/helm/chart/volcano/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,16 @@ custom:
# runAsUser: 2000
admission_default_csc: ~
scheduler_default_csc: ~
controller_default_csc: ~
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: []

0 comments on commit 639a4ba

Please sign in to comment.