diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 58cd5de..7f95c87 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,10 +16,8 @@ jobs: - name: Create kind cluster uses: ./ - with: - install_local_path_provisioner: true - name: Test run: | kubectl cluster-info - kubectl get storageclass local-path + kubectl get storageclass standard diff --git a/README.md b/README.md index 29b1228..49f9d76 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,12 @@ For more information, reference the GitHub Help Documentation for [Creating a wo For more information on inputs, see the [API Documentation](https://developer.github.com/v3/repos/releases/#input) -- `version`: The kind version to use (default: `v0.6.1`) +- `version`: The kind version to use (default: `v0.7.0`) - `config`: The path to the kind config file - `node_image`: The Docker image for the cluster nodes - `cluster_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`) - `log_level`: The log level for kind -- `install_local_path_provisioner`: If true, Rancher's local-path provisioner is installed which supports dynamic volume provisioning on multi-node clusters. - The newly created local-path StorageClass is made the default. ### Example Workflow @@ -39,8 +37,6 @@ jobs: steps: - name: Create k8s Kind Cluster uses: helm/kind-action@v1.0.0-alpha.3 - with: - install_local_path_provisioner: true ``` This uses [@helm/kind-action](https://www.github.com/helm/kind-action) GitHub Action to spin up a [kind](https://kind.sigs.k8s.io/) Kubernetes cluster on every Pull Request. diff --git a/action.yml b/action.yml index 5198759..c154af4 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ branding: icon: box inputs: version: - description: "The kind version to use (default: v0.6.1)" + description: "The kind version to use (default: v0.7.0)" config: description: "The path to the kind config file" node_image: @@ -17,11 +17,6 @@ inputs: description: "The duration to wait for the control plane to become ready (default: 60s)" log_level: description: "The log level for kind" - install_local_path_provisioner: - description: | - If true, Rancher's local-path provisioner is installed which supports - dynamic volume provisioning on multi-node clusters. The newly created - local-path StorageClass is made the default. runs: using: "node12" main: "main.js" diff --git a/kind.sh b/kind.sh index 48f0176..b811c1d 100755 --- a/kind.sh +++ b/kind.sh @@ -18,7 +18,7 @@ set -o errexit set -o nounset set -o pipefail -DEFAULT_KIND_VERSION=v0.6.1 +DEFAULT_KIND_VERSION=v0.7.0 DEFAULT_CLUSTER_NAME=chart-testing KUBECTL_VERSION=v1.17.0 @@ -27,15 +27,12 @@ cat << EOF Usage: $(basename "$0") -h, --help Display help - -v, --version The kind version to use (default: v0.6.1)" + -v, --version The kind version to use (default: v0.7.0)" -c, --config The path to the kind config file" -i, --node-image The Docker image for the cluster nodes" -n, --cluster-name The name of the cluster to create (default: chart-testing)" -w, --wait The duration to wait for the control plane to become ready (default: 60s)" -l, --log-level The log level for kind [panic, fatal, error, warning, info, debug, trace] (default: warning) - -p, --install-local-path-provisioner If true, Rancher's local-path provisioner is installed which supports - dynamic volume provisioning on multi-node clusters. The newly created - local-path StorageClass is made the default. EOF } @@ -47,7 +44,6 @@ main() { local cluster_name="$DEFAULT_CLUSTER_NAME" local wait=60s local log_level= - local install_local_path_provisioner= parse_command_line "$@" @@ -55,9 +51,6 @@ main() { install_kubectl create_kind_cluster - if [[ -n "$install_local_path_provisioner" ]]; then - install_local_path_provisioner - fi } parse_command_line() { @@ -127,9 +120,6 @@ parse_command_line() { exit 1 fi ;; - -p|--install-local-path-provisioner) - install_local_path_provisioner=true - ;; *) break ;; @@ -172,18 +162,4 @@ create_kind_cluster() { kind "${args[@]}" } -install_local_path_provisioner() { - echo 'Installing local-path provisioner...' - kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml - - echo 'Changing default StorageClass...' - kubectl patch storageclass standard --patch '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}' - kubectl patch storageclass standard --patch '{"metadata": {"annotations": {"storageclass.beta.kubernetes.io/is-default-class": "false"}}}' - kubectl patch storageclass local-path --patch '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}' - kubectl patch storageclass local-path --patch '{"metadata": {"annotations": {"storageclass.beta.kubernetes.io/is-default-class": "true"}}}' - - echo 'Available StorageClasses:' - kubectl get storageclasses -} - main "$@" diff --git a/main.sh b/main.sh index 08ac44a..7aec785 100755 --- a/main.sh +++ b/main.sh @@ -47,10 +47,6 @@ main() { args+=(--log-level "${INPUT_LOG_LEVEL}") fi - if [[ -n "${INPUT_INSTALL_LOCAL_PATH_PROVISIONER:-}" ]]; then - args+=(--install-local-path-provisioner) - fi - "$SCRIPT_DIR/kind.sh" "${args[@]}" }