Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/overlays/odh/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
Expand Down
3 changes: 1 addition & 2 deletions config/overlays/odh/default/params.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
varReference:
- path: spec/template/spec/containers[]/image
- path: spec/template/spec/containers/image
kind: Deployment
apiVersion: apps/v1
103 changes: 53 additions & 50 deletions config/overlays/odh/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,65 +1,68 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../prometheus
- ./default
- ./scripts
- ./quickstart.yaml
- ./rbac
- ../../prometheus
- ./default
- ./scripts
- ./quickstart.yaml
- ./rbac

namespace: opendatahub
configMapGenerator:
- envs:
- params.env
name: mesh-parameters
- envs:
- params.env
name: mesh-parameters
generatorOptions:
disableNameSuffixHash: true

patches:
- path: ./crd/clusterservingruntime_patch_delete.yaml

vars:
- 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
- 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
Comment on lines +23 to +57
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ 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.


commonLabels:
app: model-mesh
app.kubernetes.io/part-of: model-mesh

patchesStrategicMerge:
- ./crd/clusterservingruntime_patch_delete.yaml

configurations:
- params.yaml
- params.yaml

labels:
- includeSelectors: true
pairs:
app: model-mesh
app.kubernetes.io/part-of: model-mesh
4 changes: 0 additions & 4 deletions config/overlays/odh/params.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
varReference:
- path: metadata/namespace
kind: ServiceAccount
apiVersion: v1
- path: metadata/name
kind: ClusterRoleBinding
apiGroup: rbac.authorization.k8s.io
- path: subjects/namespace
kind: RoleBinding
apiGroup: rbac.authorization.k8s.io
- path: spec/template/spec/containers[]/image
kind: Deployment
apiVersion: apps/v1
- path: data
kind: ConfigMap