Skip to content

Commit

Permalink
fix: Applicationset upsert for any namespaces (argoproj#15520)
Browse files Browse the repository at this point in the history
* fix: Applicationset upsert for any namespaces

PR implements a small change to the argocd command adding the AppsetNamespace for the existing Appset check.

Signed-off-by: Harm Matthias Harms <[email protected]>

* Retrigger CI pipeline

Signed-off-by: Harm Matthias Harms <[email protected]>

* Retrigger CI pipeline

Signed-off-by: Harm Matthias Harms <[email protected]>

---------

Signed-off-by: Harm Matthias Harms <[email protected]>
Signed-off-by: Jimmy Neville <[email protected]>
  • Loading branch information
harm-matthias-harms authored and Jneville0815 committed Sep 30, 2023
1 parent 87312be commit a673e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/argocd/commands/applicationset.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func NewApplicationSetCreateCommand(clientOpts *argocdclient.ClientOptions) *cob
defer argoio.Close(conn)

// Get app before creating to see if it is being updated or no change
existing, err := appIf.Get(ctx, &applicationset.ApplicationSetGetQuery{Name: appset.Name})
existing, err := appIf.Get(ctx, &applicationset.ApplicationSetGetQuery{Name: appset.Name, AppsetNamespace: appset.Namespace})
if grpc.UnwrapGRPCStatus(err).Code() != codes.NotFound {
errors.CheckError(err)
}
Expand Down

0 comments on commit a673e67

Please sign in to comment.