Skip to content

fix: add single-binary component to ingress NetworkPolicy - #19229

Merged
JStickler merged 3 commits into
grafana:mainfrom
puretension:fix-networkpolicy-singlebinary-19199
Oct 15, 2025
Merged

fix: add single-binary component to ingress NetworkPolicy#19229
JStickler merged 3 commits into
grafana:mainfrom
puretension:fix-networkpolicy-singlebinary-19199

Conversation

@puretension

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Fixes NetworkPolicy in single-binary deployment mode by adding single-binary component to the podSelector. This allows traffic from Alloy to reach Loki pods when deployed in single-binary mode without gateway.

Which issue(s) this PR fixes:
Fixes #19199

Special notes for your reviewer:

Single line fix that adds single-binary to the component values list when gateway is disabled. This ensures NetworkPolicy correctly matches single-binary pods.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory.
- Include 'single-binary' in NetworkPolicy podSelector when gateway is disabled
- Allows traffic from Alloy to Loki pods in single-binary deployment mode
- Fixes NetworkPolicy not matching single-binary component pods

Fixes grafana#19199

Signed-off-by: puretension <rlrlfhtm5@gmail.com>
@puretension
puretension requested a review from a team as a code owner September 18, 2025 17:03

@jkroepke jkroepke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - checked with

app.kubernetes.io/component: single-binary

@Jayclifford345 Jayclifford345 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@Jayclifford345
Jayclifford345 enabled auto-merge (squash) October 15, 2025 09:51
@JStickler
JStickler disabled auto-merge October 15, 2025 18:25
@JStickler
JStickler merged commit 1a7b489 into grafana:main Oct 15, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants