Documentation
¶
Overview ¶
Package releasemanager is a generated GoMock package.
Package releasemanager is a generated GoMock package.
Index ¶
- Constants
- Variables
- func Add(mgr manager.Manager, c utils.Config) error
- func ExpectedReleaseLatency(i Incarnation, max uint32) time.Duration
- func HasFailed(d Deployment) bool
- func NextIncrement(i Incarnation, max uint32) uint32
- func Scale(i Incarnation, max uint32, t time.Time) uint32
- type ClusterInfo
- type ClusterInfoList
- type ConfigMapList
- type Controller
- type Deployment
- type DeploymentStateManager
- type ExternalTestStatus
- type HorizontalPodAutoscalerList
- type Incarnation
- type IncarnationCollection
- type IncarnationController
- type Incarnations
- type List
- type MockDeployment
- type MockDeploymentMockRecorder
- type MockIncarnations
- type MockIncarnationsMockRecorder
- type ReconcileReleaseManager
- type ReplicaSetList
- type ResourceSyncer
- type ScalableTargetAdapter
- type SecretList
- type State
- func Canaried(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Canarying(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Created(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Deleted(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Deleting(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Deployed(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Deploying(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Failed(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Failing(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func PendingRelease(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func PendingTest(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Released(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Releasing(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Retired(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Retiring(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Tested(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Testing(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- func Timingout(ctx context.Context, deployment Deployment, lastUpdated *time.Time) (State, error)
- type StateHandler
Constants ¶
const (
DeployingTimeout = time.Duration(2) * time.Hour
)
const Threshold = 0.95
Variables ¶
var AllStates []string
Functions ¶
func Add ¶
Add creates a new ReleaseManager Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func ExpectedReleaseLatency ¶
func ExpectedReleaseLatency(i Incarnation, max uint32) time.Duration
func HasFailed ¶
func HasFailed(d Deployment) bool
func NextIncrement ¶
func NextIncrement(i Incarnation, max uint32) uint32
Types ¶
type ClusterInfo ¶
ClusterInfo records info needed to compute expected replicas
type ClusterInfoList ¶
type ClusterInfoList []ClusterInfo
ClusterInfoList is info for all relevent active clusters
func (*ClusterInfoList) ClusterCount ¶
func (c *ClusterInfoList) ClusterCount(liveness bool) int
ClusterCount returns the number of clusters by liveness (live vs. standby)
func (*ClusterInfoList) ExpectedReplicaCount ¶
func (c *ClusterInfoList) ExpectedReplicaCount(liveness bool, count int) int
ExpectedReplicaCount returns expected total replicas by liveness adjusted for scalingFactors
type ConfigMapList ¶
type ConfigMapList struct {
Item *corev1.ConfigMapList
}
func NewConfigMapList ¶
func NewConfigMapList() *ConfigMapList
func (*ConfigMapList) GetItems ¶
func (s *ConfigMapList) GetItems() (r []runtime.Object)
func (*ConfigMapList) GetList ¶
func (s *ConfigMapList) GetList() (r runtime.Object)
type Controller ¶
type Controller interface {
// contains filtered or unexported methods
}
Controller is incarnations interface into the outside scope
type Deployment ¶
type Deployment interface {
// contains filtered or unexported methods
}
type DeploymentStateManager ¶
type DeploymentStateManager struct {
// contains filtered or unexported fields
}
func NewDeploymentStateManager ¶
func NewDeploymentStateManager(deployment Deployment, lastUpdated *time.Time) *DeploymentStateManager
type ExternalTestStatus ¶
type ExternalTestStatus int
ExternalTestStatus summarizes a RevisionTarget's ExternalTest spec field.
const ( ExternalTestUnknown ExternalTestStatus = iota ExternalTestDisabled ExternalTestPending ExternalTestStarted ExternalTestFailed ExternalTestSucceeded )
func TargetExternalTestStatus ¶
func TargetExternalTestStatus(target *picchuv1alpha1.RevisionTarget) ExternalTestStatus
func (ExternalTestStatus) Enabled ¶
func (s ExternalTestStatus) Enabled() bool
func (ExternalTestStatus) Finished ¶
func (s ExternalTestStatus) Finished() bool
type HorizontalPodAutoscalerList ¶
type HorizontalPodAutoscalerList struct {
Item *autoscaling.HorizontalPodAutoscalerList
}
func NewHorizontalPodAutoscalerList ¶
func NewHorizontalPodAutoscalerList() *HorizontalPodAutoscalerList
func (*HorizontalPodAutoscalerList) GetItems ¶
func (s *HorizontalPodAutoscalerList) GetItems() (r []runtime.Object)
func (*HorizontalPodAutoscalerList) GetList ¶
func (s *HorizontalPodAutoscalerList) GetList() (r runtime.Object)
type Incarnation ¶
type Incarnation struct {
// contains filtered or unexported fields
}
Incarnation respresents an applied revision
func NewIncarnation ¶
func NewIncarnation(controller Controller, tag string, revision *picchuv1alpha1.Revision, log logr.Logger, di *observe.DeploymentInfo, config utils.Config) *Incarnation
NewIncarnation creates a new Incarnation
func (*Incarnation) CreatedOn ¶
func (i *Incarnation) CreatedOn() time.Time
CreatedOn returns the incarnations git timestamp
func (*Incarnation) State ¶
func (i *Incarnation) State() string
State returns the incarnations current state
func (*Incarnation) TTL ¶
func (i *Incarnation) TTL() time.Duration
TTL returns the incarnations release ttl
type IncarnationCollection ¶
type IncarnationCollection struct {
// contains filtered or unexported fields
}
IncarnationCollection helps us collect and select appropriate incarnations
type IncarnationController ¶
type IncarnationController struct {
// contains filtered or unexported fields
}
type Incarnations ¶
type Incarnations interface {
// contains filtered or unexported methods
}
type MockDeployment ¶
type MockDeployment struct {
// contains filtered or unexported fields
}
MockDeployment is a mock of Deployment interface
func NewMockDeployment ¶
func NewMockDeployment(ctrl *gomock.Controller) *MockDeployment
NewMockDeployment creates a new mock instance
func (*MockDeployment) EXPECT ¶
func (m *MockDeployment) EXPECT() *MockDeploymentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockDeploymentMockRecorder ¶
type MockDeploymentMockRecorder struct {
// contains filtered or unexported fields
}
MockDeploymentMockRecorder is the mock recorder for MockDeployment
type MockIncarnations ¶
type MockIncarnations struct {
// contains filtered or unexported fields
}
MockIncarnations is a mock of Incarnations interface
func NewMockIncarnations ¶
func NewMockIncarnations(ctrl *gomock.Controller) *MockIncarnations
NewMockIncarnations creates a new mock instance
func (*MockIncarnations) EXPECT ¶
func (m *MockIncarnations) EXPECT() *MockIncarnationsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockIncarnationsMockRecorder ¶
type MockIncarnationsMockRecorder struct {
// contains filtered or unexported fields
}
MockIncarnationsMockRecorder is the mock recorder for MockIncarnations
type ReconcileReleaseManager ¶
type ReconcileReleaseManager struct {
// contains filtered or unexported fields
}
ReconcileReleaseManager reconciles a ReleaseManager object
func (*ReconcileReleaseManager) Reconcile ¶
func (r *ReconcileReleaseManager) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a ReleaseManager object and makes changes based on the state read and what is in the ReleaseManager.Spec
type ReplicaSetList ¶
type ReplicaSetList struct {
Item *appsv1.ReplicaSetList
}
func NewReplicaSetList ¶
func NewReplicaSetList() *ReplicaSetList
func (*ReplicaSetList) GetItems ¶
func (s *ReplicaSetList) GetItems() (r []runtime.Object)
func (*ReplicaSetList) GetList ¶
func (s *ReplicaSetList) GetList() (r runtime.Object)
type ResourceSyncer ¶
type ResourceSyncer struct {
// contains filtered or unexported fields
}
type ScalableTargetAdapter ¶
type ScalableTargetAdapter struct {
Incarnation
}
func (*ScalableTargetAdapter) CanRampTo ¶
func (s *ScalableTargetAdapter) CanRampTo(desiredPercent uint32) bool
CanRampTo returns true if the target is considered ready to be scaled to the next increment.
func (*ScalableTargetAdapter) CurrentPercent ¶
func (s *ScalableTargetAdapter) CurrentPercent() uint32
func (*ScalableTargetAdapter) LastUpdated ¶
func (s *ScalableTargetAdapter) LastUpdated() time.Time
func (*ScalableTargetAdapter) PeakPercent ¶
func (s *ScalableTargetAdapter) PeakPercent() uint32
func (*ScalableTargetAdapter) ReleaseInfo ¶
func (s *ScalableTargetAdapter) ReleaseInfo() picchu.ReleaseInfo
type SecretList ¶
type SecretList struct {
Item *corev1.SecretList
}
func NewSecretList ¶
func NewSecretList() *SecretList
func (*SecretList) GetItems ¶
func (s *SecretList) GetItems() (r []runtime.Object)
func (*SecretList) GetList ¶
func (s *SecretList) GetList() (r runtime.Object)
type State ¶
type State string