Skip to content

feat: default --milo-kubeconfig and --leader-election-namespace to empty env vars#15

Merged
mattdjenkinson merged 1 commit into
mainfrom
feat/manager-milo-env-defaults
May 6, 2026
Merged

feat: default --milo-kubeconfig and --leader-election-namespace to empty env vars#15
mattdjenkinson merged 1 commit into
mainfrom
feat/manager-milo-env-defaults

Conversation

@mattdjenkinson

@mattdjenkinson mattdjenkinson commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #13 picking up review feedback from datum-cloud/infra#2383 (comment). Wires the two flags into the base deployment using the same $(VAR) env-var substitution pattern that METRICS_BIND_ADDRESS, HEALTH_PROBE_BIND_ADDRESS, and LEADER_ELECT already follow:

  • Adds --milo-kubeconfig=$(MILO_KUBECONFIG) and --leader-election-namespace=$(LEADER_ELECTION_NAMESPACE) to the manager args.
  • Defaults both env vars to empty strings, so the manager keeps using the in-cluster client and controller-runtime's auto-detected lease namespace. No behaviour change for local development or the bare-bundle install.

Downstream consumers that aggregate this controller into Milo can now override the manager's behaviour with a strategic merge on env: alone instead of copying the full args: list to add new flags. The companion infra patch in datum-cloud/infra#2383 is updated to match.

kustomize build config/base/manager renders the deployment with the two new args plus matching env defaults.

…pty env vars

Wire the two flags introduced in #13 into the base deployment using
the same `$(VAR)` env-var substitution pattern that
`METRICS_BIND_ADDRESS`, `HEALTH_PROBE_BIND_ADDRESS`, and `LEADER_ELECT`
already follow:

- Add `--milo-kubeconfig=$(MILO_KUBECONFIG)` and
  `--leader-election-namespace=$(LEADER_ELECTION_NAMESPACE)` to the
  manager args.
- Default both env vars to empty strings so the manager keeps using
  the in-cluster client and controller-runtime's auto-detected lease
  namespace -- nothing changes for local development or for the
  bare-bundle install path.

Downstream consumers that aggregate this controller into Milo (e.g.
the datum-cloud/infra patch) can now override the manager's behaviour
with a strategic merge on `env:` alone instead of copying the full
`args:` list to add new flags.
@mattdjenkinson mattdjenkinson merged commit 622e9a3 into main May 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants