Skip to content

Add OperatorConfig with env var parsing - #21

Merged
dcmcand merged 1 commit into
mainfrom
task-5/operator-config
Mar 27, 2026
Merged

dcmcand merged 1 commit into
mainfrom
task-5/operator-config

Conversation

@dcmcand

@dcmcand dcmcand commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds OperatorConfig struct that loads pack-level configuration from environment variables. The Helm chart sets these env vars on the operator Deployment; the controller reads them once at startup.

Required vars: LLM_BASE_DOMAIN, LLM_EXTERNAL_GATEWAY_NAME, LLM_INTERNAL_GATEWAY_NAME, LLM_OIDC_ISSUER_URL
Optional vars with defaults: gateway namespaces (envoy-gateway-system), groups claim (groups), serving image (llm-d-cuda:v0.5.1), api-keys namespace (llm-api-keys)

Error reporting lists all missing required vars at once rather than failing on the first one.

Test plan

  • cd operator && go test ./internal/config/ -v - 8 tests pass (100% coverage)
  • cd operator && make test - full suite passes

Introduces operator/internal/config with the OperatorConfig struct and
LoadFromEnv(), which reads all pack-level configuration from environment
variables. Required vars (LLM_BASE_DOMAIN, LLM_EXTERNAL_GATEWAY_NAME,
LLM_INTERNAL_GATEWAY_NAME, LLM_OIDC_ISSUER_URL) are validated together
so the error message lists all missing vars at once rather than failing
on the first. Optional vars fall back to documented defaults.
@dcmcand
dcmcand merged commit 1c0b3e8 into main Mar 27, 2026
1 check 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.

1 participant