chore: tiny changes

mine
Antoine Meausoone 2020-08-20 22:07:37 +02:00
parent 3905ef7d02
commit 7665af1c6f
2 changed files with 5 additions and 6 deletions

View File

@ -484,7 +484,6 @@ func (p *Pod) SetImages(ctx context.Context, path string, spec v1.PodSpec) error
if err != nil {
return err
}
log.Info().Msgf("jsonPatch : %v", jsonPatch)
_, err = dial.CoreV1().Pods(ns).Patch(
ctx,
n,

View File

@ -167,11 +167,11 @@ func (s *SetImageExtender) getPodSpec(path string) (*corev1.PodSpec, error) {
if err != nil {
return nil, err
}
podSpecable, ok := res.(dao.ContainsPodSpec)
resourceWPodSpec, ok := res.(dao.ContainsPodSpec)
if !ok {
return nil, fmt.Errorf("expecting a podSpecable resource for %q", s.GVR())
return nil, fmt.Errorf("expecting a resourceWPodSpec resource for %q", s.GVR())
}
podSpec, err := podSpecable.GetPodSpec(path)
podSpec, err := resourceWPodSpec.GetPodSpec(path)
return podSpec, nil
}
@ -181,10 +181,10 @@ func (s *SetImageExtender) setImages(ctx context.Context, path string, spec core
return err
}
deployment, ok := res.(dao.ContainsPodSpec)
resourceWPodSpec, ok := res.(dao.ContainsPodSpec)
if !ok {
return fmt.Errorf("expecting a scalable resource for %q", s.GVR())
}
return deployment.SetImages(ctx, path, spec)
return resourceWPodSpec.SetImages(ctx, path, spec)
}