fix(agent): deploy workloads into their own namespace, not the agent's - #585
Merged
Merged
Conversation
worker_default_env derived K8S_NAMESPACE from var.namespace, which is
documented as "Kubernetes namespace where the nullplatform agent will run" and
defaults to nullplatform-tools. Every k8s-scope worker therefore deployed its
application pods next to the agent instead of into nullplatform.
The block's own example a few lines below already shows the intended value:
- { name: K8S_NAMESPACE, value: nullplatform }
and nullplatform/scopes ships K8S_NAMESPACE: nullplatform as the k8s scope
default, which is where every pre-worker agent deployed. The code and the
documentation disagreed; the code was wrong.
Splits the two concepts: var.namespace keeps meaning where the agent runs, and
the new var.workload_namespace is what the workers receive, defaulting to
nullplatform.
Callers that want workloads next to the agent can set workload_namespace to the
same value as namespace.
gdrojas
approved these changes
Sep 14, 2026
sebastiancorrea81
approved these changes
Sep 14, 2026
release-application Bot
added a commit
that referenced
this pull request
Sep 14, 2026
🤖 I have created a release *beep* *boop* --- ## [7.9.1](v7.9.0...v7.9.1) (2026-09-14) ### Bug Fixes * deploy workloads into their own namespace, not the agent's ([#585](#585)) ([b99b7d0](b99b7d0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
worker_default_envderivesK8S_NAMESPACEfromvar.namespace, which is documented as "Kubernetes namespace where the nullplatform agent will run" and defaults tonullplatform-tools. Every k8s-scope worker therefore deploys its application pods next to the agent instead of intonullplatform.Why it's a bug and not a choice
The same
locals.tfblock documents the intended value a few lines below:And
nullplatform/scopesshipsK8S_NAMESPACE: nullplatformas the k8s scope default, which is where every pre-worker agent deployed. The code and the documentation disagree.How it showed up
Migrating a client from the pre-worker agent to v7.7.0, a freshly created scope deployed its pod into
nullplatform-toolswhile every pre-existing scope stayed innullplatform. Same cluster, same config, split by whether the scope predated the worker orchestrator.The change
Splits the two concepts.
var.namespacekeeps meaning where the agent runs; the newvar.workload_namespaceis what the workers receive, defaulting tonullplatform.Callers that actually want workloads next to the agent can set
workload_namespaceto the same value asnamespace.Compatibility
Behaviour changes for anyone who left
namespaceat its default and has been running worker-orchestrated scopes: their new workloads move fromnullplatform-toolstonullplatform. That is the documented and historical target, so this restores intended behaviour rather than changing it, but it is worth a line in the release notes.