Skip to content

Commit

Permalink
kind context is switched to cluster $KIND_CLUSTER_NAME
Browse files Browse the repository at this point in the history
Signed-off-by: lrangine <[email protected]>
  • Loading branch information
lokeshrangineni committed Nov 14, 2024
1 parent df09e67 commit 9dde786
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion infra/feast-operator/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ var _ = Describe("controller", Ordered, func() {
ExpectWithOffset(1, err).NotTo(HaveOccurred())

By("loading the the manager(Operator) image on Kind")
err = utils.LoadImageToKindClusterWithName(projectimage)
kindClusterName := "kind-operator-e2e-cluster"
err = utils.LoadImageToKindClusterWithName(projectimage, "")
ExpectWithOffset(1, err).NotTo(HaveOccurred())

By("installing CRDs")
Expand Down
5 changes: 2 additions & 3 deletions infra/feast-operator/test/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,11 @@ func InstallCertManager() error {
}

// LoadImageToKindCluster loads a local docker image to the kind cluster
func LoadImageToKindClusterWithName(name string) error {
cluster := "kind"
func LoadImageToKindClusterWithName(name string, custerName string) error {
if v, ok := os.LookupEnv("KIND_CLUSTER"); ok {
cluster = v
}
kindOptions := []string{"load", "docker-image", name, "--name", cluster}
kindOptions := []string{"load", "docker-image", name, "--name", custerName}
cmd := exec.Command("kind", kindOptions...)
_, err := Run(cmd)
return err
Expand Down

0 comments on commit 9dde786

Please sign in to comment.