Skip to content

fix(chart): honour namespaceOverride for the ingester Service - #587

Merged
leoparente merged 2 commits into
developfrom
fix/chart-namespace-override
Sep 1, 2026
Merged

fix(chart): honour namespaceOverride for the ingester Service#587
leoparente merged 2 commits into
developfrom
fix/chart-namespace-override

Conversation

@leoparente

Copy link
Copy Markdown
Contributor

Fixes MON-329.

Problem

With namespaceOverride set, Service/diode-ingester is created in the release namespace while its Deployment lands in the override namespace. The Service selects no pods and ingestion is unreachable.

Rendering -n rel-ns with namespaceOverride: my-ns on develop:

kind name namespace
Deployment diode-ingester my-ns
Service diode-ingester rel-ns ← wrong
Service diode-reconciler my-ns

diode-ingester-service.yaml:6 was the only diode-owned template still using .Release.Namespace directly. The other 18, including the equivalent reconciler Service, already go through diode.namespace.

diode.auth.hostname had the same mismatch in reverse: it built its FQDN from .Release.Namespace while Service/diode-auth does follow the override, so it addressed a namespace the Service wasn't in.

The part the original report got wrong

MON-329 proposed changing all five hostname helpers to use diode.namespace. That would have broken working deployments, and I only caught it by checking where the subchart Services actually land:

namespace=my-ns:   diode-auth, diode-reconciler        (diode's own templates)
namespace=rel-ns:  diode-postgresql, diode-redis-*,
                   diode-hydra-*, ingress-nginx        (subcharts)

Subcharts don't follow namespaceOverride. Their Services genuinely stay in the release namespace, so diode.postgresql.hostname, diode.redis.hostname and the two hydra helpers pointing at .Release.Namespace are correct today. Only diode.auth.hostname targets a diode-owned Service, so only it changes. The four that stay now carry a comment explaining why, so they don't get "fixed" later.

That also dissolves the third item in the ticket. The Hydra issuer in values.yaml targets a subchart Service, so its .Release.Namespace is right as it stands — no need to promote namespaceOverride to a global value, and no breaking values change.

Documentation

namespaceOverride appeared in neither values.yaml nor the README despite diode.namespace supporting it, which is most of why this went unnoticed. Now documented, including the caveat that dependencies stay in the release namespace.

Verification

With -n rel-ns and namespaceOverride: my-ns:

develop fixed
Service/diode-ingester rel-ns my-ns (matches its Deployment)
diode-auth FQDN rel-ns my-ns (matches its Service)
postgres / redis / hydra FQDNs rel-ns rel-ns (unchanged, still correct)

With default values, byte-identical to develop once the chart version label is held constant. Same with namespaceOverride set equal to the release namespace. helm lint clean. Chart bumped 1.15.21.15.3.

🤖 Generated with Claude Code

With namespaceOverride set, Service/diode-ingester was created in the
release namespace while its Deployment landed in the override namespace,
so the Service selected no pods and ingestion was unreachable. It was the
only diode-owned template still using .Release.Namespace directly; the
other 18, including the equivalent reconciler Service, already went
through the diode.namespace helper.

Also fix diode.auth.hostname, which built its FQDN from .Release.Namespace
while Service/diode-auth follows the override, so the address pointed at a
namespace the Service was not in.

The four dependency hostnames (postgresql, redis, hydra public/admin) are
deliberately left on .Release.Namespace, with a comment saying why:
subcharts do not follow namespaceOverride, so their Services genuinely stay
in the release namespace. Rendering shows diode-postgresql, diode-redis-*
and diode-hydra-* there while diode's own resources move. Pointing those
helpers at diode.namespace, as the original report suggested, would have
broken working deployments.

That also removes the need to promote namespaceOverride to a global value:
the Hydra issuer in values.yaml targets a subchart Service, so its use of
.Release.Namespace is correct as it stands.

namespaceOverride was undocumented in both values.yaml and the README,
which is most of why this went unnoticed. Documented, including the caveat
that dependencies stay in the release namespace.

Verified by rendering with `-n rel-ns` and `namespaceOverride: my-ns`:
Service/diode-ingester moves rel-ns -> my-ns and matches its Deployment;
diode-auth resolves to my-ns; postgres, redis and hydra still resolve to
rel-ns. With default values, and with namespaceOverride equal to the
release namespace, output is byte-identical to develop.

Fixes MON-329

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@leoparente

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T00:35:39.508427Z a37cc71 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bffb21e8fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread charts/diode/values.yaml
diode-postgresql-initdb-scripts-configmap and
diode-hydra-extra-initcontainer-configmap were rendered into the override
namespace, while the pods that consume them (StatefulSet/diode-postgresql,
Deployment/diode-hydra, Job/diode-hydra-automigrate) stay in the release
namespace because subcharts do not follow namespaceOverride. ConfigMap
volume and envFrom references are namespace-scoped, so PostgreSQL could not
mount its initdb script and Hydra's init container could not read its env.

Same rule as the dependency hostname helpers: diode-owned resources that a
subchart consumes belong alongside their consumer, not with diode's own
workloads. Commented in both templates so the reason travels with the code.

Pre-existing rather than introduced here, but this PR documents
namespaceOverride as supported, so leaving it would have documented a
configuration that cannot start.

Verified: with namespaceOverride set, both ConfigMaps and all three
consumers now render into the release namespace. With default values the
rendered objects are semantically identical to develop (70 objects, zero
differing); the only textual change is the added comments.

Caught in review by Codex on #587.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@leoparente

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: a37cc71f15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@leoparente
leoparente merged commit 1f8082c into develop Sep 1, 2026
7 checks passed
@leoparente
leoparente deleted the fix/chart-namespace-override branch September 1, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants