sig-storage-local-static-provisioner icon indicating copy to clipboard operation
sig-storage-local-static-provisioner copied to clipboard

Use Helm chart manifests in the e2e tests

Open mauriciopoppe opened this issue 2 years ago • 6 comments

So our e2e tests create a test cluster and install LVP using go code

https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/blob/8335a2a3bb284fd5013c939ebdc9b845b40fb2f7/test/e2e/e2e_test.go#L296

https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/blob/8335a2a3bb284fd5013c939ebdc9b845b40fb2f7/test/e2e/e2e_test.go#L311

And if you look at the implementation it's installing the same resources declared in the helm chart, to avoid duplicating the setup we could set up a helm go client and install the chart in helm/provisioner/ with some values defined in go code instead.

I think https://manuelmazzuola.dev/2021/03/28/deploy-helm-chart-go is good starting point to use helm programatically, another way to accomplish the same is to install the helm/kubectl binaries in the script that creates the cluster that way we can call helm debug | kubectl apply -f - from within the test

The starting point for the test runner is our Prow job in test-infra which calls make e2e -> hack/e2e.sh ->

https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/blob/e0ad13e2415e28726e79512aeb246027a31431c0/hack/e2e.sh#L318-L324

if you have a cluster already running make sure to update the above lines to only run the test and not create/delete a cluster, i.e. remove --up --down

mauriciopoppe avatar Feb 14 '23 21:02 mauriciopoppe

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 15 '23 22:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 14 '23 22:06 k8s-triage-robot

/remove-lifecycle rotten /lifecycle frozen

mauriciopoppe avatar Jun 15 '23 15:06 mauriciopoppe

/assign

Hi @mauriciopoppe , I can help on this issue. But i need some help as I not sure how to go about this

jennwah avatar Jul 08 '23 14:07 jennwah

I updated the description with more info, hope it helps

mauriciopoppe avatar Jul 22 '23 01:07 mauriciopoppe

Sure, the description looks good to me. Will give this a try when I have some time on hand later on. Will ping you once I am done with the PR

jennwah avatar Jul 23 '23 03:07 jennwah