Skip to content

Add optional ServiceMonitor in flyte-binary - #8154

Merged
Sovietaced merged 1 commit into
flyteorg:masterfrom
ChickenBenny:feat/6437-flyte-binary-servicemonitor
Oct 12, 2026
Merged

Sovietaced merged 1 commit into
flyteorg:masterfrom
ChickenBenny:feat/6437-flyte-binary-servicemonitor

Conversation

@ChickenBenny

Copy link
Copy Markdown
Contributor

Tracking issue

Closes #6437

Why are the changes needed?

The monitoring docs tell flyte-binary users to expose an http-metrics port (10254) and say this
"enables the serviceMonitor", but the flyte-binary chart doesn't ship a ServiceMonitor, so users
have to write their own (as flyte-core already provides one per component).

What changes were proposed in this pull request?

  • Add templates/service-monitor.yaml to the flyte-binary chart, gated by serviceMonitor.enabled
    (default false, so clusters without the Prometheus Operator CRDs are unaffected).
  • Add serviceMonitor.{enabled, interval, scrapeTimeout, labels} to values.yaml.
  • The selector uses flyte-binary.baseLabels (name + instance). selectorLabels can't be used
    because it includes app.kubernetes.io/component, which the Services don't carry.
  • Update the flyte-binary section of the monitoring docs and regenerate the chart README.

How was this patch tested?

  • helm template with default values: no ServiceMonitor rendered.
  • helm template with serviceMonitor.enabled=true + service.extraPorts (http-metrics: 10254):
    the ServiceMonitor's matchLabels match the http Service's labels, and the Service exposes http-metrics.
  • helm lint passes; make helm produces no changes to generated manifests.

Labels

  • added

Setup process

cd charts/flyte-binary
helm dependency build .

# Default: no ServiceMonitor is rendered
helm template test . -n flyte | grep -c "kind: ServiceMonitor"   # 0

# Enabled: ServiceMonitor is rendered and selects the http Service
helm template test . -n flyte \
  --set serviceMonitor.enabled=true \
  --set 'service.extraPorts[0].name=http-metrics' \
  --set 'service.extraPorts[0].port=10254' \
  | grep -A20 "kind: ServiceMonitor"

Screenshots

N/A

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

N/A

Docs link

Changed: docs/deployment/configuration/monitoring.rst (Prometheus setup → flyte-binary tab)

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.32%. Comparing base (204f8c7) to head (05bbcef).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8154      +/-   ##
==========================================
- Coverage   57.33%   57.32%   -0.02%     
==========================================
  Files         931      931              
  Lines       58331    58331              
==========================================
- Hits        33445    33439       -6     
- Misses      21833    21839       +6     
  Partials     3053     3053              
Flag Coverage Δ
unittests-datacatalog 53.62% <ø> (ø)
unittests-flyteadmin 53.22% <ø> (-0.04%) ⬇️
unittests-flytecopilot 48.05% <ø> (ø)
unittests-flytectl 64.11% <ø> (ø)
unittests-flyteidl 76.63% <ø> (ø)
unittests-flyteplugins 60.64% <ø> (ø)
unittests-flytepropeller 53.84% <ø> (ø)
unittests-flytestdlib 64.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: ChickenBenny <zxc123benny14159@gmail.com>
@Sovietaced
Sovietaced force-pushed the feat/6437-flyte-binary-servicemonitor branch from 23e6cdb to 05bbcef Compare October 12, 2026 16:54
@Sovietaced
Sovietaced merged commit f85149a into flyteorg:master Oct 12, 2026
54 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants