Skip to content

Commit

Permalink
Merge branch 'master' into nodegroup-issue3131
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyueandrew authored Dec 28, 2023
2 parents 89c1cbb + 06f505c commit ec37291
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ The following are the list configurable parameters of Volcano Chart and their de
|`custom.admission_resources`|Resources for Admission pods|`~`|
|`custom.controller_resources`|Resources for Controller pods|`~`|
|`custom.scheduler_resources`|Resources for Scheduler pods|`~`|
|`custom.webhooks_namespace_selector_expressions`|Additional namespace selector expressions for Volcano admission webhooks|`~`|

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

Expand Down
21 changes: 21 additions & 0 deletions installer/helm/chart/volcano/templates/webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ webhooks:
values:
- {{ .Release.Namespace }}
- kube-system
{{- if .Values.custom.webhooks_namespace_selector_expressions }}
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
reinvocationPolicy: Never
rules:
Expand Down Expand Up @@ -66,6 +69,9 @@ webhooks:
values:
- {{ .Release.Namespace }}
- kube-system
{{- if .Values.custom.webhooks_namespace_selector_expressions }}
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
reinvocationPolicy: Never
rules:
Expand Down Expand Up @@ -108,6 +114,9 @@ webhooks:
values:
- {{ .Release.Namespace }}
- kube-system
{{- if .Values.custom.webhooks_namespace_selector_expressions }}
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
reinvocationPolicy: Never
rules:
Expand Down Expand Up @@ -150,6 +159,9 @@ webhooks:
values:
- {{ .Release.Namespace }}
- kube-system
{{- if .Values.custom.webhooks_namespace_selector_expressions }}
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
reinvocationPolicy: Never
rules:
Expand Down Expand Up @@ -192,6 +204,9 @@ webhooks:
values:
- {{ .Release.Namespace }}
- kube-system
{{- if .Values.custom.webhooks_namespace_selector_expressions }}
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
rules:
- apiGroups:
Expand Down Expand Up @@ -234,6 +249,9 @@ webhooks:
values:
- {{ .Release.Namespace }}
- kube-system
{{- if .Values.custom.webhooks_namespace_selector_expressions }}
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
rules:
- apiGroups:
Expand Down Expand Up @@ -275,6 +293,9 @@ webhooks:
values:
- {{ .Release.Namespace }}
- kube-system
{{- if .Values.custom.webhooks_namespace_selector_expressions }}
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
rules:
- apiGroups:
Expand Down
20 changes: 20 additions & 0 deletions installer/helm/chart/volcano/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,23 @@ custom:
admission_resources: ~
scheduler_resources: ~
controller_resources: ~

# Specify additional namespace selector expressions for Volcano admission webhooks.
# For example, if you want Volcano admission webhooks take effect in namespaces with
# label key="workload-type" and value="batch", and don't take effect in namespaces with
# label key="kubernetes.io/metadata.name" and values "excluded-ns-1" and "excluded-ns-2",
# you should set the following value:
#
# webhooks_namespace_selector_expressions:
# - key: workload-type
# operator: In
# values:
# - batch
# - key: kubernetes.io/metadata.name
# operator: NotIn
# values:
# - excluded-ns-1
# - excluded-ns-2
#
# Note that {{ .Release.Namespace }} and kube-system namespaces are always ignored.
webhooks_namespace_selector_expressions: ~

0 comments on commit ec37291

Please sign in to comment.