Skip to content

Commit

Permalink
Make webhook/manifests.yaml in sync with service_validator.go
Browse files Browse the repository at this point in the history
  • Loading branch information
mkimuram committed Mar 3, 2022
1 parent 2b374d7 commit 731c2fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
Expand Down
9 changes: 4 additions & 5 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: Cg==
- admissionReviewVersions:
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-service
failurePolicy: Fail
name: validate-externalip.webhook.svc
sideEffects: None
admissionReviewVersions:
- v1beta1
rules:
- apiGroups:
- ""
Expand All @@ -27,3 +25,4 @@ webhooks:
- UPDATE
resources:
- services
sideEffects: None
2 changes: 1 addition & 1 deletion pkg/validator/service_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
)
)

// +kubebuilder:webhook:path=/validate-service,mutating=false,failurePolicy=Ignore,groups="core",resources=services,verbs=create;update,versions=v1,name=validate-externalip.webhook.svc
// +kubebuilder:webhook:path=/validate-service,mutating=false,failurePolicy=Fail,groups="core",resources=services,verbs=create;update,versions=v1,name=validate-externalip.webhook.svc,sideEffects=None,admissionReviewVersions=v1beta1

type ServiceValidator struct {
allowedExternalIPNets []*net.IPNet
Expand Down

0 comments on commit 731c2fb

Please sign in to comment.