Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: argocd notification controller app client permission issue #16057

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

mayzhang2000
Copy link
Contributor

When argocd notification controller starts without --application-namespaces, following error is in the log
cannot list resource "applications" in API group "argoproj.io" at the cluster scope

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

… namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>
@mayzhang2000 mayzhang2000 requested a review from a team as a code owner October 20, 2023 22:13
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (973565e) 49.55% compared to head (a0f7f35) 49.53%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16057      +/-   ##
==========================================
- Coverage   49.55%   49.53%   -0.03%     
==========================================
  Files         269      269              
  Lines       46595    46627      +32     
==========================================
+ Hits        23091    23097       +6     
- Misses      21232    21259      +27     
+ Partials     2272     2271       -1     
Files Coverage Δ
notification_controller/controller/controller.go 62.14% <100.00%> (+1.40%) ⬆️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mayzhang2000 mayzhang2000 changed the title Fix: argocd notification controller app client permission issue fix: argocd notification controller app client permission issue Oct 21, 2023
if len(applicationNamespaces) == 0 {
appClient = namespaceableAppClient.Namespace(namespace)
}
appClient = client.Resource(applications)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line needs to be removed. Maybe we forgot to clean it up during the fix..

Signed-off-by: May Zhang <may_zhang@intuit.com>
Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leoluz leoluz enabled auto-merge (squash) October 23, 2023 20:23
@leoluz leoluz merged commit f4e0d35 into argoproj:master Oct 23, 2023
25 checks passed
ymktmk pushed a commit to ymktmk/argo-cd that referenced this pull request Oct 29, 2023
…oproj#16057)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
@crenshaw-dev
Copy link
Member

/cherry-pick release-2.9

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 30, 2023
)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
@crenshaw-dev
Copy link
Member

/cherry-pick release-2.8

@crenshaw-dev
Copy link
Member

/cherry-pick release-2.7

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 30, 2023
)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
@crenshaw-dev
Copy link
Member

/cherry-pick release-2.6

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 30, 2023
)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 30, 2023
)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
crenshaw-dev pushed a commit that referenced this pull request Oct 30, 2023
) (#16159)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient



* fix go lint error



---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
Co-authored-by: May Zhang <may_zhang@intuit.com>
crenshaw-dev pushed a commit that referenced this pull request Oct 30, 2023
) (#16160)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient



* fix go lint error



---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
Co-authored-by: May Zhang <may_zhang@intuit.com>
crenshaw-dev pushed a commit that referenced this pull request Oct 30, 2023
) (#16161)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient



* fix go lint error



---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
Co-authored-by: May Zhang <may_zhang@intuit.com>
mayzhang2000 added a commit to mayzhang2000/argo-cd that referenced this pull request Oct 30, 2023
…oproj#16057)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
crenshaw-dev pushed a commit that referenced this pull request Oct 31, 2023
) (#16166)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient



* fix go lint error



---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
jmilic1 pushed a commit to jmilic1/argo-cd that referenced this pull request Nov 13, 2023
…oproj#16057)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
…oproj#16057)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
…oproj#16057)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
…oproj#16057)

* if applicationNamespaces is not provided as input parameter, then use namespaced appClient

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix go lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>

---------

Signed-off-by: May Zhang <may_zhang@intuit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants