lib/seira/pods.rb in seira-0.5.5 vs lib/seira/pods.rb in seira-0.5.6

- old
+ new

@@ -121,9 +121,16 @@ # This is useful if you would like to have a persistent connection that doesn't get killed # when someone updates the terminal deployment, or if you want to avoid noisy neighbors # connected to the same pod. def create_dedicated_pod(target_pod, pod_name = "temp-#{Random.unique_name}") spec = target_pod['spec'] + + # Clear out some fields that are maintained by Kubernetes + # and we don't want to duplicate from the old pod. + # If we don't clear nodeName, it'll try and schedule the + # new duplicated pod on the same node which may not fit. + spec['nodeName'] = nil + temp_pod = { apiVersion: target_pod['apiVersion'], kind: 'Pod', spec: spec, metadata: {