Skip to content

feat: introduce serviceMonitor and labels to services#6340

Merged
oilbeater merged 1 commit intokubeovn:masterfrom
swisscom:feat/monitoring-in-chart
Feb 26, 2026
Merged

feat: introduce serviceMonitor and labels to services#6340
oilbeater merged 1 commit intokubeovn:masterfrom
swisscom:feat/monitoring-in-chart

Conversation

@oujonny
Copy link
Copy Markdown
Contributor

@oujonny oujonny commented Feb 25, 2026

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes

This PR introduces serviceMonitors to the v2 helm chart and sets proper labels for the services.

We would love to see backports into v1.14.x and v1.15.x, but we can also easy do it just on our side.

Which issue(s) this PR fixes

Fixes #6339

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @oujonny, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the observability of Kube-OVN services by integrating them with Prometheus through the introduction of ServiceMonitor resources. It also improves Kubernetes resource management by applying consistent, standardized labels to the core Kube-OVN services, making them easier to identify and manage within a Kubernetes cluster.

Highlights

  • Prometheus Integration: Introduced ServiceMonitor resources for Kube-OVN agent, controller, monitor, and pinger components, enabling their metrics to be scraped by Prometheus.
  • Standardized Labels: Applied standard Kubernetes recommended labels (app.kubernetes.io/name and app.kubernetes.io/part-of) to the services of the agent, controller, monitor, and pinger for improved identification and management.
  • Configurability: Added new configuration options in values.yaml to allow enabling or disabling the deployment of these ServiceMonitor resources for each component.
Changelog
  • charts/kube-ovn-v2/templates/agent/agent-service.yaml
    • Added app.kubernetes.io/name: kube-ovn-cni and app.kubernetes.io/part-of: kube-ovn labels.
  • charts/kube-ovn-v2/templates/agent/agent-servicemonitor.yaml
    • Created a new ServiceMonitor resource for the Kube-OVN CNI agent.
  • charts/kube-ovn-v2/templates/controller/controller-service.yaml
    • Added app.kubernetes.io/name: kube-ovn-controller and app.kubernetes.io/part-of: kube-ovn labels.
  • charts/kube-ovn-v2/templates/controller/controller-servicemonitor.yaml
    • Created a new ServiceMonitor resource for the Kube-OVN controller.
  • charts/kube-ovn-v2/templates/monitor/monitor-service.yaml
    • Added app.kubernetes.io/name: kube-ovn-monitor and app.kubernetes.io/part-of: kube-ovn labels.
  • charts/kube-ovn-v2/templates/monitor/monitor-servicemonitor.yaml
    • Created a new ServiceMonitor resource for the Kube-OVN monitor.
  • charts/kube-ovn-v2/templates/pinger/pinger-service.yaml
    • Added app.kubernetes.io/name: kube-ovn-pinger and app.kubernetes.io/part-of: kube-ovn labels.
  • charts/kube-ovn-v2/templates/pinger/pinger-servicemonitor.yaml
    • Created a new ServiceMonitor resource for the Kube-OVN pinger.
  • charts/kube-ovn-v2/values.yaml
    • Added serviceMonitor configuration with an enabled flag for the pinger component.
    • Added serviceMonitor configuration with an enabled flag for the monitor component.
    • Added serviceMonitor configuration with an enabled flag for the controller component.
    • Added serviceMonitor configuration with an enabled flag for the agent component.
Activity
  • Pull request created by oujonny.
  • No further review comments or activity recorded yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Signed-off-by: oujonny <jonny@immerda.ch>
@oujonny oujonny force-pushed the feat/monitoring-in-chart branch from 869a182 to a3a8709 Compare February 25, 2026 13:08
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces ServiceMonitor resources for various Kube-OVN components and adds standard labels to the corresponding services. The changes are well-structured and follow Helm best practices. However, I've found a critical issue in the label selectors for the controller, monitor, and pinger ServiceMonitor resources. They use an incorrect label key, which will prevent them from discovering their target services. I've left specific comments with suggestions for fixing this. Once these are addressed, the PR should be good to go.

@oujonny oujonny marked this pull request as ready for review February 25, 2026 13:34
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. chart Helm Chart labels Feb 25, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 25, 2026
@oilbeater oilbeater merged commit ca8b1c8 into kubeovn:master Feb 26, 2026
76 of 77 checks passed
oilbeater pushed a commit that referenced this pull request Feb 26, 2026
Signed-off-by: oujonny <jonny@immerda.ch>
(cherry picked from commit ca8b1c8)
oilbeater pushed a commit that referenced this pull request Feb 26, 2026
Signed-off-by: oujonny <jonny@immerda.ch>
(cherry picked from commit ca8b1c8)
@oilbeater
Copy link
Copy Markdown
Collaborator

@oujonny I have backport it to release-1.15 and release-1.14

@oujonny
Copy link
Copy Markdown
Contributor Author

oujonny commented Feb 26, 2026

Awsome! Thanks for the nice collaborations:)

@oilbeater

Do you plan to release a v1.14.x version with the chart updates and the live-migration fixes?

@oilbeater
Copy link
Copy Markdown
Collaborator

@oujonny v1.14.31 includes these patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart Helm Chart lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Helm v2 charts break ServiceMonitor

3 participants