copyImmutables sets any immutable fields from src on dst. Will panic if objects not of same type.
(src, dst KubeObject)
| 443 | |
| 444 | // copyImmutables sets any immutable fields from src on dst. Will panic if objects not of same type. |
| 445 | func copyImmutables(src, dst KubeObject) { |
| 446 | if src == nil || dst == nil { |
| 447 | return |
| 448 | } |
| 449 | |
| 450 | // each type has specific fields that must be copied |
| 451 | switch src := src.(type) { |
| 452 | case *kube.Service: |
| 453 | dst := dst.(*kube.Service) |
| 454 | dst.Spec.ClusterIP = src.Spec.ClusterIP |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | // printLoadBalancers blocks until all Services of type LoadBalancer have been deployed, printing it's details as it becomes available. |
| 459 | // Will panic if given something other than services |