Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade kube-builder #294

Merged
merged 15 commits into from
Oct 9, 2021
6 changes: 0 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- '*'
pull_request:
env:
KUBE_BUILDER_VERSION: "2.3.2"
OPERATOR_SDK_VERSION: "v1.10.0"
jobs:
build:
Expand Down Expand Up @@ -35,11 +34,6 @@ jobs:
with:
go-version: '^1.17'

- name: Setup env
run: |
sudo curl -Lo- https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${KUBE_BUILDER_VERSION}/kubebuilder_${KUBE_BUILDER_VERSION}_linux_amd64.tar.gz | tar xzv -C /tmp -f -
echo "KUBEBUILDER_ASSETS=/tmp/kubebuilder_${KUBE_BUILDER_VERSION}_linux_amd64/bin" >> $GITHUB_ENV

- name: Test and build image
run: |
make test docker-build
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ endif
all: manager

# Run tests
KUBEBUILDER_ASSETS=/tmp/envtest_assets.d
CONTROLLER_RUNTIME_VERSION=v0.8.3
K8S_VERSION=1.22.0
GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH)
test: generate fmt vet manifests
go test ./... -coverprofile cover.out
mkdir -p ${KUBEBUILDER_ASSETS}
curl -sSL "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-${K8S_VERSION}-${GOOS}-${GOARCH}.tar.gz" | tar xvz -C ${KUBEBUILDER_ASSETS} --strip-components=2
KUBEBUILDER_ASSETS=${KUBEBUILDER_ASSETS} go test ./... -coverprofile cover.out

# Build manager binary
manager: generate fmt vet
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.