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

idea about k8s crd & skywalkingcli #3889

Closed
1 of 4 tasks
wayilau opened this issue Nov 19, 2019 · 26 comments
Closed
1 of 4 tasks

idea about k8s crd & skywalkingcli #3889

wayilau opened this issue Nov 19, 2019 · 26 comments
Assignees
Labels
feature New feature
Milestone

Comments

@wayilau
Copy link
Member

wayilau commented Nov 19, 2019

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirement
  • Feature or performance improvement

Question

As we know, k8s is very popular.
when we are working cli for skywalking. From k8s crd, my idea is that we can use k8s crds to achieve this goal. we can do this directly when skywalking deployed in k8s. we also can achieve this by service catalog when skywalking deployed outside of k8s. From the crd we defined, we can do a lot of things. it is also not conflict with the cli command.

@wu-sheng
Copy link
Member

CLI is a stand alone idea. It doesn't need to link to cry.

At the same time, crd is a good goal too. If you want to work on that, @hanahmily and @innerpeacez are the right ones to talk with. We could discuss here or in mail list.

@wayilau
Copy link
Member Author

wayilau commented Nov 19, 2019

OK. FYI @hanahmily @innerpeacez
I will give my detail idea later here or in mail list. I also need your help.

@wu-sheng wu-sheng added feature New feature TBD To be decided later, need more discussion or input. labels Nov 19, 2019
@innerpeacez
Copy link
Member

innerpeacez commented Nov 19, 2019

@hanahmily seems to have begun to conceive operator. Looking forward to your idea. @wayilau

@wayilau
Copy link
Member Author

wayilau commented Nov 19, 2019

SW CRDS & Skywalking

detail idea.

As Skywalking can be deployed on Kubernetes or outside of Kubernetes. Now i am not sure whether we can use union crds to manage both of them. If we don't consider so much, we only use the oap address so we can achieve this. otherwise, we may use service-catalog when Skywalking deployed outside of Kubernetes.
SW crds are easy to defined, same as sw-cli, we also can add other options & parameters, all the same goal they are.
the differences are that sw cli is stand alone tool used in pc directory. but SW crds are working on Kubernetes, which is tool interacted with Kubernetes tightly.

we can use crds to:

  • list instances like :
kubectl get swinstance -n ${namespace}
  • list instance endpoints list:
kubectl get swendpoints -n ${namespace}
  • get single instance
kubectl get swinstance ${name} -n ${namespace}
  • list service like:
kubectl  get swservice -n ${namespace}
  • list single service like:
kubectl get swservice ${svc-name} -n ${namespace}
  • ...

Also we can add a lot option, like 'start' & 'end'.

As sw cli needs a configuration. we can add configuration when we install the crds. from describe command we can see the events of conn to oap. like logs to watch the oap server. Also we can control the event what we want know.

FYI @wu-sheng @innerpeacez @hanahmily

@wu-sheng
Copy link
Member

Do you know watching this subproject? https://github.com/apache/skywalking-cli
Could you define what is the difference between these two?

@wayilau
Copy link
Member Author

wayilau commented Nov 19, 2019

Yes, I am watching this subproject. @wu-sheng
But CRD is another choice as cli does, i think the crds tool is familiar with Kubernetes users.
Another way If we don't need another tool, As mentioned above, we can do our operator to manage skywalking on k8s.

@wu-sheng
Copy link
Member

In my mind, the operator should focus on the operation side, rather than like CLI to just query and interact with SkyWalking inside APIs. And, you need to notice, there is no operation related GraphQL API today. If you want to do, you need a more detailed document.

Also, as the CLI project has not released yet, and @innerpeacez is working on the helm release project, also Istio CI is WIP, which has a much higher priority.

@wayilau Do you consider about the workload? Do you want to do this alone? Or having other contributors to work with you? Normally, the subproject requires at least one committer to lead, and the PMC to watch, otherwise, the contributor team may break the Apache rules.

@innerpeacez
Copy link
Member

But CRD is another choice as cli does, i think the crds tool is familiar with Kubernetes users.
Another way If we don't need another tool, As mentioned above, we can do our operator to manage skywalking on k8s.

I think skywalking-operator is a good way to manage skywalking deployment. And the skywalking-operator can also have a corresponding chart.After the CLI, I don't think SW need to use CRD to do some queries.Because the CLI should eventually be included in the oap image.

@wu-sheng
Copy link
Member

Because the CLI should eventually be included in the oap image.

CLI even could has its own image.

@wu-sheng
Copy link
Member

I think skywalking-operator is a good way to manage skywalking deployment.

This is the CRD in my mind.

@innerpeacez
Copy link
Member

CLI even could has its own image.

Yes, because swctl config has been designed

@wayilau
Copy link
Member Author

wayilau commented Nov 19, 2019

Yes, they are all crd, but do different jobs. operator used to manage skywalking cluster status. but crds could do things like swcli.
Another question, does cli could sperate the cluster dynamicly when i deployed multiple Skywalking cluster on k8s? or we need to give the oap url for every query?

@wu-sheng
Copy link
Member

Another question, does cli could sperate the cluster dynamicly when i deployed multiple Skywalking cluster? or we need to give the oap url for every query?

Today, there is no alias name or cluster name config. But this could be added. CLI is a new project, even 0.1.0 isn't released yet.

@hanahmily
Copy link
Contributor

Thanks for your proposal @wayilau. It's a great idea to operate SW backend(OAP/UI) in both VM and Kubernetes with the same standard.
I want to pick up CRDs as our final solution of CLI interaction, which is an alternative to Web UI. Because it's the future, and I desire to follow it closely. But the concern is also the "future", well, it didn't come though. Most developers/operators aren't familiar with Kubernetes, not to CRDs.
Another reason is SkyWalking is being used by operators in most cases, this user group prefer an easier way to figure out their jobs. A K8S way will bring much more complex and chaos to them.
So my suggestion is hiding K8S and VM behind SWCLI, then users don't need to care about on which platform they're working. It is not some new idea, and some successful project has followed this way, for instance, Istio.

And for CRDs, I would like to put it into operator, controller, and sidecar injection. The Kubernetes community of SkyWalking focus on making SkyWalking in Kubernetes to work better than other platforms instead of replacing them, which empower the Kubernetes to attract more and more users to work on it.

@wayilau
Copy link
Member Author

wayilau commented Nov 20, 2019

Thanks for your reply. @hanahmily
Now, it's time for swcli. I want join you when it's time for operator or crds in the future.
Yes, you are right, we just want to empower, not replacing. And Is there an repo for Skywalking Operator ?

@wu-sheng
Copy link
Member

Is there an repo for Skywalking Operator ?

Not yet. We usually require you to propose the detailed design, and ask for review that in the mail list. If other committers join, then we could open a repo for that.

@wayilau
Copy link
Member Author

wayilau commented Nov 20, 2019

I see. @wu-sheng
BTW, @hanahmily have you begun to do this already ? If you have not, I will .

@hanahmily
Copy link
Contributor

hanahmily commented Nov 20, 2019 via email

@wu-sheng
Copy link
Member

@hanahmily Notice, @innerpeacez has changed the skywalking-k8s repo to release mode, so basically, in the master branch, it only includes 6.5.0 k8s helm. Are you going to need another repo to host this? Is there a separated release process?

@wayilau
Copy link
Member Author

wayilau commented Nov 20, 2019

@hanahmily
OK, I'm waiting for your good news in the mail list.

@hanahmily
Copy link
Contributor

hanahmily commented Nov 20, 2019 via email

@wu-sheng
Copy link
Member

OK, as it is planned to be a separated repo, it is good for me.

@innerpeacez
Copy link
Member

OK, I'm waiting for your good news in the mail list.

The same to me

@hanahmily
Copy link
Contributor

@wayilau
Copy link
Member Author

wayilau commented Nov 27, 2019

Yes, I am reading the doc. @hanahmily

@wu-sheng
Copy link
Member

wu-sheng commented Aug 6, 2020

CLI subproject has been created and released for a long time.

@wu-sheng wu-sheng closed this as completed Aug 6, 2020
@wu-sheng wu-sheng added this to the 8.2.0 milestone Aug 6, 2020
@wu-sheng wu-sheng removed the TBD To be decided later, need more discussion or input. label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

4 participants