github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/process/upgrade_cluster/log_skipping_upgrade.go (about) 1 package upgrade_cluster 2 3 import ( 4 "time" 5 6 "github.com/kyma-project/kyma-environment-broker/internal/process" 7 "github.com/kyma-project/kyma-environment-broker/internal/storage" 8 9 "github.com/sirupsen/logrus" 10 11 "github.com/kyma-project/kyma-environment-broker/internal" 12 ) 13 14 type LogSkippingUpgradeStep struct { 15 operationManager *process.UpgradeClusterOperationManager 16 } 17 18 func (s *LogSkippingUpgradeStep) Name() string { 19 return "Log_Skipping_Upgrade" 20 } 21 22 func NewLogSkippingUpgradeStep(os storage.Operations) *LogSkippingUpgradeStep { 23 return &LogSkippingUpgradeStep{ 24 operationManager: process.NewUpgradeClusterOperationManager(os), 25 } 26 } 27 28 func (s *LogSkippingUpgradeStep) Run(operation internal.UpgradeClusterOperation, log logrus.FieldLogger) (internal.UpgradeClusterOperation, time.Duration, error) { 29 log.Info("Skipping cluster upgrade due to step condition not met") 30 31 return s.operationManager.OperationSucceeded(operation, "upgrade cluster skipped due to step condition", log) 32 }