Skip to content

fix: prepend dash to METRICS_WORKLOAD_SUFFIX default in entrypoint.sh - #1008

Merged
emmaaroche merged 1 commit into
release-0.4from
fix/entrypoint-metrics-suffix-0.4
Nov 11, 2026
Merged

emmaaroche merged 1 commit into
release-0.4from
fix/entrypoint-metrics-suffix-0.4

Conversation

@emmaaroche

@emmaaroche emmaaroche commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes gateway traffic metrics displaying "-" instead of real numbers in older RHCL versions using console plugin v0.4.x.

Investigated with @Anton-Fil

Problem

The bash heredoc in entrypoint.sh uses ${METRICS_WORKLOAD_SUFFIX:-openshift-default} where the :- operator consumes the leading dash from the default value, producing 'openshift-default' instead of '-openshift-default' in config.js.

This breaks metric lookups:

  • Frontend builds key: namespace/gateway-name + openshift-default = namespace/gateway-nameopenshift-default
  • Prometheus stores: source_workload="gateway-name-openshift-default"
  • Keys don't match → metrics display "-"

Solution

Change line 8 to use double dash: ${METRICS_WORKLOAD_SUFFIX:--openshift-default}

The first dash belongs to the :- operator, the second dash is part of the default value.

Affected Versions

Older RHCL releases shipping console plugin v0.4.x with nginx + entrypoint.sh.

Testing

Same fix verified on release-0.6 (v0.6.0) - identical entrypoint.sh logic.

Before fix:

METRICS_WORKLOAD_SUFFIX: 'openshift-default'  // no dash

After fix:

METRICS_WORKLOAD_SUFFIX: '-openshift-default'  // has dash

Related

Signed-off-by: emmaaroche <eroche@redhat.com>
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c9430280-6aee-4263-b8bb-3b370a71d46f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@jasonmadigan jasonmadigan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@emmaaroche
emmaaroche marked this pull request as ready for review November 11, 2026 09:28
@emmaaroche
emmaaroche merged commit 5f62257 into release-0.4 Nov 11, 2026
11 checks passed
@emmaaroche
emmaaroche deleted the fix/entrypoint-metrics-suffix-0.4 branch November 11, 2026 09:29
@github-project-automation github-project-automation Bot moved this to Done in Kuadrant Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants