Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

metrics: add metrics for pod and namespace count #2324

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

shashankram
Copy link
Member

Description:
Adds metrics to report the number of monitored
namespaces and pods participating in the mesh.

Part of #902

Signed-off-by: Shashank Ram shashr2204@gmail.com

Affected area:

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ ]
  • CLI Tool [ ]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [X]
  • SMI Policy [ ]
  • Security [ ]
  • Tests [ ]
  • CI System [ ]
  • Performance [ ]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?
    No

Adds metrics to report the number of monitored
namespaces and pods participating in the mesh.

Part of openservicemesh#902

Signed-off-by: Shashank Ram <shashr2204@gmail.com>
@shashankram shashankram requested a review from a team as a code owner January 19, 2021 23:44
Copy link
Contributor

@ksubrmnn ksubrmnn left a comment

Choose a reason for hiding this comment

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

This looks good.

In the case of pods, how do we consider if we delete the mesh and the pods still have their sidecars. Then a new mesh is created and the namespace is added again. How do those old pods get counted here?

@shashankram
Copy link
Member Author

This looks good.

In the case of pods, how do we consider if we delete the mesh and the pods still have their sidecars. Then a new mesh is created and the namespace is added again. How do those old pods get counted here?

The metrics are pertaining to a particular instance of osm-controller. If we delete the mesh (osm-controller), and a new mesh (osm-controller) is created, the controller will receive the same events as the previous controller when its informer caches are initialized. This means metrics for namespaces and pods that were previously part of the mesh, will show the same count before and after they are associated with a different controller. This can be tested by restarting the osm-controller pod as an example.

@shashankram shashankram merged commit 712cf95 into openservicemesh:main Jan 20, 2021
@shashankram shashankram deleted the metrics branch January 20, 2021 00:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants