-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Add support for alternative container runtime in kube-up.sh
#54964
Add support for alternative container runtime in kube-up.sh
#54964
Conversation
kube-up.sh
for alternative container runtime.kube-up.sh
cluster/gce/config-default.sh
Outdated
RKT_VERSION=${KUBE_RKT_VERSION:-1.23.0} | ||
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos} | ||
# MASTER_EXTRA_METADATA is the extra instance metadata on master instance separated by colon. |
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.
nit: s/colon/colons
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.
Will do.
cluster/common.sh
Outdated
@@ -908,7 +911,6 @@ EOF | |||
[[ "${master}" == "false" && "${NODE_OS_DISTRIBUTION}" == "container-linux" ]]; then | |||
# Container-Linux-only env vars. TODO(yifan): Make them available on other distros. | |||
cat >>$file <<EOF | |||
KUBERNETES_CONTAINER_RUNTIME: $(yaml-quote ${CONTAINER_RUNTIME:-rkt}) |
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.
Should we keep this for backward compatibility for at least a release?
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.
OK. Will keep the container-linux side unchanged.
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.
I mean to accept both for now :-)
cluster/gce/config-default.sh
Outdated
RKT_VERSION=${KUBE_RKT_VERSION:-1.23.0} | ||
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos} | ||
# MASTER_EXTRA_METADATA is the extra instance metadata on master instance separated by colon. | ||
MASTER_EXTRA_METADATA=${KUBE_MASTER_EXTRA_METADATA:-${KUBE_EXTRA_METADATA:-}} | ||
# MASTER_EXTRA_METADATA is the extra instance metadata on node instance separated by colon. |
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.
nit: s/colon/colons
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.
Will do.
Actually should be commas. Sorry.
@@ -80,9 +80,15 @@ NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${GCI_VERSION}} | |||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-cos-cloud} | |||
NODE_SERVICE_ACCOUNT=${KUBE_GCE_NODE_SERVICE_ACCOUNT:-default} | |||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker} | |||
CONTAINER_RUNTIME_ENDPOINT=${KUBE_CONTAINER_RUNTIME_ENDPOINT:-} |
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.
Just a question: when do we set KUBE_XXXXX variables?
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.
Usually before we run e2e-up.sh
and kube-up.sh
.
Excellent work. One small question: is |
Yeah, in |
1b188ca
to
9523fbf
Compare
Signed-off-by: Lantao Liu <lantaol@google.com>
9523fbf
to
75293ac
Compare
@yujuhong Addressed comments. |
/test pull-kubernetes-bazel-test |
Testing this out with cri-o, nice @Random-Liu |
You also need #54838 |
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dchen1107, Random-Liu, yujuhong No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 54488, 54838, 54964). If you want to cherry-pick this change to another branch, please follow the instructions here. |
kube-up.sh
kube-up.sh
For kubernetes/enhancements#286.
This PR added 4 new environment variables in
kube-up.sh
to support alternative container runtime:KUBE_MASTER_EXTRA_METADATA
andKUBE_NODE_EXTRA_METADATA
. Add extra metadata on master and node instance. With this we could specify different cloud-init for a different container runtime, and also add extra metadata for the new cloud-init, e.g. master.yamlKUBE_CONTAINER_RUNTIME_ENDPOINT
. Specify different sock for different container runtime. It's only used when it's not empty.KUBE_LOAD_IMAGE_COMMAND
. Specify different load image command for different container runtime.An example for cri-containerd:
Signed-off-by: Lantao Liu lantaol@google.com
/cc @yujuhong @dchen1107 @feiskyer @mikebrow @abhi @mrunalp @runcom
/cc @kubernetes/sig-node-pr-reviews