-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds CRD create test against kind running on the same kube version as…
… client-go Signed-off-by: Per Goncalves da Silva <[email protected]>
- Loading branch information
Per Goncalves da Silva
committed
May 22, 2024
1 parent
f5249c3
commit 5767042
Showing
2 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: kind | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- '**' | ||
workflow_dispatch: | ||
merge_group: | ||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
- name: Install Kind | ||
# Not guaranteed to have patch releases available and node image tags are full versions (i.e v1.28.0 - no v1.28, v1.29, etc.) | ||
# The KIND_NODE_VERSION is set by getting the version of the k8s.io/client-go dependency from the go.mod | ||
# and sets major version to "1" and the patch version to "0". For example, a client-go version of v0.28.5 | ||
# will map to a KIND_NODE_VERSION of 1.28.0 | ||
run: | | ||
export KIND_VERSION=$(go list -m k8s.io/client-go | cut -d" " -f2 | sed 's/^v0\.\([[:digit:]]\{1,\}\)\.[[:digit:]]\{1,\}$$/1.\1.0/')) | ||
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64 | ||
chmod +x ./kind | ||
- name: Apply CRDs | ||
run: | | ||
for crd in $(ls crds/*_crd.yaml); do | ||
kubectl create -f $crd | ||
done |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.