Feature: add fetch service list and get service detail from k8s cluster api to backend#170
Merged
Conversation
wilhelmguo
reviewed
Dec 21, 2018
wilhelmguo
approved these changes
Dec 24, 2018
Collaborator
|
LGTM @chengyumeng Please review the PR. |
chengyumeng
reviewed
Dec 24, 2018
Collaborator
|
@chengyumeng @HZ89 还有其他问题吗 |
Contributor
Author
|
我没啥问题 |
Collaborator
|
之前 review 提出的问题有一些还没回复呀 @HZ89 @wilhelmguo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
api add:
test result:
curl --location --request GET "http://127.0.0.1:8080/api/v1//kubernetes/apps/0/services/namespaces/default/clusters/minikube"{ "data": { "pageNo": 1, "pageSize": 10, "totalPage": 1, "totalCount": 2, "list": [ { "objectMeta": { "name": "kubernetes", "namespace": "default", "labels": { "component": "apiserver", "provider": "kubernetes" }, "creationTimestamp": "2018-12-20T08:35:42Z" }, "typeMeta": { "kind": "service" }, "internalEndpoint": { "host": "kubernetes", "ports": [ { "port": 443, "protocol": "TCP", "nodePort": 0 } ] }, "externalEndpoints": null, "selector": null, "type": "ClusterIP", "clusterIP": "10.96.0.1" }, { "objectMeta": { "name": "my-nginx", "namespace": "default", "labels": { "run": "my-nginx" }, "annotations": { "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"annotations\":{},\"labels\":{\"run\":\"my-nginx\"},\"name\":\"my-nginx\",\"namespace\":\"default\"},\"spec\":{\"ports\":[{\"port\":80,\"protocol\":\"TCP\"}],\"selector\":{\"run\":\"my-nginx\"}}}\n" }, "creationTimestamp": "2018-12-20T09:13:35Z" }, "typeMeta": { "kind": "service" }, "internalEndpoint": { "host": "my-nginx", "ports": [ { "port": 80, "protocol": "TCP", "nodePort": 0 } ] }, "externalEndpoints": null, "selector": { "run": "my-nginx" }, "type": "ClusterIP", "clusterIP": "10.101.60.195" } ] } }curl --location --request GET "http://127.0.0.1:8080/api/v1//kubernetes/apps/0/services/my-nginx/detail/namespaces/default/clusters/minikube"{ "data": { "objectMeta": { "name": "my-nginx", "namespace": "default", "labels": { "run": "my-nginx" }, "annotations": { "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"annotations\":{},\"labels\":{\"run\":\"my-nginx\"},\"name\":\"my-nginx\",\"namespace\":\"default\"},\"spec\":{\"ports\":[{\"port\":80,\"protocol\":\"TCP\"}],\"selector\":{\"run\":\"my-nginx\"}}}\n" }, "creationTimestamp": "2018-12-20T09:13:35Z" }, "typeMeta": { "kind": "service" }, "internalEndpoint": { "host": "my-nginx", "ports": [ { "port": 80, "protocol": "TCP", "nodePort": 0 } ] }, "externalEndpoints": null, "endpointList": [ { "objectMeta": { "creationTimestamp": null }, "typeMeta": { "kind": "endpoint" }, "host": "172.17.0.2", "nodeName": "minikube", "ready": true, "ports": [ { "port": 80, "protocol": "TCP" } ] }, { "objectMeta": { "creationTimestamp": null }, "typeMeta": { "kind": "endpoint" }, "host": "172.17.0.5", "nodeName": "minikube", "ready": true, "ports": [ { "port": 80, "protocol": "TCP" } ] } ], "selector": { "run": "my-nginx" }, "type": "ClusterIP", "clusterIP": "10.101.60.195", "eventList": [], "podList": null, "sessionAffinity": "None" } }