diff --git a/server/application/application_validate_src_and_dest.go b/server/application/application_validate_src_and_dest.go index d79a26ede132e..94eb1f8033242 100644 --- a/server/application/application_validate_src_and_dest.go +++ b/server/application/application_validate_src_and_dest.go @@ -5,8 +5,6 @@ import ( "errors" "fmt" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" apierrors "k8s.io/apimachinery/pkg/api/errors" "github.com/argoproj/argo-cd/v3/pkg/apiclient/application" @@ -73,22 +71,5 @@ func validateDestination(ctx context.Context, dest *appv1.ApplicationDestination return errors.New("no destination defined in app spec") } _, err := argo.GetDestinationCluster(ctx, *dest, db) - if err != nil { - return err - } - - if dest.Server != "" { - // Ensure the k8s cluster the app is referencing, is configured in Argo CD - _, err := db.GetCluster(ctx, dest.Server) - if err != nil { - if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound { - return fmt.Errorf("cluster '%s' has not been configured", dest.Server) - } - return err - } - } else if dest.Server == "" { - return errors.New("destination server missing from app spec") - } - - return nil + return err }