Skip to content

feat(k8s): set the homelab domain in container env values - #4608

Merged
dan-petty merged 2 commits into
mainfrom
feat/4542-env-domain
Nov 11, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/4542-env-domain

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

deploy-stack now sets the configured domain in each container environment value of a Deployment that holds the placeholder domain. The start page can then keep HOMEPAGE_VAR_DOMAIN and HOMEPAGE_ALLOWED_HOSTS under example.com in git.

  • _host_fields also returns each env[].value of a container or init container of a Deployment that holds the placeholder. host_patches tests and then replaces each such value, as it does for a host.
  • The Argo CD gate reads the same fields. It allows the placeholder in such a value of a homelab Application, and still refuses it in each other field.
  • k8s/README.md lists the new value in "Homelab Values at Deploy Time".

No homelab object holds such a value today, so the patches on main stay the same. Kustomize replacements cannot replace a substring in many values, so the patch builder is extended (cost in #4542).

Closes #4542

Change: openspec/changes/archive/2026-11-11-4542-set-the-homelab-domain-in-container/

deploy-stack now also tests and replaces each env value of a container or init container of a Deployment that holds the placeholder domain. The start page can then keep HOMEPAGE_VAR_DOMAIN and HOMEPAGE_ALLOWED_HOSTS under example.com in git. The Argo CD gate reads the same fields, so it allows the placeholder in such a value and refuses it in each other field.
@dan-petty dan-petty added type/feature Type feature: a new function scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Results on b302cb37:

  • Test first: before the change, uv run devops ci test tests/k8s/test_k8s_argocd_overrides.py tests/k8s/test_k8s_argocd_gate.py failed 2 tests: test_each_placeholder_env_value_is_checked_then_set_to_the_configured_domain (no patch) and test_a_placeholder_in_a_devops_deployment_fails_only_outside_its_env_values (the gate also refused the env value). After the change: 26 passed.
  • Same patches on main: a scratch script rendered each homelab Application with kubectl kustomize and compared host_patches of origin/main with this branch:
    • devops: objects=1 ops=2 same=True
    • ingress: objects=19 ops=46 same=True
    • mattermost: objects=1 ops=2 same=True
  • uv run devops ci --only k8s: pass (107 cases, 0 failed).
  • uv run devops ci docs: pass.
  • uv run devops openspec check: pass.
  • ruff, ruff format and mypy on the changed files: pass. The pre-push hook passed.

Live steps: none for this pull request. No manifest holds the placeholder in an env value yet, so the patches in the cluster stay the same. When the start page Deployment merges, run deploy-stack for the stack of its Application from a checkout of main, for example devops k8s deploy-stack --stack infra --no-push-secrets --no-wait --no-configure-urls.

@dan-petty

Copy link
Copy Markdown
Owner Author

Real Kustomize check: a scratch Deployment with HOMEPAGE_VAR_DOMAIN: example.com and HOMEPAGE_ALLOWED_HOSTS: $(MY_POD_IP):3000,start.example.com, built with kubectl kustomize under an overlay that holds the output of host_patches(..., "example.org"), gives the values ['example.org', '$(MY_POD_IP):3000,start.example.org']. So Kustomize applies the test and replace operations on the env value pointers.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 12:10
@dan-petty
dan-petty merged commit a3bcf7c into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the feat/4542-env-domain branch November 11, 2026 12:10
dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.112.0](v0.111.0...v0.112.0)
(2026-11-11)


### Features

* **k8s:** export gateway spans without key metadata
([#4520](#4520))
([7234d71](7234d71))
* **k8s:** set the homelab domain in container env values
([#4608](#4608))
([a3bcf7c](a3bcf7c))
* **telemetry:** send pydantic-ai spans through the exporter seam
([#4538](#4538))
([fcf2a7a](fcf2a7a))


### Bug Fixes

* **ai:** price cached prompt tokens of chat calls
([#4584](#4584))
([f84bbe6](f84bbe6))
* **devcontainer:** stop uv noise lines in agent shells
([#4592](#4592))
([9ba375c](9ba375c))
* **k8s:** delete gateway management bodies from spans
([#4551](#4551))
([b835d3c](b835d3c))
* **k8s:** set the kube context and namespace on devops pods
([#4514](#4514))
([9087b39](9087b39))
* **roadmap:** a refused spec after the archive is a plan defect
([#4549](#4549))
([1db29f7](1db29f7))
* **roadmap:** count and log the reason of a left-out stage item
([#4541](#4541))
([5600179](5600179))
* **roadmap:** default the step ceiling to twice the budget
([#4556](#4556))
([1dfb6c8](1dfb6c8))
* **roadmap:** explain --trace shows the argument digest
([#4526](#4526))
([c92195f](c92195f))
* **roadmap:** explain totals count dropped model events
([#4543](#4543))
([fe0e979](fe0e979))
* **roadmap:** give each eval verify run its own report file
([#4534](#4534))
([ad27f2d](ad27f2d))
* **roadmap:** one event loop and a time limit for decide_all
([#4585](#4585))
([ec51e01](ec51e01))
* **roadmap:** scoped updates send requests with no row scope
([#4531](#4531))
([5f75d25](5f75d25))
* **roadmap:** the caller gate reads an added parameter span
([#4548](#4548))
([1ba07c1](1ba07c1))
* **roadmap:** the implement shell waits for its command
([#4536](#4536))
([571e044](571e044))
* **roadmap:** the module-test and caller gates read imports and calls
([#4490](#4490))
([8a22e82](8a22e82))
* **service:** put trace ids on Service JSON log lines
([#4511](#4511))
([0d7a0d2](0d7a0d2))


### Performance Improvements

* **ai:** keep intake embeddings between CLI runs
([#4546](#4546))
([812871e](812871e))
* **roadmap:** intake reads only the issues that changed
([#4552](#4552))
([7dfd155](7dfd155))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): set the homelab domain in container env values

1 participant