helm / chart-testing-action

A GitHub Action to lint and test Helm charts
https://github.com/helm/chart-testing
Apache License 2.0
245 stars 71 forks source link

Document how to test charts that contains a CRD #104

Open edmondop opened 1 year ago

edmondop commented 1 year ago

Hi,

I am trying to test a chart that contains some Istio resources and the ct install action will fail. I have two options:

  1. install the Istio operator as a step in the CI/CD pipeline on the kind cluster before running the tests
  2. declare Istio as a dependency of this chart, but enable that only during execution of tests (the helm chart is meant to be used on a cluster where Istio is already installed)

As I tried to do 1. I wasn't able to retrieve the kubeconfig from the create-kind github action and pass it down:


      - name: Create kind cluster
        uses: helm/kind-action@v1.4.0
        # if: steps.list-changed.outputs.changed == 'true'

      - name: Install Istio
        uses: huang195/actions-install-istio@v1.0.0
        with:
          # kubeconfig: "${{steps.kubeconfig.outputs.config}}"
          istio version: '1.6.3'

Am I following the right approach? Is the approach of declaring a test dependency the right one? How I should declare also a test CRD (an istio Gateway, for example?)

thisurawijesekera commented 11 months ago

Hi @edmondop

Did you find a solution to test a chart which consists of CRD.