feat(#38): add support for windows and mac os runners (#159)
- feat(https://github.com/helm/kind-action/issues/38): add OS detection and support for Windows binaries in kind installation
Signed-off-by: Jeff Tian jeff.tian@outlook.com
- 🔧 chore(#38, ci, workflow): update test workflow to use default kind version Remove pinned kind version to test default path on Windows Exercise documented default for kind installation Update workflow to reflect current kind version handling
Signed-off-by: Jeff Tian jeff.tian@outlook.com
Signed-off-by: Jeff Tian jeff.tian@outlook.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Kind Action
A GitHub Action for Kubernetes IN Docker - local clusters for testing Kubernetes using kubernetes-sigs/kind.
Usage
Pre-requisites
Create a workflow YAML file in your
.github/workflowsdirectory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.Supported Operating Systems
The action can install
kindandkubectlon Linux, macOS, and Windows runners.kindcreates Kubernetes clusters using Docker containers with Linux node images, so a cluster can only be created where Docker (with Linux container support) is available. GitHub-hostedubuntu-latestrunners satisfy this.install_only: trueto install thekindandkubectlbinaries without creating a cluster (the binaries are still added toPATH).registryandcloud_providerare Linux-only. Enabling either on a non-Linux runner fails with a clear error, since they rely on Linux-specific tools and paths (sudo,/etc/hosts,/usr/local/bin, Docker networking).Inputs
For more information on inputs, see the API Documentation
version: The kind version to use (default:v0.33.0)version_file: The path to a file containing the kind version to use. Supports the asdf.tool-versionslayout (thekindentry) and plain version files. The version is used as-is, so include the leadingv(for examplekind v0.33.0). Takes precedence overversionwhen set.config: The path to the kind config filenode_image: The Docker image for the cluster nodescluster_name: The name of the cluster to create (default:chart-testing)wait: The duration to wait for the control plane to become ready (default:60s)verbosity: info log verbosity, higher value produces more outputkubectl_version: The kubectl version to use (default:v1.37.1)registry: Whether to configure an insecure local registry (default:false)registry_image: The registry image to use (default:registry:2)registry_name: The registry name to use (default:kind-registry)registry_port: The local port used to bind the registry (default:5000)registry_enable_delete: Enable delete operations on the registry (default:false)install_only: Skips cluster creation, only install kind (default:false)ignore_failed_clean: Whether to ignore the post delete cluster action failing (default:false)cloud_provider: Whether to use cloud provider loadbalancer (default:false)Example Workflow
Create a workflow (eg:
.github/workflows/create-cluster.yml):This uses @helm/kind-action GitHub Action to spin up a kind Kubernetes cluster on every Pull Request. See @helm/chart-testing-action for a more practical example.
Configuring Local Registry
Create a workflow (eg:
.github/workflows/create-cluster-with-registry.yml):This will configure the cluster with an insecure local registry at
my-registry:5001on both the host and within cluster. Subsequent steps can refer to the registry address with the output of the kind setup step (i.e.${{ steps.kind.outputs.LOCAL_REGISTRY }}).Note: If
configoption is used, you must manually configure the cluster nodes with registry config dir enabled at/etc/containerd/certs.d. For example:Code of conduct
Participation in the Helm community is governed by the Code of Conduct.