Skip to content

Commit

Permalink
✨ add defaulting to admission webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengqi Yu committed May 14, 2019
1 parent 94092c7 commit daecca7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/webhook/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ func (c Config) ToWebhook() admissionreg.Webhook {
FailurePolicy: &failurePolicy,
ClientConfig: admissionreg.WebhookClientConfig{
Service: &admissionreg.ServiceReference{
Path: &path,
Name: "webhook-service",
Namespace: "system",
Path: &path,
},
},
}
Expand Down Expand Up @@ -147,6 +149,9 @@ func (Generator) Generate(ctx *genall.GenerationContext) error {
Kind: "MutatingWebhookConfiguration",
APIVersion: admissionreg.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Name: "mutating-webhook-configuration",
},
Webhooks: mutatingCfgs,
})
}
Expand All @@ -157,6 +162,9 @@ func (Generator) Generate(ctx *genall.GenerationContext) error {
Kind: "ValidatingWebhookConfiguration",
APIVersion: admissionreg.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Name: "validating-webhook-configuration",
},
Webhooks: validatingCfgs,
})

Expand Down

0 comments on commit daecca7

Please sign in to comment.