Skip to content

feat(chart): add configurable ServiceMonitor support - #214

Open
somaz94 wants to merge 1 commit into
supabase-community:mainfrom
somaz94:feat/chart-servicemonitor
Open

feat(chart): add configurable ServiceMonitor support#214
somaz94 wants to merge 1 commit into
supabase-community:mainfrom
somaz94:feat/chart-servicemonitor

Conversation

@somaz94

@somaz94 somaz94 commented Jul 3, 2026

Copy link
Copy Markdown

Adds opt-in Prometheus Operator ServiceMonitor support to the supabase chart, addressing #137.

A top-level serviceMonitor block gates creation behind a master switch plus a per-component toggle. A ServiceMonitor is created only for a component that is both deployed (deployment.<component>.enabled) and enabled under serviceMonitor.components.<component>. Global defaults (interval, scrapeTimeout, port, path, scheme, tlsConfig, relabelings, metricRelabelings) can be overridden per component. Everything defaults to off, so the rendered output is unchanged unless a user opts in, and no Prometheus Operator CRD is required for the default install.

To let each ServiceMonitor select a single component's Service, the recommended app.kubernetes.io/component label is added to every component Service. This is additive and does not change any existing selector.

Chart version bumped 0.6.0 -> 0.7.0 (minor, new feature).

Validation (local):

  • helm lint and ct lint pass
  • helm template with default values renders 0 ServiceMonitor
  • helm template with serviceMonitor.enabled plus per-component toggles renders one ServiceMonitor per enabled and deployed component, with per-component overrides applied
  • a component whose deployment is disabled renders no ServiceMonitor
  • ct install was not run locally (it needs a kind cluster). Because the feature defaults to off, the installed resources are unchanged apart from the additive Service label.

related: #137

@somaz94
somaz94 force-pushed the feat/chart-servicemonitor branch from 78f9939 to 0fa4f5e Compare July 6, 2026 03:22
@somaz94
somaz94 marked this pull request as ready for review July 6, 2026 03:22
@somaz94
somaz94 force-pushed the feat/chart-servicemonitor branch from 0fa4f5e to a134a74 Compare July 13, 2026 02:39
@somaz94
somaz94 force-pushed the feat/chart-servicemonitor branch from a134a74 to 4d8d768 Compare July 24, 2026 06:40
@somaz94

somaz94 commented Jul 30, 2026

Copy link
Copy Markdown
Author

Hi @luizfelmach — could you approve the workflow runs for this PR?

No checks have executed yet; they are queued awaiting first-time-contributor approval, so I have no way to show the change is green.

The PR adds configurable ServiceMonitor support to the chart (opt-in, disabled by default) and bumps the chart version. Thanks!

@luizfelmach

Copy link
Copy Markdown
Contributor

Hi @somaz94. Thanks for that. I need some time to test this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants