Deployment is created for RC attached with it's Pod.
()
| 57 | |
| 58 | // Deployment is created for RC attached with it's Pod. |
| 59 | func (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. |
| 83 | func (c *ReplicationController) Images() (images []*image.Image) { |