Skip to content

Commit

Permalink
Add check on the replace image on the component level overwrite (open…
Browse files Browse the repository at this point in the history
…datahub-io#583)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit cafd17d)
  • Loading branch information
zdtsw authored and VaishnaviHire committed Oct 20, 2023
1 parent 7b6cc43 commit 3cd5d57
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/codeflare/codeflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (c *CodeFlare) ReconcileComponent(cli client.Client, owner metav1.Object, d

// Update image parameters only when we do not have customized manifests set
if dscispec.DevFlags.ManifestsUri == "" && len(c.DevFlags.Manifests) == 0 {
if err := deploy.ApplyParams(CodeflarePath, c.SetImageParamsMap(imageParamMap), true); err != nil {
if err := deploy.ApplyImageParams(CodeflarePath, imageParamMap); err != nil {
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (d *Dashboard) ReconcileComponent(cli client.Client, owner metav1.Object, d

// Update image parameters (ODH does not use this solution, only downstream)
if dscispec.DevFlags.ManifestsUri == "" && len(d.DevFlags.Manifests) == 0 {
if err := deploy.ApplyParams(PathSupported, d.SetImageParamsMap(imageParamMap), false); err != nil {
if err := deploy.ApplyImageParams(PathSupported, imageParamMap); err != nil {
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/datasciencepipelines/datasciencepipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (d *DataSciencePipelines) ReconcileComponent(cli client.Client, owner metav

// Update image parameters only when we do not have customized manifests set
if dscispec.DevFlags.ManifestsUri == "" && len(d.DevFlags.Manifests) == 0 {
if err := deploy.ApplyParams(Path, d.SetImageParamsMap(imageParamMap), false); err != nil {
if err := deploy.ApplyImageParams(Path, imageParamMap); err != nil {
return err
}
}
Expand Down
6 changes: 3 additions & 3 deletions components/kserve/kserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (k *Kserve) ReconcileComponent(cli client.Client, owner metav1.Object, dsci

// Update image parameters only when we do not have customized manifests set
if dscispec.DevFlags.ManifestsUri == "" && len(k.DevFlags.Manifests) == 0 {
if err := deploy.ApplyParams(Path, k.SetImageParamsMap(imageParamMap), false); err != nil {
if err := deploy.ApplyImageParams(Path, imageParamMap); err != nil {
return err
}
}
Expand All @@ -132,9 +132,9 @@ func (k *Kserve) ReconcileComponent(cli client.Client, owner metav1.Object, dsci
if err != nil {
return err
}
// Update image parameters for odh-model-controller
// Update image parameters for odh-maodel-controller
if dscispec.DevFlags.ManifestsUri == "" && len(k.DevFlags.Manifests) == 0 {
if err := deploy.ApplyParams(DependentPath, k.SetImageParamsMap(dependentParamMap), false); err != nil {
if err := deploy.ApplyImageParams(DependentPath, dependentImageParamMap); err != nil {
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/modelmeshserving/modelmeshserving.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (m *ModelMeshServing) ReconcileComponent(cli client.Client, owner metav1.Ob
}
// Update image parameters
if dscispec.DevFlags.ManifestsUri == "" && len(m.DevFlags.Manifests) == 0 {
if err := deploy.ApplyParams(Path, m.SetImageParamsMap(imageParamMap), false); err != nil {
if err := deploy.ApplyImageParams(Path, imageParamMap); err != nil {
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/ray/ray.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (r *Ray) ReconcileComponent(cli client.Client, owner metav1.Object, dscispe
}

if dscispec.DevFlags.ManifestsUri == "" || len(r.DevFlags.Manifests) == 0 {
if err := deploy.ApplyParams(RayPath, r.SetImageParamsMap(imageParamMap), true); err != nil {
if err := deploy.ApplyImageParams(RayPath, imageParamMap); err != nil {
return err
}
}
Expand Down

0 comments on commit 3cd5d57

Please sign in to comment.