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

Method Deployment

pkg/entity/replicationcontroller.go:59–80  ·  view source on GitHub ↗

Deployment is created for RC attached with it's Pod.

()

Source from the content-addressed store, hash-verified

57
58// Deployment is created for RC attached with it's Pod.
59func (c *ReplicationController) Deployment() (*deploy.Deployment, error) {
60 deployment := new(deploy.Deployment)
61
62 // create RC
63 kubeRC, childObj, err := c.data()
64 if err != nil {
65 return nil, err
66 }
67
68 // add RC to deployment
69 err = deployment.Add(kubeRC)
70 if err != nil {
71 return nil, err
72 }
73
74 // add child objects
75 err = deployment.AddDeployment(childObj)
76 if err != nil {
77 return nil, err
78 }
79 return deployment, nil
80}
81
82// Images contained by ReplicationController's Pods.
83func (c *ReplicationController) Images() (images []*image.Image) {

Callers 2

TestRCNoPodFunction · 0.95
TestRCValidPodDeploymentFunction · 0.95

Calls 3

dataMethod · 0.95
AddDeploymentMethod · 0.80
AddMethod · 0.45

Tested by 2

TestRCNoPodFunction · 0.76
TestRCValidPodDeploymentFunction · 0.76