Skip to content

Commit

Permalink
set validationwebhookconfig as Fail close by default for remote clust…
Browse files Browse the repository at this point in the history
…ers (istio#28389)

* set validationwebhookconfig as fail-close by default in remote cluster

* refine code comments
  • Loading branch information
irisdingbj authored Nov 4, 2020
1 parent 4796334 commit 33bc956
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/webhooks/validation/controller/controller.go
Original file line number Diff line number Diff line change
@@ -364,6 +364,10 @@ func (c *Controller) reconcileRequest(req *reconcileRequest) error {
}

func (c *Controller) readyForFailClose() bool {
//no synchronization issues for remote cluster, set as fail-close by default
if c.o.RemoteWebhookConfig {
return true
}
if !c.dryRunOfInvalidConfigRejected {
if rejected, reason := c.isDryRunOfInvalidConfigRejected(); !rejected {
scope.Infof("Not ready to switch validation to fail-closed: %v", reason)

0 comments on commit 33bc956

Please sign in to comment.