@@ -681,7 +681,7 @@ func registerDeploymentActivities(engine *ewf.Engine, metrics *metrics.Metrics,
681681 engine .Register (constants .StepStoreDeployment , StoreDeploymentStep (db , metrics , fileStorage , fileStorage ))
682682 engine .Register (constants .StepFetchKubeconfig , FetchKubeconfigStep (db , fileStorage , fileStorage , config .SSH .PrivateKeyPath ))
683683 engine .Register (constants .StepVerifyClusterReady , VerifyClusterReadyStep ())
684- engine .Register (constants .StepVerifyNewNodes , VerifyAddedNodeStep (db , config .SSH .PrivateKeyPath ))
684+ engine .Register (constants .StepVerifyNewNodes , VerifyAddedNodeStep (db , fileStorage , config .SSH .PrivateKeyPath ))
685685 engine .Register (constants .StepRemoveClusterFromDB , RemoveClusterFromDBStep (db , fileStorage , fileStorage , metrics , fileStorage ))
686686 engine .Register (constants .StepGatherAllContractIDs , GatherAllContractIDsStep (db ))
687687 engine .Register (constants .StepBatchCancelContracts , BatchCancelContractsStep ())
@@ -832,8 +832,7 @@ func retrieveKubeconfig(ctx context.Context, state ewf.State, db models.DB, file
832832
833833 if existingCluster .ID != 0 {
834834 if data , err := fileStorage .ReadKubeconfigFile (config .UserID , existingCluster .ID , existingCluster .ProjectName ); err == nil && len (data ) > 0 {
835- state ["kubeconfig" ] = string (data )
836- return nil
835+ return string (data ), nil
837836 }
838837 }
839838
@@ -855,9 +854,9 @@ func retrieveKubeconfig(ctx context.Context, state ewf.State, db models.DB, file
855854 return cluster .GetKubeconfig (ctx , string (privateKeyBytes ))
856855}
857856
858- func FetchKubeconfigStep (db models.DB , privateKeyPath string ) ewf.StepFn {
857+ func FetchKubeconfigStep (db models.DB , fileStorage * internal. FileStorageService , privateKeyPath string ) ewf.StepFn {
859858 return func (ctx context.Context , state ewf.State ) error {
860- kubeconfig , err := retrieveKubeconfig (ctx , state , db , privateKeyPath )
859+ kubeconfig , err := retrieveKubeconfig (ctx , state , db , fileStorage , privateKeyPath )
861860 if err != nil {
862861 return err
863862 }
@@ -866,15 +865,15 @@ func FetchKubeconfigStep(db models.DB, privateKeyPath string) ewf.StepFn {
866865 }
867866}
868867
869- func VerifyAddedNodeStep (db models.DB , privateKeyPath string ) ewf.StepFn {
868+ func VerifyAddedNodeStep (db models.DB , fileStorage * internal. FileStorageService , privateKeyPath string ) ewf.StepFn {
870869 return func (ctx context.Context , state ewf.State ) error {
871870 log := logger .ForOperation ("deployer_activities" , "verify_added_node" )
872871 node , err := getFromState [kubedeployer.Node ](state , "node" )
873872 if err != nil {
874873 return fmt .Errorf ("missing or invalid 'node' in state for verification: %w" , err )
875874 }
876875
877- kubeconfig , err := retrieveKubeconfig (ctx , state , db , privateKeyPath )
876+ kubeconfig , err := retrieveKubeconfig (ctx , state , db , fileStorage , privateKeyPath )
878877 if err != nil {
879878 return err
880879 }
0 commit comments