gitops-engine icon indicating copy to clipboard operation
gitops-engine copied to clipboard

fix: show namespaced resources owned by cluster scoped resources

Open chetan-rns opened this issue 3 years ago • 30 comments

Currently, the namespaced resources owned by cluster scoped resources are not shown on the UI. This PR updates IterateHierarchy() to consider all resources(both cluster and namespace scoped) while managing a cluster-level object.

Part of: https://github.com/argoproj/argo-cd/issues/7733

Signed-off-by: Chetan Banavikalmutt [email protected]

chetan-rns avatar Jan 17 '22 10:01 chetan-rns

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
9.0% 9.0% Duplication

sonarqubecloud[bot] avatar Jan 17 '22 10:01 sonarqubecloud[bot]

Codecov Report

Attention: Patch coverage is 80.51948% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 55.23%. Comparing base (5fd9f44) to head (b1e7466). Report is 3 commits behind head on master.

:exclamation: Current head b1e7466 differs from pull request most recent head 1c693c0. Consider uploading reports for the commit 1c693c0 to get more accurate results

Files Patch % Lines
pkg/cache/cluster.go 84.93% 11 Missing :warning:
pkg/cache/settings.go 0.00% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #366      +/-   ##
==========================================
+ Coverage   54.71%   55.23%   +0.51%     
==========================================
  Files          41       41              
  Lines        4834     4908      +74     
==========================================
+ Hits         2645     2711      +66     
- Misses       1977     1985       +8     
  Partials      212      212              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 17 '22 10:01 codecov[bot]

Is this issue dead?

empath-nirvana avatar Mar 11 '22 14:03 empath-nirvana

@empath-nirvana Sorry! We moved it to v2.4 and I got busy with other stuff. I will try to address the comments soon and get them merged

chetan-rns avatar Mar 11 '22 14:03 chetan-rns

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
4.0% 4.0% Duplication

sonarqubecloud[bot] avatar Mar 25 '22 11:03 sonarqubecloud[bot]

Are we still waiting on this?

empath-nirvana avatar May 09 '22 19:05 empath-nirvana

when can this be added? we have a cluster scoped resource to represent a "tenant", which spins off many resources into a new namespace with the corresponding namespace name. without this merge we can only see the namespace, which is a huge bummer

the-scott-hand avatar Jun 30 '22 17:06 the-scott-hand

@alexmt can you take another look?

crenshaw-dev avatar Aug 15 '22 20:08 crenshaw-dev

is this issue dead? would love to see this feature get added

the-scott-hand avatar Oct 20 '22 22:10 the-scott-hand

I would also really like to have this feature. It's a big deficiency from the perspective of our management team. What is blocking this feature being added?

Are more changes needed? Is there an external dependency?

nicknezis avatar Oct 26 '22 13:10 nicknezis

@alexmt @crenshaw-dev The PR is ready for review. Please let me know if there are any changes needed

chetan-rns avatar Oct 27 '22 11:10 chetan-rns

@alexmt You asked me at kubecon to remind you about this PR -- said it's possible to enable this as a feature flag because of performance implications?

empath-nirvana avatar Oct 31 '22 14:10 empath-nirvana

Thank you for bringing this up @empath-nirvana ! Yeah, main concern was how this change might affect performance. Adding a feature flag is a good compromise.

alexmt avatar Oct 31 '22 16:10 alexmt

@chetan-rns can you please allow conditionally disable analyzing cluster level resource children to mitigate performance degradation?

alexmt avatar Oct 31 '22 16:10 alexmt

@chetan-rns Is there any progress on this issue? We would love to see this added since we are now missing tracking of some of our custom resources.

FlorisFeddema avatar Jan 17 '23 09:01 FlorisFeddema

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
1.7% 1.7% Duplication

sonarqubecloud[bot] avatar Jan 27 '23 09:01 sonarqubecloud[bot]

@chetan-rns are there any remaining blockers for this feature to be added? Would love to see this make it into a release!

the-scott-hand avatar Mar 29 '23 21:03 the-scott-hand

@the-scott-hand I've resolved the review comments @crenshaw-dev @leoluz Please do let me know if there are any other changes required to get this in.

chetan-rns avatar Apr 03 '23 13:04 chetan-rns

@leoluz @crenshaw-dev @chetan-rns any blockers or remaining changes that need to be made to get this merged and included in a release?

the-scott-hand avatar Sep 20 '23 20:09 the-scott-hand

We really would love to get this fix here, as we really want argo to manage and track resources created by operators, such as the gpu operator by nvidia, it hits this bug when you deploy it

lorelei-rupp-imprivata avatar Nov 01 '23 14:11 lorelei-rupp-imprivata

@chetan-rns are you still able to work on this?

crenshaw-dev avatar Nov 01 '23 14:11 crenshaw-dev

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
1.8% 1.8% Duplication

sonarqubecloud[bot] avatar Nov 03 '23 06:11 sonarqubecloud[bot]

@crenshaw-dev Thank you for your patience. I've addressed your comments. PTAL.

chetan-rns avatar Nov 03 '23 06:11 chetan-rns

Is there anything blocking this PR?

stefan01 avatar Feb 13 '24 15:02 stefan01

@chetan-rns could you open an Argo CD PR using this branch so we can run tests there? Besides that, I think this is good to go.

crenshaw-dev avatar Feb 13 '24 18:02 crenshaw-dev

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

sonarqubecloud[bot] avatar Feb 27 '24 07:02 sonarqubecloud[bot]

@crenshaw-dev I've rebased the existing Argo CD PR pointing to this branch.

https://github.com/argoproj/argo-cd/pull/8222

I think the SonarCloud check is failing due to issues already in the master.

chetan-rns avatar Feb 27 '24 09:02 chetan-rns

@chetan-rns @crenshaw-dev Anything else blocking this PR? Would love to see this feature finally added!

the-scott-hand avatar Mar 18 '24 22:03 the-scott-hand