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

Method Deployment

pkg/entity/pod.go:82–103  ·  view source on GitHub ↗

Deployment is created containing Pod with attached Containers.

()

Source from the content-addressed store, hash-verified

80
81// Deployment is created containing Pod with attached Containers.
82func (c *Pod) Deployment() (*deploy.Deployment, error) {
83 deployment := deploy.Deployment{}
84
85 // create Pod from tree of Entities
86 kubePod, childObj, err := c.data()
87 if err != nil {
88 return nil, err
89 }
90
91 // add Pod to deployment
92 err = deployment.Add(kubePod)
93 if err != nil {
94 return nil, err
95 }
96
97 // add child objects
98 err = deployment.AddDeployment(childObj)
99 if err != nil {
100 return nil, err
101 }
102 return &deployment, nil
103}
104
105// Images for all Containers in Pod
106func (c *Pod) Images() (images []*image.Image) {

Callers 5

TestPodNoContainersFunction · 0.95
TestPodNoImageFunction · 0.95
TestPodAttachImageFunction · 0.95
TestPodAttachContainerFunction · 0.95

Calls 3

dataMethod · 0.95
AddMethod · 0.95
AddDeploymentMethod · 0.95

Tested by 5

TestPodNoContainersFunction · 0.76
TestPodNoImageFunction · 0.76
TestPodAttachImageFunction · 0.76
TestPodAttachContainerFunction · 0.76