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

[enhancemnt] support local up openyurt on mac machine #836

Merged
merged 1 commit into from
May 20, 2022

Conversation

rambohe-ch
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage
/sig storage

/kind enhancement

What this PR does / why we need it:

In order to make OpenYurt developer can debug easily, In this pull request, we support to startup OpenYurt cluster locally on mac env. and the enhancements are as following:

  1. use docker buildx build to build OpenYurt Components images that can run across multi platforms.
  2. add node-servant config control-plane command for configuring kube-apiserver and kube-controller-manager static pod.
  3. add --enable-dummy-if and --enable-node-pool parameter for node-servant convert command in order to disable dummy interface and node pool list/watch for yurthub in mac env
  4. disable iptables mode for yurt-tunnel-server component
  5. add ConfigureAddons process for setting coredns and kube-proxy pod.

Which issue(s) this PR fixes:

Fixes #811

Special notes for your reviewer:

Does this PR introduce a user-facing change?

// Startup OpenYurt Cluster on Linux/amd64: 
$# make local_up_openyurt TARGET_PLATFORMS=linux/amd64

// Startup OpenYurt Cluster on Linux/arm64(MACBook Pro M1): 
$# make local_up_openyurt TARGET_PLATFORMS=linux/arm64 ENABLE_DUMMY_IF=false

other Note

@openyurt-bot
Copy link
Collaborator

@rambohe-ch: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage
/sig storage

/kind enhancement

What this PR does / why we need it:

In order to make OpenYurt developer can debug easily, In this pull request, we support to startup OpenYurt cluster locally on mac env. and the enhancements are as following:

  1. use docker buildx build to build OpenYurt Components images that can run across multi platforms.
  2. add node-servant config control-plane command for configuring kube-apiserver and kube-controller-manager static pod.
  3. add --enable-dummy-if and --enable-node-pool parameter for node-servant convert command in order to disable dummy interface and node pool list/watch for yurthub in mac env
  4. disable iptables mode for yurt-tunnel-server component
  5. add ConfigureAddons process for setting coredns and kube-proxy pod.

Which issue(s) this PR fixes:

Fixes #811

Special notes for your reviewer:

Does this PR introduce a user-facing change?

// Startup OpenYurt Cluster on Linux/amd64: 
$# make local_up_openyurt TARGET_PLATFORMS=linux/amd64

// Startup OpenYurt Cluster on Linux/arm64(MACBook Pro M1): 
$# make local_up_openyurt TARGET_PLATFORMS=linux/arm64 ENABLE_DUMMY_IF=false

other Note

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.

@rambohe-ch
Copy link
Member Author

/assign @Congrool @donychen1134

@openyurt-bot
Copy link
Collaborator

@rambohe-ch: GitHub didn't allow me to assign the following users: donychen1134.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @Congrool @donychen1134

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.

@openyurt-bot openyurt-bot added the approved approved label May 17, 2022
@rambohe-ch rambohe-ch force-pushed the support-mac-env branch 2 times, most recently from 678ada9 to f10c4dd Compare May 17, 2022 10:22
Makefile Outdated Show resolved Hide resolved
@Congrool
Copy link
Member

review seems to need a little time to finish. I'll continue to review in the coming few days

@rambohe-ch rambohe-ch force-pushed the support-mac-env branch 2 times, most recently from 6d4f5fb to 00a9df2 Compare May 18, 2022 03:19
pkg/node-servant/components/yurthub.go Outdated Show resolved Hide resolved
pkg/node-servant/convert/options.go Show resolved Hide resolved
pkg/node-servant/config/control-plane.go Show resolved Hide resolved
cmd/yurt-node-servant/config/config.go Show resolved Hide resolved
pkg/yurtctl/cmd/yurttest/kindinit/init.go Outdated Show resolved Hide resolved
@rambohe-ch
Copy link
Member Author

@Congrool All of comments have been fixed, please take a look.

Copy link
Member

@Congrool Congrool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other revise is at Congrool@e7bbb91, including

  1. enable REGION, when set as cn, the GOPROXY and apk repository source will be set as a mirror in China.
  2. decouple local-up-openyurt with docker-build, we don't need to always build the image before local-up-openyurt
  3. change the image-tag. For HEAD which is actually points at a tag, like v0.6.0, the image tag will be v0.6.0, otherwise the image tag will be v0.6.0-${commit}. Use this image tag, we can avoid overwriting the image which already has the tag v0.6.0 when building images.

The commit was updated for fixing github action error.

pkg/yurtctl/cmd/yurttest/kindinit/init.go Outdated Show resolved Hide resolved
pkg/yurtctl/cmd/yurttest/kindinit/init.go Outdated Show resolved Hide resolved
@Congrool
Copy link
Member

/lgtm

@openyurt-bot openyurt-bot added the lgtm lgtm label May 20, 2022
@DrmagicE
Copy link
Member

/lgtm

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Congrool, DrmagicE, rambohe-ch

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kadisi kadisi merged commit 8ee8f4f into openyurtio:master May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] run yurtctl test on mac
5 participants