-
Notifications
You must be signed in to change notification settings - Fork 209
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
build: add builder args to support build with nerdctl #289
build: add builder args to support build with nerdctl #289
Conversation
✅ Deploy Preview for k8s-kwok canceled.
|
Hi @zwpaper. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test? Adding a job to CI covers building images with docker and nerdctl.
Add below to strategy:
matrix:
builder:
- docker
- nerdctl
env:
BUILDER: ${{ matrix.builder }} |
6d5db47
to
d0e20e1
Compare
ok, let me add the tests later, I will let you know when done /hold |
d0e20e1
to
12fc04b
Compare
12fc04b
to
85ac763
Compare
@wzshiming test passed, we should be good to go /unhold |
Before $ DRY_RUN=true make build-image build-cluster-image
GOOS=linux GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=v0.1.0-50-hash -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.26.0' -o ./bin/linux/arm64/kwok ./cmd/kwok
docker buildx build --tag=kwok:v0.1.0-50-hash --platform=linux/arm64 --load -f images/kwok/Dockerfile .
GOOS=linux GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=v0.1.0-50-hash -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.26.0' -o ./bin/linux/arm64/kwok ./cmd/kwok
docker buildx build --tag=kwok:v0.1.0-50-hash --platform=linux/arm64 --load -f images/kwok/Dockerfile .
docker buildx build --build-arg=kube_version=v1.26.0 --tag=cluster:v0.1.0-50-hash-k8s.v1.26.0 --platform=linux/arm64 --load -f images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.25.3 --tag=cluster:v0.1.0-50-hash-k8s.v1.25.3 --platform=linux/arm64 --load -f images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.24.7 --tag=cluster:v0.1.0-50-hash-k8s.v1.24.7 --platform=linux/arm64 --load -f images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.23.13 --tag=cluster:v0.1.0-50-hash-k8s.v1.23.13 --platform=linux/arm64 --load -f images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.22.15 --tag=cluster:v0.1.0-50-hash-k8s.v1.22.15 --platform=linux/arm64 --load -f images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.21.14 --tag=cluster:v0.1.0-50-hash-k8s.v1.21.14 --platform=linux/arm64 --load -f images/cluster/Dockerfile . After for docker $ BUILDER=docker DRY_RUN=true make build-image build-cluster-image
GOOS=linux GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=v0.1.0-59-hash -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.26.0' -o ./bin/linux/arm64/kwok ./cmd/kwok
docker buildx build --tag=kwok:v0.1.0-59-hash --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/kwok/Dockerfile .
GOOS=linux GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=v0.1.0-59-hash -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.26.0' -o ./bin/linux/arm64/kwok ./cmd/kwok
docker buildx build --tag=kwok:v0.1.0-59-hash --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/kwok/Dockerfile .
docker buildx build --build-arg=kube_version=v1.26.0 --tag=cluster:v0.1.0-59-hash-k8s.v1.26.0 --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.25.3 --tag=cluster:v0.1.0-59-hash-k8s.v1.25.3 --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.24.7 --tag=cluster:v0.1.0-59-hash-k8s.v1.24.7 --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.23.13 --tag=cluster:v0.1.0-59-hash-k8s.v1.23.13 --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.22.15 --tag=cluster:v0.1.0-59-hash-k8s.v1.22.15 --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
docker buildx build --build-arg=kube_version=v1.21.14 --tag=cluster:v0.1.0-59-hash-k8s.v1.21.14 --platform=linux/arm64 --load -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile . After for nerdctl $ BUILDER=nerdctl DRY_RUN=true make build-image build-cluster-image
GOOS=linux GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=v0.1.0-59-hash -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.26.0' -o ./bin/linux/arm64/kwok ./cmd/kwok
nerdctl build --tag=kwok:v0.1.0-59-hash --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/kwok/Dockerfile .
GOOS=linux GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version=v0.1.0-59-hash -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.26.0' -o ./bin/linux/arm64/kwok ./cmd/kwok
nerdctl build --tag=kwok:v0.1.0-59-hash --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/kwok/Dockerfile .
nerdctl build --build-arg=kube_version=v1.26.0 --tag=cluster:v0.1.0-59-hash-k8s.v1.26.0 --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
nerdctl build --build-arg=kube_version=v1.25.3 --tag=cluster:v0.1.0-59-hash-k8s.v1.25.3 --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
nerdctl build --build-arg=kube_version=v1.24.7 --tag=cluster:v0.1.0-59-hash-k8s.v1.24.7 --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
nerdctl build --build-arg=kube_version=v1.23.13 --tag=cluster:v0.1.0-59-hash-k8s.v1.23.13 --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
nerdctl build --build-arg=kube_version=v1.22.15 --tag=cluster:v0.1.0-59-hash-k8s.v1.22.15 --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile .
nerdctl build --build-arg=kube_version=v1.21.14 --tag=cluster:v0.1.0-59-hash-k8s.v1.21.14 --platform=linux/arm64 -f /Users/zsm/go/src/sigs.k8s.io/kwok/images/cluster/Dockerfile . The modified DRY_RUN will output full path , which is not very convenient when adding tests to it. |
#292 I add a test to the original releases. |
/ok-to-test |
Signed-off-by: Wei Zhang <kweizh@gmail.com>
87f8bb0
to
94622b3
Compare
94622b3
to
dd27508
Compare
Signed-off-by: Wei Zhang <kweizh@gmail.com>
dd27508
to
899e6b9
Compare
/approve Thank you for your contribution |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wzshiming, zwpaper The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
What this PR does / why we need it:
currently we can only use docker to build kwok in
build.sh
, this PR add support for nerdctl.and updated test to drop docker dependency when testing nerdctl
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: