Documentation ¶
Overview ¶
Package migrations organises required migrations of eirini managed k8s objects
Index ¶
- Constants
- type AdjustCPURequest
- type AdoptJobRegistrySecret
- type AdoptPDB
- type AdoptStatefulsetRegistrySecret
- type AnnotationSetter
- type CPURequestSetter
- type Executor
- type JobsClient
- type MigrationProvider
- type MigrationStep
- type MigrationStepsProvider
- type ObjectType
- type PDBClient
- type SecretsClient
- type StatefulsetsClient
Constants ¶
View Source
const ( AdjustCPUResourceSequenceID = 1 AdoptPDBSequenceID = 2 AdoptStSetSecretSequenceID = 3 AdoptJobSecretSequenceID = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjustCPURequest ¶
type AdjustCPURequest struct {
// contains filtered or unexported fields
}
func NewAdjustCPURequest ¶
func NewAdjustCPURequest(cpuRequestSetter CPURequestSetter) AdjustCPURequest
func (AdjustCPURequest) AppliesTo ¶
func (m AdjustCPURequest) AppliesTo() ObjectType
func (AdjustCPURequest) SequenceID ¶
func (m AdjustCPURequest) SequenceID() int
type AdoptJobRegistrySecret ¶
type AdoptJobRegistrySecret struct {
// contains filtered or unexported fields
}
func NewAdoptJobRegistrySecret ¶
func NewAdoptJobRegistrySecret(secretsClient SecretsClient) AdoptJobRegistrySecret
func (AdoptJobRegistrySecret) AppliesTo ¶
func (m AdoptJobRegistrySecret) AppliesTo() ObjectType
func (AdoptJobRegistrySecret) SequenceID ¶
func (m AdoptJobRegistrySecret) SequenceID() int
type AdoptPDB ¶
type AdoptPDB struct {
// contains filtered or unexported fields
}
func NewAdoptPDB ¶
func (AdoptPDB) AppliesTo ¶
func (m AdoptPDB) AppliesTo() ObjectType
func (AdoptPDB) SequenceID ¶
type AdoptStatefulsetRegistrySecret ¶
type AdoptStatefulsetRegistrySecret struct {
// contains filtered or unexported fields
}
func NewAdoptStatefulsetRegistrySecret ¶
func NewAdoptStatefulsetRegistrySecret(secretsClient SecretsClient) AdoptStatefulsetRegistrySecret
func (AdoptStatefulsetRegistrySecret) AppliesTo ¶
func (m AdoptStatefulsetRegistrySecret) AppliesTo() ObjectType
func (AdoptStatefulsetRegistrySecret) SequenceID ¶
func (m AdoptStatefulsetRegistrySecret) SequenceID() int
type AnnotationSetter ¶
type CPURequestSetter ¶
type CPURequestSetter interface {
SetCPURequest(ctx context.Context, stSet *appsv1.StatefulSet, cpuRequest *resource.Quantity) (*appsv1.StatefulSet, error)
}
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(stSetClient StatefulsetsClient, jobsClient JobsClient, migrationStepProvider MigrationProvider) *Executor
type JobsClient ¶
type MigrationProvider ¶
type MigrationProvider interface { Provide() []MigrationStep GetLatestMigrationIndex() int }
func CreateMigrationStepsProvider ¶
func CreateMigrationStepsProvider(stSetClient *client.StatefulSet, pdbClient *client.PodDisruptionBudget, secretsClient *client.Secret, workloadsNamespace string) MigrationProvider
type MigrationStep ¶
type MigrationStepsProvider ¶
type MigrationStepsProvider struct {
// contains filtered or unexported fields
}
func NewMigrationStepsProvider ¶
func NewMigrationStepsProvider(migrationSteps []MigrationStep) MigrationStepsProvider
func (MigrationStepsProvider) GetLatestMigrationIndex ¶
func (p MigrationStepsProvider) GetLatestMigrationIndex() int
func (MigrationStepsProvider) Provide ¶
func (p MigrationStepsProvider) Provide() []MigrationStep
type ObjectType ¶
type ObjectType string
const ( StatefulSetObjectType ObjectType = "StatefulSet" JobObjectType ObjectType = "Job" )
type PDBClient ¶
type PDBClient interface { Get(ctx context.Context, namespace, name string) (*v1beta1.PodDisruptionBudget, error) SetOwner(ctx context.Context, pdb *v1beta1.PodDisruptionBudget, owner *appsv1.StatefulSet) (*v1beta1.PodDisruptionBudget, error) }
type SecretsClient ¶
type StatefulsetsClient ¶
type StatefulsetsClient interface { GetBySourceType(ctx context.Context, sourceType string) ([]appsv1.StatefulSet, error) SetAnnotation(ctx context.Context, statefulSet *appsv1.StatefulSet, key, value string) (*appsv1.StatefulSet, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.