Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use kind to create cluster in CI, instead of k3d #1821

Merged
merged 8 commits into from
Dec 28, 2022
Merged

Use kind to create cluster in CI, instead of k3d #1821

merged 8 commits into from
Dec 28, 2022

Conversation

viveksinghggits
Copy link
Contributor

@viveksinghggits viveksinghggits commented Dec 27, 2022

Change Overview

This PR removes k3d-action from Kanister CI and and uses helm/kind-action@v1.4.0 action instead to create a Kubernetes cluster.
Using kind in CI for Kanister should be preferred because

  • It is easy to decide which Kubernetes version we want to run our tests against
  • In case of k3d-action, since it depends on k3d and then k3d actually depends on k3s, it's a bit tedious to figure the dependency out.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@github-actions
Copy link
Contributor

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Dec 27, 2022
viveksinghggits and others added 4 commits December 27, 2022 15:13
CRD matcher kubetest requires atleast one CRD to be present on
the cluster.
After using kind cluster while running `test` target we didn't
install it that's the reason test was failing.
This commit enables installation of csi-hostpath-driver so that
we would have one CRD.
.github/workflows/main.yaml Outdated Show resolved Hide resolved
Kanister automation moved this from In Progress to Reviewer approved Dec 27, 2022
@pavannd1
Copy link
Contributor

@viveksinghggits Looks like the KinD cluster has different number of GVRs than the k3s one. This is consistently failing

FAIL: crd_test.go:30: CRDSuite.TestCRDMatcher

crd_test.go:49:
    c.Assert(len(igvrs)+len(egvrs), Equals, len(gvrs))
... obtained int = 62
... expected int = 31

@viveksinghggits
Copy link
Contributor Author

viveksinghggits commented Dec 28, 2022

Hi @pavannd1 ,
Kind cluster by default doesnt have any CRD but one of our tests needs atleast one crd that is the reason i was installing csi hostpath driver in all the tests. Test, helm test and integration test.
We can improve this a bit by just installing csi-hostpath-driver not minio in case of kube test and not others.

@pavannd1 pavannd1 merged commit 0af8e1c into master Dec 28, 2022
@pavannd1 pavannd1 deleted the use-kind branch December 28, 2022 16:31
Kanister automation moved this from Reviewer approved to Done Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants