Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
fix failure typos in webhook creators
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Stringer <[email protected]>
  • Loading branch information
trstringer committed Nov 10, 2021
1 parent 7297153 commit e6784a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pkg/injector/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ func patchAdmissionResponse(resp *admissionv1.AdmissionResponse, patchBytes []by
func createOrUpdateMutatingWebhook(clientSet kubernetes.Interface, cert certificate.Certificater, webhookTimeout int32, webhookName, meshName, osmNamespace, osmVersion string, enableReconciler bool) error {
webhookPath := webhookCreatePod
webhookPort := int32(constants.InjectorWebhookPort)
failuerPolicy := admissionregv1.Fail
matchPolict := admissionregv1.Exact
failurePolicy := admissionregv1.Fail
matchPolicy := admissionregv1.Exact

mwhcLabels := map[string]string{
constants.OSMAppNameLabelKey: constants.OSMAppNameLabelValue,
Expand Down Expand Up @@ -430,8 +430,8 @@ func createOrUpdateMutatingWebhook(clientSet kubernetes.Interface, cert certific
Port: &webhookPort,
},
CABundle: cert.GetCertificateChain()},
FailurePolicy: &failuerPolicy,
MatchPolicy: &matchPolict,
FailurePolicy: &failurePolicy,
MatchPolicy: &matchPolicy,
NamespaceSelector: &metav1.LabelSelector{
MatchLabels: map[string]string{
constants.OSMKubeResourceMonitorAnnotation: meshName,
Expand Down
8 changes: 4 additions & 4 deletions pkg/validator/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const (
func createOrUpdateValidatingWebhook(clientSet kubernetes.Interface, cert certificate.Certificater, webhookName, meshName, osmNamespace, osmVersion string, validateTrafficTarget bool, enableReconciler bool) error {
webhookPath := validationAPIPath
webhookPort := int32(constants.ValidatorWebhookPort)
failuerPolicy := admissionregv1.Fail
matchPolict := admissionregv1.Exact
failurePolicy := admissionregv1.Fail
matchPolicy := admissionregv1.Exact

rules := []admissionregv1.RuleWithOperations{
{
Expand Down Expand Up @@ -77,8 +77,8 @@ func createOrUpdateValidatingWebhook(clientSet kubernetes.Interface, cert certif
Port: &webhookPort,
},
CABundle: cert.GetCertificateChain()},
FailurePolicy: &failuerPolicy,
MatchPolicy: &matchPolict,
FailurePolicy: &failurePolicy,
MatchPolicy: &matchPolicy,
NamespaceSelector: &metav1.LabelSelector{
MatchLabels: map[string]string{
constants.OSMKubeResourceMonitorAnnotation: meshName,
Expand Down

0 comments on commit e6784a2

Please sign in to comment.