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

EdgeSite working with standard K8s master #400

Merged
merged 10 commits into from May 17, 2019
Merged

Conversation

CindyXing
Copy link
Member

@CindyXing CindyXing commented Apr 22, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind test
/kind failing-test

/kind feature

What this PR does / why we need it:
This change enables KubeEdge agent talking to a K8s master such as K3S server.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@kubeedge-bot kubeedge-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 22, 2019
@m1093782566
Copy link

A quick question, should not we treat edgesite as an independent project?

@CindyXing
Copy link
Member Author

A quick question, should not we treat edgesite as an independent project?

I'd like to make sure we brand the edgesite as part of KubeEdge project. Also edgesite mainly is to build a new client side.

@rohitsardesai83
Copy link
Collaborator

@CindyXing , the idea of edge site is good . Is there some way we can avoid code duplication ?

@sids-b
Copy link
Member

sids-b commented Apr 24, 2019

@CindyXing , the idea of edge site is good . Is there some way we can avoid code duplication ?

+1 to @rohitsardesai83 . All our settings are configuration based. I feel having a edgesite.go , conf and few changes in edge modules should do the work. I can help with it :)

@@ -13,6 +13,8 @@ func ParseResourceEdge(resource string, operation string) (string, string, strin
resourceSplits := strings.Split(resource, "/")
if len(resourceSplits) == 3 {
return resourceSplits[0], resourceSplits[1], resourceSplits[2], nil
} else if len(resourceSplits) == 5 {
Copy link
Member

Choose a reason for hiding this comment

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

We need to change in https://github.com/kubeedge/beehive and then update the vendor.

@sids-b
Copy link
Member

sids-b commented Apr 24, 2019

A quick question, should not we treat edgesite as an independent project?

I'd like to make sure we brand the edgesite as part of KubeEdge project. Also edgesite mainly is to build a new client side.

Agree, kubeedge should be able to support EdgeSite scenarios as well.

@CindyXing
Copy link
Member Author

@CindyXing , the idea of edge site is good . Is there some way we can avoid code duplication ?

+1 to @rohitsardesai83 . All our settings are configuration based. I feel having a edgesite.go , conf and few changes in edge modules should do the work. I can help with it :)

Yes, agree that we should prevent dup code. That's why most of the code is referenced from edge folder. Currently there is some change in the controller/manager that it'll only watch pods bond to the current node. There can be other change(s) needed. So, for now, let's keep separate and then adjust accordingly.

Copy link
Member Author

@CindyXing CindyXing left a comment

Choose a reason for hiding this comment

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

That's why we should use protobuf for the message type and not hardcode the index and length.

@m1093782566 m1093782566 added this to the Backlog milestone Apr 26, 2019
@qizha qizha changed the title [WIP] EdgeSite working with K8s master or K3S server [WIP] EdgeSite working with standard K8s master May 10, 2019
qizha
qizha previously approved these changes May 10, 2019
@sids-b
Copy link
Member

sids-b commented May 13, 2019

The design doc mentions about lightweight etcd, where does that fit here ? Or will we be using sqlite ?

@CindyXing
Copy link
Member Author

The design doc mentions about lightweight etcd, where does that fit here ? Or will we be using sqlite ?
lightweight etcd is for the control plane not agent.

The design doc mentions about lightweight etcd, where does that fit here ? Or will we be using sqlite ?

What do you mean @sids-b? Either sqlite or lightweight etcd. A lightweight etcd can be used when it is available. And it is customer's choice.

@sids-b
Copy link
Member

sids-b commented May 13, 2019

Ohh, I get it now, so metaManager uses either sqlite or ligtweight etcd based on configurations of customer. Sounds good :)

Copy link
Member

@kevin-wangzefeng kevin-wangzefeng left a comment

Choose a reason for hiding this comment

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

Minor comments, thanks.

edgesite/pkg/controller/constants/service.go Outdated Show resolved Hide resolved
edgesite/pkg/controller/config/kube.go Show resolved Hide resolved
ResourceSliceLength = 5
ResourceSliceLengthQuery = 4
ResourceNodeIndex = 0
ResourceNodeIDIndex = 1
Copy link
Member

Choose a reason for hiding this comment

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

inaccurate indent

}

// In case the status stored at metadata service is outdated, update the heartbeat automatically
/*for i := range nodeStatusRequest.Status.Conditions {
Copy link
Member

Choose a reason for hiding this comment

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

Why it is period commented?
If it's intended, please describe when to uncomment this.

edgesite/pkg/controller/config/kube.go Show resolved Hide resolved
edgesite/pkg/controller/config/kube.go Show resolved Hide resolved
edgesite/pkg/controller/config/kube.go Show resolved Hide resolved
@sids-b sids-b changed the title [WIP] EdgeSite working with standard K8s master EdgeSite working with standard K8s master May 15, 2019
@sids-b
Copy link
Member

sids-b commented May 15, 2019

@kevin-wangzefeng @qizha @m1093782566 . The PR is ready for review

Copy link
Collaborator

@rohitsardesai83 rohitsardesai83 left a comment

Choose a reason for hiding this comment

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

lgtm

@rohitsardesai83
Copy link
Collaborator

Let's address the issue #531 post merging this. Thanks.

Copy link
Member

@sids-b sids-b left a comment

Choose a reason for hiding this comment

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

LGTM

@sids-b
Copy link
Member

sids-b commented May 17, 2019

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2019
@m1093782566
Copy link

/lgtm

metamanager:
context-send-group: controller
context-send-module: controller
edgesite: true
Copy link
Member

Choose a reason for hiding this comment

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

No new line at end of file

Copy link
Member

@kevin-wangzefeng kevin-wangzefeng left a comment

Choose a reason for hiding this comment

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

LGTM.
One none blocking issue is that we need version control for the component configs, which makes life easier for upgrades etc.. Let's clean it up in #525

@kevin-wangzefeng kevin-wangzefeng merged commit dc7c75f into master May 17, 2019
@sids-b
Copy link
Member

sids-b commented May 17, 2019

LGTM.
One none blocking issue is that we need version control for the component configs, which makes life easier for upgrades etc.. Let's clean it up in #525

Sure, Thanks

@sids-b sids-b deleted the cindy-edgesite branch May 19, 2019 10:51
lidiyag pushed a commit to lidiyag/kubeedge that referenced this pull request Jun 19, 2019
EdgeSite working with standard K8s master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants