Documentation ¶
Index ¶
- Constants
- func GetAvailablePodsForReplicaSets(c clientset.Interface, rss []*extensions.ReplicaSet, minReadySeconds int) (int, error)
- func GetNewReplicaSet(deployment extensions.Deployment, c clientset.Interface) (*extensions.ReplicaSet, error)
- func GetNewReplicaSetFromList(deployment extensions.Deployment, c clientset.Interface, ...) (*extensions.ReplicaSet, error)
- func GetNewReplicaSetTemplate(deployment extensions.Deployment) api.PodTemplateSpec
- func GetOldReplicaSets(deployment extensions.Deployment, c clientset.Interface) ([]*extensions.ReplicaSet, []*extensions.ReplicaSet, error)
- func GetOldReplicaSetsFromLists(deployment extensions.Deployment, c clientset.Interface, ...) ([]*extensions.ReplicaSet, []*extensions.ReplicaSet, error)
- func GetReplicaCountForReplicaSets(replicaSets []*extensions.ReplicaSet) int
- func Revision(rs *extensions.ReplicaSet) (int64, error)
- func SetFromReplicaSetTemplate(deployment *extensions.Deployment, template api.PodTemplateSpec) *extensions.Deployment
Constants ¶
const ( // The revision annotation of a deployment's replica sets which records its rollout sequence RevisionAnnotation = "deployment.kubernetes.io/revision" // Here are the possible rollback event reasons RollbackRevisionNotFound = "DeploymentRollbackRevisionNotFound" RollbackTemplateUnchanged = "DeploymentRollbackTemplateUnchanged" RollbackDone = "DeploymentRollback" )
Variables ¶
This section is empty.
Functions ¶
func GetAvailablePodsForReplicaSets ¶ added in v1.0.0
func GetAvailablePodsForReplicaSets(c clientset.Interface, rss []*extensions.ReplicaSet, minReadySeconds int) (int, error)
Returns the number of available pods corresponding to the given replica sets.
func GetNewReplicaSet ¶ added in v1.0.0
func GetNewReplicaSet(deployment extensions.Deployment, c clientset.Interface) (*extensions.ReplicaSet, error)
GetNewReplicaSet returns a replica set that matches the intent of the given deployment; get ReplicaSetList from client interface. Returns nil if the new replica set doesnt exist yet.
func GetNewReplicaSetFromList ¶ added in v1.0.0
func GetNewReplicaSetFromList(deployment extensions.Deployment, c clientset.Interface, getRSList func(string, api.ListOptions) ([]extensions.ReplicaSet, error)) (*extensions.ReplicaSet, error)
GetNewReplicaSetFromList returns a replica set that matches the intent of the given deployment; get ReplicaSetList with the input function. Returns nil if the new replica set doesnt exist yet.
func GetNewReplicaSetTemplate ¶ added in v1.0.0
func GetNewReplicaSetTemplate(deployment extensions.Deployment) api.PodTemplateSpec
Returns the desired PodTemplateSpec for the new ReplicaSet corresponding to the given ReplicaSet.
func GetOldReplicaSets ¶ added in v1.0.0
func GetOldReplicaSets(deployment extensions.Deployment, c clientset.Interface) ([]*extensions.ReplicaSet, []*extensions.ReplicaSet, error)
GetOldReplicaSets returns the old replica sets targeted by the given Deployment; get PodList and ReplicaSetList from client interface. Note that the first set of old replica sets doesn't include the ones with no pods, and the second set of old replica sets include all old replica sets.
func GetOldReplicaSetsFromLists ¶ added in v1.0.0
func GetOldReplicaSetsFromLists(deployment extensions.Deployment, c clientset.Interface, getPodList func(string, api.ListOptions) (*api.PodList, error), getRSList func(string, api.ListOptions) ([]extensions.ReplicaSet, error)) ([]*extensions.ReplicaSet, []*extensions.ReplicaSet, error)
GetOldReplicaSetsFromLists returns two sets of old replica sets targeted by the given Deployment; get PodList and ReplicaSetList with input functions. Note that the first set of old replica sets doesn't include the ones with no pods, and the second set of old replica sets include all old replica sets.
func GetReplicaCountForReplicaSets ¶ added in v1.0.0
func GetReplicaCountForReplicaSets(replicaSets []*extensions.ReplicaSet) int
Returns the sum of Replicas of the given replica sets.
func Revision ¶ added in v1.0.0
func Revision(rs *extensions.ReplicaSet) (int64, error)
Revision returns the revision number of the input replica set
func SetFromReplicaSetTemplate ¶ added in v1.0.0
func SetFromReplicaSetTemplate(deployment *extensions.Deployment, template api.PodTemplateSpec) *extensions.Deployment
SetFromReplicaSetTemplate sets the desired PodTemplateSpec from a replica set template to the given deployment.
Types ¶
This section is empty.