[main] fix(kustomize): ensures compatibility with v5#366
Conversation
Signed-off-by: Bartosz Majsak <bartosz.majsak@gmail.com>
WalkthroughThis change updates several Kustomize YAML configuration files under the Changes
Sequence Diagram(s)No sequence diagram generated due to the nature of the configuration and formatting changes. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, spolti The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
config/overlays/odh/kustomization.yaml (1)
19-21: Consider declaring patch type explicitly
patches:defaults to strategic merge, but v5 also supportsjsonandmergetypes.
Addtype: strategicfor future-proof clarity and to avoid behaviour changes if defaults evolve.patches: - - path: ./crd/clusterservingruntime_patch_delete.yaml + - path: ./crd/clusterservingruntime_patch_delete.yaml + type: strategic
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
config/overlays/odh/default/kustomization.yaml(0 hunks)config/overlays/odh/default/params.yaml(1 hunks)config/overlays/odh/kustomization.yaml(1 hunks)config/overlays/odh/params.yaml(0 hunks)
💤 Files with no reviewable changes (2)
- config/overlays/odh/params.yaml
- config/overlays/odh/default/kustomization.yaml
🔇 Additional comments (3)
config/overlays/odh/default/params.yaml (1)
2-3: Verify updated array-field path –containers/imagemay not match all containers
varReferencepreviously usedcontainers[]/image, which explicitly targets every element in the list.
With the brackets removed the path now resolves to the first item only (per kustomize path semantics). That can silently miss image substitutions for additional containers.Please double-check against real manifests (or run
kustomize build) to ensure the variable still expands for every container, and, if needed, switch to the recommended replacement mechanism in v5 (replacements:with asource/targetsblock).config/overlays/odh/kustomization.yaml (2)
5-9: Resource list re-format looks finePure indentation / dash-style change – no semantic impact detected.
64-69: Newlabels:section – good upgradeSwitching from
commonLabelstolabels:withincludeSelectors: truealigns with the v5 API and preserves selector labelling. Nice catch.
| - fieldref: | ||
| fieldPath: metadata.namespace | ||
| name: mesh-namespace | ||
| objref: | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| name: mesh-parameters | ||
| - fieldref: | ||
| fieldPath: data.odh-modelmesh | ||
| name: odh-modelmesh | ||
| objref: | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| name: mesh-parameters | ||
| - fieldref: | ||
| fieldPath: data.odh-mm-rest-proxy | ||
| name: odh-mm-rest-proxy | ||
| objref: | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| name: mesh-parameters | ||
| - fieldref: | ||
| fieldPath: data.odh-modelmesh-runtime-adapter | ||
| name: odh-modelmesh-runtime-adapter | ||
| objref: | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| name: mesh-parameters | ||
| - fieldref: | ||
| fieldPath: data.odh-modelmesh-controller | ||
| name: odh-modelmesh-controller | ||
| objref: | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| name: mesh-parameters |
There was a problem hiding this comment.
🛠️ Refactor suggestion
vars: feature is formally deprecated in Kustomize v5
The upstream project is steering users to replacements: or configMapGenerator + go-templating. Keeping vars: works today but may break in a future minor.
If time permits, plan a follow-up PR to migrate these five variable definitions to replacements: to stay within the v5 support matrix.
🤖 Prompt for AI Agents
In config/overlays/odh/kustomization.yaml between lines 23 and 57, the use of
the deprecated `vars:` feature should be replaced. To fix this, migrate the five
variable definitions currently using `vars:` to use the supported
`replacements:` feature or alternatively use `configMapGenerator` combined with
`go-templating`. This will ensure compatibility with Kustomize v5 and prevent
future breakage.
This is an automated cherry-pick of #365
/assign spolti
Summary by CodeRabbit
Refactor
Chores