Skip to content

Commit

Permalink
[cosigned] The webhook name is now configurable via --webhook-name flag
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Nachev <vladimir.nachev@sap.com>
  • Loading branch information
vpnachev committed Apr 12, 2022
1 parent f983706 commit 56af7f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/cosign/webhook/main.go
Expand Up @@ -47,7 +47,7 @@ var secretName = flag.String("secret-name", "", "The name of the secret in the w
// webhookName holds the name of the validating webhook to set up with the
// types we are watching. If this changes, you must also change:
// ./config/500-webhook-configuration.yaml
const webhookName = "cosigned.sigstore.dev"
var webhookName = flag.String("webhook-name", "cosigned.sigstore.dev", "The name of the webhook.")

func main() {
opts := webhook.Options{
Expand Down Expand Up @@ -92,7 +92,7 @@ func NewValidatingAdmissionController(ctx context.Context, cmw configmap.Watcher

return validation.NewAdmissionController(ctx,
// Name of the resource webhook.
webhookName,
*webhookName,

// The path on which to serve the webhook.
"/validations",
Expand Down Expand Up @@ -123,7 +123,7 @@ func NewMutatingAdmissionController(ctx context.Context, cmw configmap.Watcher)

return defaulting.NewAdmissionController(ctx,
// Name of the resource webhook.
webhookName,
*webhookName,

// The path on which to serve the webhook.
"/mutations",
Expand Down

0 comments on commit 56af7f3

Please sign in to comment.