Documentation ¶
Index ¶
- Constants
- func GetAvailablePodsForRCs(c clientset.Interface, rcs []*api.ReplicationController, minReadySeconds int) (int, error)
- func GetNewRC(deployment extensions.Deployment, c clientset.Interface) (*api.ReplicationController, error)
- func GetNewRCFromList(deployment extensions.Deployment, c clientset.Interface, ...) (*api.ReplicationController, error)
- func GetNewRCTemplate(deployment extensions.Deployment) api.PodTemplateSpec
- func GetOldRCs(deployment extensions.Deployment, c clientset.Interface) ([]*api.ReplicationController, []*api.ReplicationController, error)
- func GetOldRCsFromLists(deployment extensions.Deployment, c clientset.Interface, ...) ([]*api.ReplicationController, []*api.ReplicationController, error)
- func GetReplicaCountForRCs(replicationControllers []*api.ReplicationController) int
- func Revision(rc *api.ReplicationController) (int64, error)
- func SetFromRCTemplate(deployment *extensions.Deployment, template api.PodTemplateSpec) *extensions.Deployment
Constants ¶
const (
// The revision annotation of a deployment's replication controllers which records its rollout sequence
RevisionAnnotation = "deployment.kubernetes.io/revision"
)
Variables ¶
This section is empty.
Functions ¶
func GetAvailablePodsForRCs ¶
func GetAvailablePodsForRCs(c clientset.Interface, rcs []*api.ReplicationController, minReadySeconds int) (int, error)
Returns the number of available pods corresponding to the given RCs.
func GetNewRC ¶
func GetNewRC(deployment extensions.Deployment, c clientset.Interface) (*api.ReplicationController, error)
GetNewRC returns an RC that matches the intent of the given deployment; get RCList from client interface. Returns nil if the new RC doesnt exist yet.
func GetNewRCFromList ¶
func GetNewRCFromList(deployment extensions.Deployment, c clientset.Interface, getRcList func(string, api.ListOptions) ([]api.ReplicationController, error)) (*api.ReplicationController, error)
GetNewRCFromList returns an RC that matches the intent of the given deployment; get RCList with the input function. Returns nil if the new RC doesnt exist yet.
func GetNewRCTemplate ¶
func GetNewRCTemplate(deployment extensions.Deployment) api.PodTemplateSpec
Returns the desired PodTemplateSpec for the new RC corresponding to the given RC.
func GetOldRCs ¶
func GetOldRCs(deployment extensions.Deployment, c clientset.Interface) ([]*api.ReplicationController, []*api.ReplicationController, error)
GetOldRCs returns the old RCs targeted by the given Deployment; get PodList and RCList from client interface. Note that the first set of old RCs doesn't include the ones with no pods, and the second set of old RCs include all old RCs.
func GetOldRCsFromLists ¶
func GetOldRCsFromLists(deployment extensions.Deployment, c clientset.Interface, getPodList func(string, api.ListOptions) (*api.PodList, error), getRcList func(string, api.ListOptions) ([]api.ReplicationController, error)) ([]*api.ReplicationController, []*api.ReplicationController, error)
GetOldRCsFromLists returns two sets of old RCs targeted by the given Deployment; get PodList and RCList with input functions. Note that the first set of old RCs doesn't include the ones with no pods, and the second set of old RCs include all old RCs.
func GetReplicaCountForRCs ¶
func GetReplicaCountForRCs(replicationControllers []*api.ReplicationController) int
Returns the sum of Replicas of the given replication controllers.
func Revision ¶
func Revision(rc *api.ReplicationController) (int64, error)
Revision returns the revision number of the input RC
func SetFromRCTemplate ¶
func SetFromRCTemplate(deployment *extensions.Deployment, template api.PodTemplateSpec) *extensions.Deployment
SetTemplate sets the desired PodTemplateSpec from an RC template to the given deployment.
Types ¶
This section is empty.