Skip to content

Commit 675502a

Browse files
author
Radu M
committed
Update readme version and add notice about path deprecation
Signed-off-by: Radu M <root@radu.sh>
1 parent abfe93b commit 675502a

1 file changed

Lines changed: 42 additions & 26 deletions

File tree

‎README.md‎

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,79 @@
11
# @engineerd/setup-kind
22

3-
Setup [KinD (Kubernetes in Docker)](https://kind.sigs.k8s.io/) with a single GitHub Action!
3+
Setup [KinD (Kubernetes in Docker)](https://kind.sigs.k8s.io/) with a single
4+
GitHub Action!
45

5-
> This action assumes a Linux environment, and will _not_ work on Windows or MacOS agents.
6+
> Because of a [deprecation in the GitHub Actions environment][gh-actions-path],
7+
> versions lower than v0.5.0 will no longer work properly. See [this
8+
> issue][path-issue] for more details.
69
7-
```
10+
> This action assumes a Linux environment, and will _not_ work on Windows or
11+
> MacOS agents.
12+
13+
```yaml
814
name: "Create cluster using KinD"
915
on: [pull_request, push]
1016

1117
jobs:
1218
kind:
1319
runs-on: ubuntu-latest
1420
steps:
15-
- uses: actions/checkout@master
16-
- uses: engineerd/setup-kind@v0.4.0
17-
- name: Testing
18-
run: |
19-
kubectl cluster-info
20-
kubectl get pods -n kube-system
21-
echo "current-context:" $(kubectl config current-context)
22-
echo "environment-kubeconfig:" ${KUBECONFIG}
21+
- uses: actions/checkout@master
22+
- uses: engineerd/setup-kind@v0.5.0
23+
- name: Testing
24+
run: |
25+
kubectl cluster-info
26+
kubectl get pods -n kube-system
27+
echo "current-context:" $(kubectl config current-context)
28+
echo "environment-kubeconfig:" ${KUBECONFIG}
2329
```
2430
25-
> Note: KUBECONFIG is automatically merged after cluster creation starting with version 0.6 of Kind. See [this document for a detailed migration guide][kind-kubeconfig]
31+
> Note: KUBECONFIG is automatically merged after cluster creation starting with
32+
> version 0.6 of Kind. See [this document for a detailed migration
33+
> guide][kind-kubeconfig]
2634
2735
> Note: GitHub Actions workers come pre-configured with `kubectl`.
2836

29-
The following arguments can be configured on the job using the `with` keyword (see example above).
30-
Currently, possible inputs are all the flags for `kind cluster create`, with the additional version, which sets the Kind version to downloadm and `skipClusterCreation`, which when present, skips creating the cluster (the Kind tools is configured in the path).
37+
The following arguments can be configured on the job using the `with` keyword
38+
(see example above). Currently, possible inputs are all the flags for
39+
`kind cluster create`, with the additional version, which sets the Kind version
40+
to downloadm and `skipClusterCreation`, which when present, skips creating the
41+
cluster (the Kind tools is configured in the path).
3142

3243
Optional inputs:
3344

3445
- `version`: version of Kind to use (default `"v0.7.0"`)
35-
- `config`: path (relative to the root of the repository) to a kind config file. If omitted, a default 1-node cluster will be created
46+
- `config`: path (relative to the root of the repository) to a kind config file.
47+
If omitted, a default 1-node cluster will be created
3648
- `image`: node Docker image to use for booting the cluster.
3749
- `name`: cluster context name (default `"kind-kind"`)
3850
- `wait`: wait for control plane node to be ready (default `"300s"`)
39-
- `skipClusterCreation`: if `"true"`, the action will not create a cluster, just acquire the tools
51+
- `skipClusterCreation`: if `"true"`, the action will not create a cluster, just
52+
acquire the tools
4053

4154
Example using optional inputs:
4255

43-
```
56+
```yaml
4457
name: "Create cluster using KinD"
4558
on: [pull_request, push]
4659
4760
jobs:
4861
kind:
4962
runs-on: ubuntu-latest
5063
steps:
51-
- uses: actions/checkout@master
52-
- uses: engineerd/setup-kind@v0.4.0
53-
with:
64+
- uses: actions/checkout@master
65+
- uses: engineerd/setup-kind@v0.5.0
66+
with:
5467
version: "v0.7.0"
55-
- name: Testing
56-
run: |
57-
kubectl cluster-info
58-
kubectl get pods -n kube-system
59-
echo "current-context:" $(kubectl config current-context)
60-
echo "environment-kubeconfig:" ${KUBECONFIG}
68+
- name: Testing
69+
run: |
70+
kubectl cluster-info
71+
kubectl get pods -n kube-system
72+
echo "current-context:" $(kubectl config current-context)
73+
echo "environment-kubeconfig:" ${KUBECONFIG}
6174
```
6275

6376
[kind-kubeconfig]: https://github.com/kubernetes-sigs/kind/issues/1060
77+
[gh-actions-path]:
78+
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
79+
[path-issue]: https://github.com/engineerd/setup-kind/issues/28

0 commit comments

Comments
 (0)