Skip to content

Commit c4ef222

Browse files
authored
Merge branch 'sync-3.0.2' into add-github-api-metrics
2 parents cdd4e82 + 21a8655 commit c4ef222

2 files changed

Lines changed: 2 additions & 20 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ RUN apt-get update && \
4747
apt-get install curl -y && \
4848
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
4949
apt-get install git-lfs -y && \
50+
apt-get remove --purge -y curl && \
5051
groupadd -g $ARGOCD_USER_ID argocd && \
5152
useradd -r -u $ARGOCD_USER_ID -g argocd argocd && \
5253
mkdir -p /home/argocd && \

server/application/application_validate_src_and_dest.go

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
"errors"
66
"fmt"
77

8-
"google.golang.org/grpc/codes"
9-
"google.golang.org/grpc/status"
108
apierrors "k8s.io/apimachinery/pkg/api/errors"
119

1210
"github.com/argoproj/argo-cd/v3/pkg/apiclient/application"
@@ -73,22 +71,5 @@ func validateDestination(ctx context.Context, dest *appv1.ApplicationDestination
7371
return errors.New("no destination defined in app spec")
7472
}
7573
_, err := argo.GetDestinationCluster(ctx, *dest, db)
76-
if err != nil {
77-
return err
78-
}
79-
80-
if dest.Server != "" {
81-
// Ensure the k8s cluster the app is referencing, is configured in Argo CD
82-
_, err := db.GetCluster(ctx, dest.Server)
83-
if err != nil {
84-
if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound {
85-
return fmt.Errorf("cluster '%s' has not been configured", dest.Server)
86-
}
87-
return err
88-
}
89-
} else if dest.Server == "" {
90-
return errors.New("destination server missing from app spec")
91-
}
92-
93-
return nil
74+
return err
9475
}

0 commit comments

Comments
 (0)