Skip to content

Commit

Permalink
Implement webhook validations for the XGBoostJob (#2052)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
  • Loading branch information
tenzen-y committed Apr 11, 2024
1 parent 1a73cf1 commit 824814c
Show file tree
Hide file tree
Showing 9 changed files with 427 additions and 317 deletions.
20 changes: 20 additions & 0 deletions manifests/base/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,23 @@ webhooks:
resources:
- tfjobs
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-kubeflow-org-v1-xgboostjob
failurePolicy: Fail
name: validator.xgboostjob.training-operator.kubeflow.org
rules:
- apiGroups:
- kubeflow.org
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- xgboostjobs
sideEffects: None
3 changes: 3 additions & 0 deletions manifests/base/webhook/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- op: replace
path: /webhooks/1/clientConfig/service/name
value: training-operator
- op: replace
path: /webhooks/2/clientConfig/service/name
value: training-operator
- op: replace
path: /metadata/name
value: validator.training-operator.kubeflow.org
87 changes: 0 additions & 87 deletions pkg/apis/kubeflow.org/v1/xgboost_validation.go

This file was deleted.

222 changes: 0 additions & 222 deletions pkg/apis/kubeflow.org/v1/xgboost_validation_test.go

This file was deleted.

Loading

0 comments on commit 824814c

Please sign in to comment.