helm / kind-action

A GitHub Action for Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
306 stars 76 forks source link

Add an option to remove Kind cluster #86

Closed brb closed 1 year ago

brb commented 1 year ago

I would like to create multiple Kind clusters in the same Github Action workflow. That would require deleting a previously created Kind cluster.

Would you accept a contribution to add a new option to remove a Kind cluster?

Example usage:

- name: Create kind cluster #1
  uses: helm/kind-action
    with:
      version: ${{ env.kind_version }}
      config: ${{ env.kind_config }}

- name: Run tests #1
...

- name: Delete kind cluster #1
  uses: helm/kind-action
  with:
     delete: true

- name: Create kind cluster #2
  uses: helm/kind-action
    with:
      version: ${{ env.kind_version }}
      config: ${{ env.kind_config }}

- name: Run tests #2
...

An alternative would be to to always delete a Kind cluster before creating a new one, but that might break existing GHA workflows in which multiple clusters are created with different cluster_name.

Would you accept such a contribution?

brb commented 1 year ago

@cpanato @davidkarlsen Pinging recent contributors of the project :wave:

cpanato commented 1 year ago

i think this is not needed, because you can run the kind command in a single step and delete the cluster

the kind cli is installed and you can do whatever you want after the first usage of the action

brb commented 1 year ago

Thanks! kind exists indeed, so this issue is no longer needed.