-
Notifications
You must be signed in to change notification settings - Fork 41
✨ Support RKE2ControlPlane mhc remediation #627
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
base: main
Are you sure you want to change the base?
Conversation
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.
Hey, thanks for the PR 👍🏼
I have not looked into the logic yet, but can you please first rename the KCP mentions with RKE2ControlPlane everywhere (comments, file names, vars etc)?
Hey @furkatgofurov7, done. The only place where i left kcp is in tests, because i've used the standard capi |
f3fff44
to
50446ee
Compare
@MaxFedotov you can run |
@furkatgofurov7, done |
hey @furkatgofurov7! Is there anything else i can do to proceed with this PR? Thanks! |
# Build architecture | ||
ARG ARCH |
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.
This and related changes to ARCH
usage in Makefile are partially reverting the change we merged moving from docker build
to docker buildx
. I am curious to know why this change is required since we have a list of target platforms already defined to build the images?
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.
The problem here is that i'm using apple silicon to build the image, so
cluster-api-provider-rke2/Makefile
Line 120 in c75777e
ARCH ?= $(shell go env GOARCH) |
will return arm64
.
With the --load
flag, docker daemon is trying to upload darwin\arm64
image to local docker daemon, which uses linux, which leads to the following error:
ERROR: failed to solve: rpc error: code = Unknown desc = cannot load darwin image on linux
If we don't won't to hardcode the platform, I will add additional variable
TARGET_PLATFORM = linux/$(ARCH)
and use it in docker-build-rke2-bootstrap
and docker-build-rke2-control-plane
:
DOCKER_BUILDKIT=1 BUILDX_BUILDER=$(MACHINE) docker buildx build \
--platform $(TARGET_PLATFORM) \
--load \
...
test/e2e/data/infrastructure/cluster-template-kcp-remediation.yaml
Outdated
Show resolved
Hide resolved
6c7b9d7
6c7b9d7
to
aa8fd1f
Compare
…ET_PLATFORM arg to makefile
aa8fd1f
to
ba4e051
Compare
Sorry for the force push, had to rebase the branch to the latest main to fix the conflicts |
kind/feature
What this PR does / why we need it:
This PR adds support for RKE2ControlPlane remediation. The code is taken from KCP (https://github.com/kubernetes-sigs/cluster-api/blob/main/controlplane/kubeadm/internal/controllers/remediation.go) and adopted for RKE2. It also adds a new
rcp_remediation_test
e2e test, based on CAPI e2eKCPRemediationSpec
.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #626
Special notes for your reviewer:
Checklist: