deepCopy creates a deep copy of the Kubernetes object given.
(obj KubeObject)
| 235 | |
| 236 | // deepCopy creates a deep copy of the Kubernetes object given. |
| 237 | func deepCopy(obj KubeObject) (KubeObject, error) { |
| 238 | copy, err := kube.Scheme.DeepCopy(obj) |
| 239 | if err != nil { |
| 240 | return nil, err |
| 241 | } |
| 242 | return copy.(KubeObject), nil |
| 243 | } |
| 244 | |
| 245 | var ( |
| 246 | // ErrorConflict is returned when an object with an identical path already exists in the Deployment. |