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

[chore] Enhancement of MeshSync Discovery #233

Closed
theBeginner86 opened this issue Aug 29, 2023 · 8 comments
Closed

[chore] Enhancement of MeshSync Discovery #233

theBeginner86 opened this issue Aug 29, 2023 · 8 comments
Assignees
Labels
area/devops area/lifecycle Lifecycle management (install, uninstall, configure) related help wanted Extra attention is needed issue/willfix This issue will be worked on kind/enhancement Improvement in current feature kubernetes language/go Golang related

Comments

@theBeginner86
Copy link
Member

theBeginner86 commented Aug 29, 2023

Current Behavior

Currently, every attributes of all resources is not being discovered by MeshSync.

For
Deployments:

Screenshot 2023-08-29 at 7 55 02 PM Screenshot 2023-08-29 at 7 53 25 PM

For Namespace:

Screenshot 2023-08-29 at 7 54 15 PM

Desired Behavior

Ensure MeshSync tracks all attributes of discovered objects. Eg for namspaces.

Contributor Resources

The meshery.io website uses Jekyll and GitHub Pages. Site content is found under the master branch.

@theBeginner86 theBeginner86 added the kind/enhancement Improvement in current feature label Aug 29, 2023
@welcome
Copy link

welcome bot commented Aug 29, 2023

Thanks for opening this issue. A contributor will be by to give feedback soon. In the meantime, please review the Layer5 Community Welcome Guide and sure to join the community Slack.

@theBeginner86
Copy link
Member Author

FYI @Aritra8438 @VaibhavMalik4187

@leecalcote leecalcote added the help wanted Extra attention is needed label Aug 29, 2023
@VaibhavMalik4187
Copy link
Contributor

VaibhavMalik4187 commented Sep 4, 2023

@theBeginner86 I need some help here, could you please share some documentation related to the codebase structure?

@leecalcote leecalcote added language/go Golang related kubernetes area/devops area/lifecycle Lifecycle management (install, uninstall, configure) related labels Sep 18, 2023
@KiptoonKipkurui
Copy link
Member

@theBeginner86 I have been looking into this issue, and I would like some clarification on whats the desired behavior in terms of an apples to apples comparison i.e either current Deployment To Desired Deployment object or current Namespace to desired Namespace object attributes.
I looked at the unstructured object returned being converted in model_converter.go at runtime and all configuration under the spec field for both Deployments and Namespaces were captured as the attributes. The Namespace object had only the finalizer attribute under the spec field. In comparing a Deployment object to a Namespace object, it may look like the Deployment object has more attributes than the Namespace object while in reality the Namespace object has few/one configured attribute.
I would like your clarification on this to enable me help out on the issue.

@theBeginner86
Copy link
Member Author

theBeginner86 commented Sep 21, 2023

@theBeginner86 I have been looking into this issue, and I would like some clarification on whats the desired behavior in terms of an apples to apples comparison i.e either current Deployment To Desired Deployment object or current Namespace to desired Namespace object attributes.
I looked at the unstructured object returned being converted in model_converter.go at runtime and all configuration under the spec field for both Deployments and Namespaces were captured as the attributes. The Namespace object had only the finalizer attribute under the spec field. In comparing a Deployment object to a Namespace object, it may look like the Deployment object has more attributes than the Namespace object while in reality the Namespace object has few/one configured attribute.
I would like your clarification on this to enable me help out on the issue.

I see. Thanks for taking a look.
I was thinking that we had some one off condition that was just looking for labels for resources of Deployment type. But after looking at your comment and this part of the Namespace spec It looks like we might have to augment our discovery logic a bit.
I wonder if we could use this getLabels function from kubernetes/apimachinery

The original ask was to update our existing MeshSync discovery pipeline to ensure that more metadata (like labels and annotations) is available for every Kubernetes resource discovered by MeshSync.
So, in the screenshot above I was giving an example of how MeshSync is aware of labels that are assigned to a Deployment but we currently are not tracking that for most of other resources, like Namespace in the above example.

@KiptoonKipkurui
Copy link
Member

@theBeginner86 Let me look into this and see how much more information about an object we can capture

Copy link

stale bot commented Nov 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Nov 7, 2023
@theBeginner86 theBeginner86 added issue/willfix This issue will be worked on and removed issue/stale Issue has not had any activity for an extended period of time labels Nov 7, 2023
@theBeginner86
Copy link
Member Author

We can close this issue.
As I realized that I was querying wrong datable. The required information is already available in kubernetes_key_value table.

Reference:
Screenshot 2023-11-17 at 5 42 21 PM

So by default we should be looking at kubernetes_key_value as for every discovered object the labels and annotation are are stored in that specific table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devops area/lifecycle Lifecycle management (install, uninstall, configure) related help wanted Extra attention is needed issue/willfix This issue will be worked on kind/enhancement Improvement in current feature kubernetes language/go Golang related
Projects
None yet
Development

No branches or pull requests

4 participants