Documentation ¶
Index ¶
Constants ¶
const ( StableRevisionAnnotation = "rollout.cloud.run/stableRevision" CandidateRevisionAnnotation = "rollout.cloud.run/candidateRevision" LastFailedCandidateRevisionAnnotation = "rollout.cloud.run/lastFailedCandidateRevision" LastRolloutAnnotation = "rollout.cloud.run/lastRollout" LastHealthReportAnnotation = "rollout.cloud.run/lastHealthReport" )
Annotations name for information related to the rollout.
const ( StableTag = "stable" CandidateTag = "candidate" LatestTag = "latest" )
Automatic tags.
Variables ¶
This section is empty.
Functions ¶
func DetectCandidateRevisionName ¶
DetectCandidateRevisionName attempts to deduce what revision could be considered a candidate.
func DetectStableRevisionName ¶
func DetectStableRevisionName(svc *run.Service) string
DetectStableRevisionName returns the stable revision of the Cloud Run service.
It first checks if there's a revision with the tag "stable". If such a revision does not exist, it checks for a revision with 100% of the traffic and considers it stable.
Types ¶
type Rollout ¶
type Rollout struct {
// contains filtered or unexported fields
}
Rollout is the rollout manager.
func New ¶
func New(ctx context.Context, metricsProvider metrics.Provider, svcRecord *ServiceRecord, strategy config.Strategy) *Rollout
New returns a new rollout manager.
func (*Rollout) UpdateService ¶
UpdateService changes the traffic configuration for the revisions and update the service.
func (*Rollout) WithClient ¶
WithClient updates the client in the rollout instance.
type ServiceRecord ¶
ServiceRecord holds a service object and information about it.