MCPcopy
hub / github.com/redspread/spread / copyImmutables

Function copyImmutables

pkg/deploy/cluster.go:445–456  ·  view source on GitHub ↗

copyImmutables sets any immutable fields from src on dst. Will panic if objects not of same type.

(src, dst KubeObject)

Source from the content-addressed store, hash-verified

443
444// copyImmutables sets any immutable fields from src on dst. Will panic if objects not of same type.
445func 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

Callers 1

updateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected