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 aca3cf2 commit 3fb677c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/operator-e2e-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
env:
KIND_CLUSTER_NAME: "operator-e2e-cluster"
NAMESPACE: "test-namespace"
KIND_CLUSTER: "kind-operator-e2e-cluster"

steps:
- name: Checkout code
Expand All @@ -50,8 +51,8 @@ jobs:
- name: Set up kubeconfig
run: |
kubectl config use-context kind-$KIND_CLUSTER_NAME
echo "kind context is switched to cluster $KIND_CLUSTER_NAME"
kubectl config use-context $KIND_CLUSTER
echo "kind context is switched to cluster $KIND_CLUSTER"
# - name: Load Docker image into KIND cluster
# run: |
Expand Down
3 changes: 1 addition & 2 deletions infra/feast-operator/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ var _ = Describe("controller", Ordered, func() {
ExpectWithOffset(1, err).NotTo(HaveOccurred())

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

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

// LoadImageToKindCluster loads a local docker image to the kind cluster
func LoadImageToKindClusterWithName(name string, custerName string) error {
func LoadImageToKindClusterWithName(name string) error {
cluster := "kind"
if v, ok := os.LookupEnv("KIND_CLUSTER"); ok {
cluster = v
}
Expand Down

0 comments on commit 3fb677c

Please sign in to comment.