Documentation ¶
Index ¶
- func FindActiveOrLatest(newRS *appsv1.ReplicaSet, oldRSs []*appsv1.ReplicaSet) *appsv1.ReplicaSet
- func FindNewReplicaSet(rollout *v1alpha1.Rollout, rsList []*appsv1.ReplicaSet) *appsv1.ReplicaSet
- func FindOldReplicaSets(rollout *v1alpha1.Rollout, rsList []*appsv1.ReplicaSet) []*appsv1.ReplicaSet
- func GetActualReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
- func GetAvailableReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
- func GetReadyReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
- func GetReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
- func MaxRevision(allRSs []*appsv1.ReplicaSet) int64
- func NewRSNewReplicas(rollout *v1alpha1.Rollout, allRSs []*appsv1.ReplicaSet, ...) (int32, error)
- func Revision(obj runtime.Object) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindActiveOrLatest ¶
func FindActiveOrLatest(newRS *appsv1.ReplicaSet, oldRSs []*appsv1.ReplicaSet) *appsv1.ReplicaSet
FindActiveOrLatest returns the only active or the latest replica set in case there is at most one active replica set. If there are more active replica sets, then we should proportionally scale them.
func FindNewReplicaSet ¶
func FindNewReplicaSet(rollout *v1alpha1.Rollout, rsList []*appsv1.ReplicaSet) *appsv1.ReplicaSet
FindNewReplicaSet returns the new RS this given rollout targets.
func FindOldReplicaSets ¶
func FindOldReplicaSets(rollout *v1alpha1.Rollout, rsList []*appsv1.ReplicaSet) []*appsv1.ReplicaSet
FindOldReplicaSets returns the old replica sets targeted by the given Rollout, with the given slice of RSes.
func GetActualReplicaCountForReplicaSets ¶
func GetActualReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
GetActualReplicaCountForReplicaSets returns the sum of actual replicas of the given replica sets.
func GetAvailableReplicaCountForReplicaSets ¶
func GetAvailableReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
GetAvailableReplicaCountForReplicaSets returns the number of available pods corresponding to the given replica sets.
func GetReadyReplicaCountForReplicaSets ¶
func GetReadyReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
GetReadyReplicaCountForReplicaSets returns the number of ready pods corresponding to the given replica sets.
func GetReplicaCountForReplicaSets ¶
func GetReplicaCountForReplicaSets(replicaSets []*appsv1.ReplicaSet) int32
GetReplicaCountForReplicaSets returns the sum of Replicas of the given replica sets.
func MaxRevision ¶
func MaxRevision(allRSs []*appsv1.ReplicaSet) int64
MaxRevision finds the highest revision in the replica sets
func NewRSNewReplicas ¶
func NewRSNewReplicas(rollout *v1alpha1.Rollout, allRSs []*appsv1.ReplicaSet, newRS *appsv1.ReplicaSet) (int32, error)
NewRSNewReplicas calculates the number of replicas a Rollout's new RS should have. When one of the followings is true, we're rolling out the deployment; otherwise, we're scaling it. 1) The new RS is saturated: newRS's replicas == deployment's replicas 2) Max number of pods allowed is reached: deployment's replicas + maxSurge == all RSs' replicas
Types ¶
This section is empty.