Skip to content

Commit

Permalink
Add Namespace to app patching, to ensure telefonistka doesn't try to
Browse files Browse the repository at this point in the history
creare the app in the "default" NS:

 level=error msg="Failed to sync ArgoCD app from branch: err=Error
 patching app foobar-plg-gcp-eu-west1-v1 revision to
 8b7e075554240ae773ab8532935fd2e6fd687582 failed: rpc error: code =
 PermissionDenied desc = permission denied: applications, create,
 default/foobar-plg-gcp-eu-west1-v1, sub: telefonistka
  • Loading branch information
Oded-B committed Jul 2, 2024
1 parent c235871 commit 385a31b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/pkg/argocd/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ func SetArgoCDAppRevision(ctx context.Context, componentPath string, revision st

patchType := "merge"
_, err = appClient.Patch(ctx, &application.ApplicationPatchRequest{
Name: &foundApp.Name,
PatchType: &patchType,
Patch: &patch,
Name: &foundApp.Name,
AppNamespace: &foundApp.Namespace,
PatchType: &patchType,
Patch: &patch,
})
if err != nil {
return fmt.Errorf("Error patching app %s revision to %s failed: %v\n, patch: %v", foundApp.Name, revision, err, patch)
Expand Down

0 comments on commit 385a31b

Please sign in to comment.