Repository navigation
fix(operator): backport frontend command argument fix to release/1.6.0 - #16814
Conversation
| container.Args = nil | ||
| } | ||
|
|
||
| // Merge authored fields and environment variables into the component defaults. |
There was a problem hiding this comment.
This comment only narrates the immediately following mergo.Merge and MergeEnvs operations; it records no non-obvious constraint and is redundant with the code.
๐ค AI Fix
Remove this comment.
| <ParamField path="podTemplate" type="core/v1.PodTemplateSpec"> | ||
| Complete Pod template shared by all roles of the component. It is mutually exclusive with `roles[*].podTemplate`. Every component must include `spec.podTemplate.spec.containers[name=main]` with a non-empty `image`. By default the operator injects command, environment, port, probe, resource, and volume-mount defaults into `spec.podTemplate.spec.containers[name=main]`, merging your overrides by name. Declaring `spec.podTemplate.spec.initContainers[name=runtime]` activates [Dynamo Sidecar Mode](#dynamo-sidecar-mode). Existing standard-mode components created without `spec.podTemplate.spec.containers[name=main].image` may retain that omission on unrelated updates. For DGD components whose runtime image has no parseable semantic-version tag, set `runtimeVersionOverride`. Other containers are user-managed and must specify their required fields, including `image`; `frontendSidecar` can explicitly select a regular container for frontend defaults. Replaces the ten separate per-component fields (`resources`, `envs`, `livenessProbe`, and so on) that existed in `v1alpha1`. | ||
|
|
||
| For `type: frontend`, a non-empty `main.command` replaces the default frontend invocation. Only the supplied `main.args` are passed to that command; omitted or empty `args` produce no arguments. The same rule applies to the container selected by `frontendSidecar`. Other component types retain their generated arguments when an authored command omits `args` or sets `args: []`, including legacy Go EPP components with `eppConfig`. |
There was a problem hiding this comment.
The promise that omitted or empty args produce no arguments is incompatible with Kubernetes container semantics: when Args is empty, the runtime falls back to the image's CMD. Since the new merge logic sets Args to nil, a custom frontend image with a non-empty CMD will still pass those image arguments to the authored command, potentially recreating an invalid argv. State this fallback explicitly instead of promising an argument-free invocation.
๐ค AI Fix
Revise the command-ownership contract to say that omitted or empty args fall back to the container image's CMD, and require explicit non-empty args when callers must override that image default.
Refs DYN-4945.
Summary
Cherry-pick #16488 onto
release/1.6.0from commita923032e21b79f85fcc628627a39526531a742e0.Clear generated frontend arguments when a user supplies a command, preventing duplicate
-m dynamo.frontendarguments and frontend crash loops. Apply the same behavior to frontend sidecars while preserving legacy EPP launch arguments. Includes regression tests and the API reference update. The cherry-pick applied without conflicts.Validation
go test ./internal/dynamo/... -count=1passed fromdeploy/operatoron the release branch.git diff origin/release/1.6.0 --checkpassed.