Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pkg/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package k8s

import (
"context"

log "github.com/sirupsen/logrus"
admissionv1beta1 "k8s.io/api/admissionregistration/v1beta1"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -72,7 +73,7 @@ func (k8s *k8s) PatchWebhookConfigurations(
MutatingWebhookConfigurations().
Get(context.TODO(), configurationNames, metav1.GetOptions{})
if err != nil {
log.WithField("err", err).Fatal("failed getting validating webhook")
log.WithField("err", err).Fatal("failed getting mutating webhook")
}

for i := range mutHook.Webhooks {
Expand All @@ -86,7 +87,7 @@ func (k8s *k8s) PatchWebhookConfigurations(
if _, err = k8s.clientset.AdmissionregistrationV1beta1().
MutatingWebhookConfigurations().
Update(context.TODO(), mutHook, metav1.UpdateOptions{}); err != nil {
log.WithField("err", err).Fatal("failed patching validating webhook")
log.WithField("err", err).Fatal("failed patching mutating webhook")
}
log.Debug("patched mutating hook")
} else {
Expand Down