fix: change when set context is called, and small changes

This commit is contained in:
Milos Pejanovic 2024-12-11 16:36:04 +01:00
parent 4430877d44
commit db26df38d6
3 changed files with 6 additions and 6 deletions

View File

@ -68,6 +68,9 @@ func patchDebug(baseDir string) error {
if &c == nil {
return nil
}
if err := kubectl.SetContext(c.Cluster); err != nil {
return err
}
g, err := grapple.NewGrapple(newLogEntry(flagDebug), c.Namespace, c.Deployment)
if err != nil {
return err
@ -76,9 +79,6 @@ func patchDebug(baseDir string) error {
if err != nil {
return err
}
if err := kubectl.SetContext(c.Cluster); err != nil {
return err
}
if err := g.Patch(c.Image, c.Container, nil); err != nil {
return err
}

View File

@ -104,7 +104,7 @@ func (g Grapple) Patch(image, container string, mounts []Mount) error {
return err
}
// get image used in the deployment so we can and platform
// get image used in the deployment
deploymentImage, err := g.kubeCmd.GetImage(ctx, g.deployment, container)
if err != nil {
return err

View File

@ -11,8 +11,8 @@ spec:
- name: {{ .Container }}
image: {{ .Image }}
imagePullPolicy: Always
command:
args:
command: ~
args: ~
livenessProbe: ~
readinessProbe: ~
startupProbe: ~