Make DefaultSidecarImage operator-configurable via env var instead of compile-time constant
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 78/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
Research direction
Start with the Config struct and Validate() in internal/platform/platform.go, then inspect sidecarImage in internal/noderesource/noderesource.go and the environment entries in manifests/manager.yaml. Add the env-var override while preserving the constant fallback and existing per-SND precedence. Run the relevant controller tests, including a test showing the configured image reaches sidecarImage().
Written by the indexing model from the issue text.
Description
Problem
DefaultSidecarImage at internal/platform/platform.go:8 is a compile-time constant. Bumping the default sidecar image (e.g. when the sei-config schema gains a new field that the sidecar's vendored sei-config doesn't yet recognize) requires:
- Editing the constant in source.
- Cutting a controller PR + merge.
- Rebuilding the controller container image via CI.
- Bumping the controller image in the cluster manifest.
- Rolling out the new controller pod.
That's 4 layers of release cadence tied together for what's fundamentally a single config value. It also tightly couples the controller's release cycle to the sidecar's, which slows down sidecar version bumps that should be cheap.
Impact
Most recently surfaced when the harbor nightly release-test orchestrator needed evm.enabled_legacy_sei_apis overrides — the sidecar built against sei-config v0.0.13 rejected the override key, requiring the constant bump in #204 (sei-k8s-controller). That whole flow could have been a single Flux manifest update if the constant were an env var instead.
Future situations where this matters:
- New
sei-configschema fields where the sidecar must catch up. - Operator-side
seictlsecurity patches that don't touch the controller binary. - Per-cluster sidecar versioning (test clusters running a newer/older sidecar than prod for validation).
Relevant experts
kubernetes-specialist— owns the controller's environment / config-handling pattern.platform-engineer— owns the manifest layout that operators use.
Proposed approach
Add a new env var SEI_DEFAULT_SIDECAR_IMAGE read at controller startup. Wire it into the existing platform.Config struct in internal/platform/platform.go alongside the other SEI_* config fields (SEI_NODEPOOL_NAME, SEI_TOLERATION_KEY, etc.).
// platform.Config (existing struct)
type Config struct {
// ... existing fields ...
DefaultSidecarImage string // SEI_DEFAULT_SIDECAR_IMAGE
}
sidecarImage(node) at internal/noderesource/noderesource.go:285 consumes Config.DefaultSidecarImage instead of the package-level constant. The constant platform.DefaultSidecarImage becomes the fallback only if the env var is unset (preserves backward compatibility for tests, local dev, and any deployment that hasn't set the env var yet).
Architectural constraints
- The constant must remain as a fallback — operators who haven't set the env var get the same behavior as before.
- The env var should be required in
Config.Validate()once the operator-facing manifest is updated to set it. Stage this as a non-breaking change first (constant fallback), then promote to required in a follow-up once all consumers are updated. - Existing per-SND override path (
spec.template.spec.sidecar.image) wins over the env var, just like it currently wins over the constant. No change tosidecarImage()precedence ordering.
Acceptance criteria
-
Config.DefaultSidecarImagefield added; reads fromSEI_DEFAULT_SIDECAR_IMAGEenv var. -
sidecarImage(node)readsConfig.DefaultSidecarImageinstead of the package-level constant. - Constant remains as fallback; env-var-unset path is identical to today.
- Manifest in
manifests/manager.yaml(or equivalent) sets the env var. - Test that env-var override flows through to
sidecarImage().
Out of scope
- Removing the package-level constant entirely (keep as fallback for now).
- Per-SeiNode-mode sidecar images (e.g., archive nodes get a different sidecar). If needed, separate issue.
- Configuring the sidecar's bootstrap image via env var (the
initsidecar, if different).
References
- Compile-time site:
internal/platform/platform.go:8. - Consumer:
internal/noderesource/noderesource.go:285-290(sidecarImagefunction). - Recent bump that motivated this: #204.
- Existing env-var pattern in
Config.Validate():internal/platform/platform.go:60-93.
- Dominant language
- Go
- Stars
- 1
- Forks
- 2
- Avg merge
- 2h 29m
- Merged PRs (30d)
- 56
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sei-protocol/sei-k8s-controller
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
sei-protocol/sei-k8s-controller#457 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
All issues in sei-protocol/sei-k8s-controller
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100