migration

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExponentialBackoff

func ExponentialBackoff(backoff wait.Backoff, condition wait.ConditionFunc) error

ExponentialBackoff was copied from wait.ExponentialBackoff. Added log messages

func RetryOnError

func RetryOnError(backoff wait.Backoff, fn func() error) error

RetryOnError allows the caller to retry fn in case the error according to the provided function. backoff defines the maximum retries and the wait interval between two retries.

Types

type ScalingService

type ScalingService struct {
	// contains filtered or unexported fields
}

ScalingService can be used to scale up or down configured deployment

func NewScalingService

func NewScalingService(namespace string, deploymentName string, appInterface appsv1.AppsV1Interface) *ScalingService

NewScalingService creates a new ScalingService instance.

func (*ScalingService) ScaleDown

func (s *ScalingService) ScaleDown() error

ScaleDown scales down the deployment

func (*ScalingService) ScaleUp

func (s *ScalingService) ScaleUp() error

ScaleUp scales up the deployment

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service provides methods (Backup and Restore) to perform a migration from API Server version (0.2.x) to CRDs version (0.3.0).

func NewMigrationService

func NewMigrationService(scInterface v1beta1.ServicecatalogV1beta1Interface, storagePath string, releaseNamespace string, apiserverName string, webhookServiceName string, webhookServerPort string, k8sclient *k8sClientSet.Clientset) *Service

NewMigrationService creates a new instance of a Service

func (*Service) AddOwnerReferenceToSecret

func (m *Service) AddOwnerReferenceToSecret(sb *sc.ServiceBinding) error

AddOwnerReferenceToSecret updates a secret (referenced in the given ServiceBinding) by adding proper owner reference

func (*Service) AssertPersistentVolumeClaimDeleted

func (m *Service) AssertPersistentVolumeClaimDeleted(name string) error

AssertPersistentVolumeClaimDeleted deletes PVC resource in which backup data will be kept and make sure it was removed

func (*Service) AssertWebhookServerIsUp

func (m *Service) AssertWebhookServerIsUp() error

AssertWebhookServerIsUp make sure webhook server response for request with code 200

func (*Service) BackupResources

func (m *Service) BackupResources() (*ServiceCatalogResources, error)

BackupResources saves all Service Catalog resources to files.

func (*Service) Cleanup

func (m *Service) Cleanup(resources *ServiceCatalogResources) error

Cleanup deletes all given resources

func (*Service) DisableBlocker

func (m *Service) DisableBlocker(baseName string)

DisableBlocker deletes blocking validation webhook

func (*Service) EnableBlocker

func (m *Service) EnableBlocker(baseName string) error

EnableBlocker creates blocking validation webhook

func (*Service) IsMigrationRequired

func (m *Service) IsMigrationRequired() (bool, error)

IsMigrationRequired checks if current version of Service Catalog needs to be migrated

func (*Service) LoadResources

func (m *Service) LoadResources() (*ServiceCatalogResources, error)

LoadResources loads Service Catalog resources from files.

func (*Service) RemoveOwnerReferenceFromSecrets

func (m *Service) RemoveOwnerReferenceFromSecrets() error

RemoveOwnerReferenceFromSecrets removes owner references from secrets created for service bindings.

func (*Service) Restore

func (m *Service) Restore(res *ServiceCatalogResources) error

Restore restores Service Catalog resources and adds necessary owner reference to all secrets pointed by service bindings.

type ServiceCatalogResources

type ServiceCatalogResources struct {
	// contains filtered or unexported fields
}

ServiceCatalogResources aggregates all Service Catalog resources

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL