Documentation
¶
Index ¶
- Variables
- func GetFinalTargetRevision(service *servingv1.Service, config *servingv1.Configuration, ...) []v1.TargetRevision
- func GetInitialTargetRevision(service *servingv1.Service, config *servingv1.Configuration, ...) []v1.TargetRevision
- func NewInitialFinalTargetRev(initialRevisionStatus, ultimateRevisionTarget []v1.TargetRevision, ...) *v1.RolloutOrchestrator
- func ReadIntAnnotation(revision *servingv1.Revision, key string) (result *int32)
- func ReadIntRevisionRecord(val RevisionRecord) (min *int32, max *int32)
- func ReadIntServiceAnnotation(service *servingv1.Service, key string) (result *int32)
- func UpdateInitialFinalTargetRev(ultimateRevisionTarget []v1.TargetRevision, ro *v1.RolloutOrchestrator, ...)
- type RevisionRecord
Constants ¶
This section is empty.
Variables ¶
var ( // OverSubRatio is the parameter, that determines how much percentage of the traffic to shift // from the old to the new revision during each stage in the progressive rollout. OverSubRatio = 10 // DefaultStageRolloutTimeout is the default timeout for stage to accomplish during the rollout. DefaultStageRolloutTimeout = 2 // GroupName is the group name. GroupName = "rollout.knative.dev" // OverConsumptionRatioKey is the annotation key Knative Service can use to specify the over consumption ratio. OverConsumptionRatioKey = GroupName + "/over-consumption-ratio" // StageRolloutTimeout is the annotation key Knative Service can use to specify the stage rollout timeout. StageRolloutTimeout = GroupName + "/stage-rollout-timeout" // ProgressiveRolloutEnabled is the annotation key Knative Service can use to enable or disable the progressive rollout. ProgressiveRolloutEnabled = GroupName + "/progressive-rollout-enabled" // ProgressiveRolloutStrategy determines the mode to roll out the new revision progressively. ProgressiveRolloutStrategy = GroupName + "/progressive-rollout-strategy" // ConfigMapName is the name of the ConfigMap, that saves the configuration information about the rollout orchestrator. ConfigMapName = "config-rolloutorchestrator" // ConfigMapNetworkName is the name of the ConfigMap, that saves the configuration information about the network. ConfigMapNetworkName = "config-network" )
Functions ¶
func GetFinalTargetRevision ¶ added in v0.40.4
func GetFinalTargetRevision(service *servingv1.Service, config *servingv1.Configuration, records map[string]RevisionRecord) []v1.TargetRevision
GetFinalTargetRevision is used to generate the ultimateRevisionTarget. Both of them are needed for the RolloutOrchestrator creation. Only ultimateRevisionTarget for the RolloutOrchestrator update.
func GetInitialTargetRevision ¶ added in v0.40.4
func GetInitialTargetRevision(service *servingv1.Service, config *servingv1.Configuration, records map[string]RevisionRecord, route *servingv1.Route) []v1.TargetRevision
GetInitialTargetRevision is used to generate the initialTargetRevision. Both of them are needed for the RolloutOrchestrator creation. Only ultimateRevisionTarget for the RolloutOrchestrator update.
func NewInitialFinalTargetRev ¶
func NewInitialFinalTargetRev(initialRevisionStatus, ultimateRevisionTarget []v1.TargetRevision, service *servingv1.Service) *v1.RolloutOrchestrator
NewInitialFinalTargetRev creates a RolloutOrchestrator with InitialRevisions and TargetRevisions.
func ReadIntAnnotation ¶
ReadIntAnnotation reads the int value of a specific key in the annotation of the revision.
func ReadIntRevisionRecord ¶
func ReadIntRevisionRecord(val RevisionRecord) (min *int32, max *int32)
ReadIntRevisionRecord reads the minScale and maxScale in the RevisionRecord.
func ReadIntServiceAnnotation ¶
ReadIntServiceAnnotation reads the int value of a specific key in the annotation of the service.
func UpdateInitialFinalTargetRev ¶
func UpdateInitialFinalTargetRev(ultimateRevisionTarget []v1.TargetRevision, ro *v1.RolloutOrchestrator, route *servingv1.Route, deploymentLister appsv1listers.DeploymentLister)
UpdateInitialFinalTargetRev updates InitialRevisions, TargetRevisions and StageTargetRevisions for RolloutOrchestrator. Param: ultimateRevisionTarget is the most updated target revisions. Param: ro is the custom resource of RolloutOrchestrator.
Types ¶
type RevisionRecord ¶
RevisionRecord is a struct that hosts the name, minScale and maxScale for the revision.