Skip to content

Commit

Permalink
in webhook add match condition by scheduler name filter pod resources
Browse files Browse the repository at this point in the history
Signed-off-by: rongfu.leng <[email protected]>
  • Loading branch information
lengrongfu committed Sep 26, 2024
1 parent 18d45c0 commit 8466dba
Show file tree
Hide file tree
Showing 3 changed files with 9,336 additions and 4 deletions.
10 changes: 8 additions & 2 deletions installer/helm/chart/volcano/templates/webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ webhooks:
namespace: {{ .Release.Namespace }}
path: /pods/mutate
port: 443
failurePolicy: Fail
failurePolicy: Ignore
matchPolicy: Equivalent
name: mutatepod.volcano.sh
namespaceSelector:
Expand All @@ -33,6 +33,9 @@ webhooks:
{{- end }}
objectSelector: {}
reinvocationPolicy: Never
matchConditions:
- expression: object.spec.schedulerName == 'volcano'
name: scheduler-name-match
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -262,7 +265,7 @@ webhooks:
namespace: {{ .Release.Namespace }}
path: /pods/validate
port: 443
failurePolicy: Fail
failurePolicy: Ignore
matchPolicy: Equivalent
name: validatepod.volcano.sh
namespaceSelector:
Expand All @@ -276,6 +279,9 @@ webhooks:
{{- toYaml .Values.custom.webhooks_namespace_selector_expressions | nindent 8 }}
{{- end }}
objectSelector: {}
matchConditions:
- expression: object.spec.schedulerName == 'volcano'
name: scheduler-name-match
rules:
- apiGroups:
- ""
Expand Down
10 changes: 8 additions & 2 deletions installer/volcano-development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5032,7 +5032,7 @@ webhooks:
namespace: volcano-system
path: /pods/mutate
port: 443
failurePolicy: Fail
failurePolicy: Ignore
matchPolicy: Equivalent
name: mutatepod.volcano.sh
namespaceSelector:
Expand All @@ -5044,6 +5044,9 @@ webhooks:
- kube-system
objectSelector: {}
reinvocationPolicy: Never
matchConditions:
- expression: object.spec.schedulerName == 'volcano'
name: scheduler-name-match
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -5227,7 +5230,7 @@ webhooks:
namespace: volcano-system
path: /pods/validate
port: 443
failurePolicy: Fail
failurePolicy: Ignore
matchPolicy: Equivalent
name: validatepod.volcano.sh
namespaceSelector:
Expand All @@ -5238,6 +5241,9 @@ webhooks:
- volcano-system
- kube-system
objectSelector: {}
matchConditions:
- expression: object.spec.schedulerName == 'volcano'
name: scheduler-name-match
rules:
- apiGroups:
- ""
Expand Down
Loading

0 comments on commit 8466dba

Please sign in to comment.