Skip to content

Commit

Permalink
Update validatingwebhookconfigname
Browse files Browse the repository at this point in the history
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
  • Loading branch information
ritazh committed Apr 24, 2019
1 parent 3c593d1 commit 94c8d65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deploy/gatekeeper-constraint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ metadata:
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: validating-webhook-configuration
name: validating-webhook-configuration #validation.gatekeeper.sh after we cut a new release
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
4 changes: 2 additions & 2 deletions pkg/webhook/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
deserializer = codecs.UniversalDeserializer()
enableManualDeploy = flag.Bool("enable-manual-deploy", false, "allow users to manually create webhook related objects")
port = flag.Int("port", 443, "port for the server. defaulted to 443 if unspecified ")
webhookName = flag.String("webhook-name", "validation.gatekeeper.sh", "domain name of the webhook, with at least three segments separated by dots. defaulted to mutation.styra.com if unspecified ")
webhookName = flag.String("webhook-name", "validation.gatekeeper.sh", "domain name of the webhook, with at least three segments separated by dots. defaulted to validation.gatekeeper.sh if unspecified ")
)

// AddPolicyWebhook registers the policy webhook server with the manager
Expand Down Expand Up @@ -70,7 +70,7 @@ func AddPolicyWebhook(mgr manager.Manager, opa opa.Client) error {

if *enableManualDeploy == false {
serverOptions.BootstrapOptions = &webhook.BootstrapOptions{
MutatingWebhookConfigName: "gatekeeper",
ValidatingWebhookConfigName: *webhookName,
Secret: &apitypes.NamespacedName{
Namespace: namespace,
Name: "gatekeeper-webhook-server-secret",
Expand Down

0 comments on commit 94c8d65

Please sign in to comment.