-
Notifications
You must be signed in to change notification settings - Fork 270
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: show namespaced resources owned by cluster scoped resources #366
base: master
Are you sure you want to change the base?
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov ReportAttention: Patch coverage is
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 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one comment regarding performance. I think introducing parent -> children index should reduce CPU usage and improve performance but it is a pretty dangerous change. I would move this change to v2.4
Is this issue dead? |
@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 |
5b257f8
to
a5891b2
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Are we still waiting on this? |
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 |
@alexmt can you take another look? |
is this issue dead? would love to see this feature get added |
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? |
@alexmt @crenshaw-dev The PR is ready for review. Please let me know if there are any changes needed |
@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? |
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. |
@chetan-rns can you please allow conditionally disable analyzing cluster level resource children to mitigate performance degradation? |
@chetan-rns Is there any progress on this issue? |
a5891b2
to
cb6b120
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check my comment
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@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 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. |
pkg/cache/cluster.go
Outdated
@@ -1032,6 +1050,12 @@ func (c *clusterCache) onNodeRemoved(key kube.ResourceKey) { | |||
if len(ns) == 0 { | |||
delete(c.nsIndex, key.Namespace) | |||
} | |||
|
|||
nsAll, ok := c.nsIndex[""] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this line. Why c.nsIndex[""]
and then delete by key
instead of ""
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the confusion. The nsIndex
is a map of map and I was using a reference of the internal map in IterateHierarchy()
. Since it was updating the original nsIndex
I was removing the updated element here.
I have now changed it to use a copy of the internal map instead of a reference so that we get rid of this update here.
@leoluz @crenshaw-dev @chetan-rns any blockers or remaining changes that need to be made to get this merged and included in a release? |
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 |
@chetan-rns are you still able to work on this? |
597e8ee
to
78e42e9
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@crenshaw-dev Thank you for your patience. I've addressed your comments. PTAL. |
Is there anything blocking this PR? |
@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. |
99788eb
to
b1e7466
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@crenshaw-dev I've rebased the existing Argo CD PR pointing to this branch. I think the SonarCloud check is failing due to issues already in the master. |
@chetan-rns @crenshaw-dev Anything else blocking this PR? Would love to see this feature finally added! |
40d7e7a
to
2b8fa3e
Compare
Signed-off-by: Chetan Banavikalmutt <[email protected]>
Signed-off-by: Chetan Banavikalmutt <[email protected]>
Signed-off-by: Chetan Banavikalmutt <[email protected]>
Signed-off-by: Chetan Banavikalmutt <[email protected]>
Signed-off-by: Chetan Banavikalmutt <[email protected]>
Signed-off-by: Chetan Banavikalmutt <[email protected]>
Signed-off-by: Chetan Banavikalmutt <[email protected]>
Signed-off-by: Lukas Wöhrl <[email protected]>
2b8fa3e
to
1c693c0
Compare
Quality Gate passedIssues Measures |
@chetan-rns @crenshaw-dev @leoluz @alexmt Any updates on this issue? Still would love to see this feature finally make its way into a release |
Friendly bump. Any updates on this one? |
Are there any plans to fix this? We would really love to see this implemented in Argo :) |
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: argoproj/argo-cd#7733
Signed-off-by: Chetan Banavikalmutt [email protected]