Skip to content

Commit

Permalink
update imports, feature io
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-garrison committed Oct 25, 2023
1 parent 317faa3 commit e16c812
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/workbenches/workbenches.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
package workbenches

import (
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/feature/servicemesh/io"
"path/filepath"
"strings"

dsci "github.com/opendatahub-io/opendatahub-operator/v2/apis/dscinitialization/v1"
"github.com/opendatahub-io/opendatahub-operator/v2/components"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/cluster"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/deploy"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/servicemesh/io"
operatorv1 "github.com/openshift/api/operator/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
5 changes: 3 additions & 2 deletions pkg/feature/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"github.com/hashicorp/go-multierror"
v1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/dscinitialization/v1"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/feature/servicemesh/io"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/gvr"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -168,13 +169,13 @@ func (f *Feature) apply(m manifest) error {
applier = func(filename string) error {
log.Info("patching using manifest", "feature", f.Name, "name", m.name, "path", targetPath)

return f.patchResourceFromFile(filename)
return io.PatchResourceFromFile(f.DynamicClient, log, filename)
}
} else {
applier = func(filename string) error {
log.Info("applying manifest", "feature", f.Name, "name", m.name, "path", targetPath)

return f.createResourceFromFile(filename)
return io.CreateResourceFromFile(f.Client, log, f.OwnerReference(), filename)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/feature/servicemesh/io/resources_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io_test
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/servicemesh/io"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/feature/servicemesh/io"
"os"
"path/filepath"
)
Expand Down

0 comments on commit e16c812

Please sign in to comment.