Skip to content

Commit

Permalink
Fix typo in getKabitJob function name (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlin authored and k8s-ci-robot committed Dec 12, 2019
1 parent 4057a58 commit aefa758
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/v1alpha3/pod/inject_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func NewSidecarInjector(c client.Client, ms string) *sidecarInjector {
}

func (s *sidecarInjector) MutationRequired(pod *v1.Pod, ns string) (bool, error) {
jobKind, jobName, err := getKabitJob(pod)
jobKind, jobName, err := getKatibJob(pod)
if err != nil {
return false, nil
}
Expand All @@ -131,7 +131,7 @@ func (s *sidecarInjector) MutationRequired(pod *v1.Pod, ns string) (bool, error)
func (s *sidecarInjector) Mutate(pod *v1.Pod, namespace string) (*v1.Pod, error) {
mutatedPod := pod.DeepCopy()

kind, trialName, _ := getKabitJob(pod)
kind, trialName, _ := getKatibJob(pod)
trial := &trialsv1alpha3.Trial{}
if err := s.client.Get(context.TODO(), apitypes.NamespacedName{Name: trialName, Namespace: namespace}, trial); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/webhook/v1alpha3/pod/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
jobv1alpha3 "github.com/kubeflow/katib/pkg/job/v1alpha3"
)

func getKabitJob(pod *v1.Pod) (string, string, error) {
func getKatibJob(pod *v1.Pod) (string, string, error) {
for _, gvk := range jobv1alpha3.GetSupportedJobList() {
owners := pod.GetOwnerReferences()
for _, owner := range owners {
Expand Down

0 comments on commit aefa758

Please sign in to comment.