Hi,
On Fri, Feb 14, 2020 at 4:43 PM Sanjeewa Malalgoda <[email protected]>
wrote:
> Hi Methusha,
> We have implemented this to a certain level in API Manager C5
> implementation. Can you please check the feasibility of reusing the same.
>
Yes, we can reuse some of the existing implementations.
> Also i think we will need to let users to select namespace and list
> available services(this will be helpful when we have many different
> namespaces and services in single deployment). Then they can choose one of
> the listed services.
>
Yes, we can allow users to select the namespaces for discovering services.
We can have a separate configuration for service discovery as below. As
this feature is designed to come up with any given service discovery
mechanism, I think we need to have a generic configuration.
-------------------
"ServiceDiscovery":{
"Type":"Kubernetes",
"ClassName":"org.wso2.carbon.apimgt.impl.containermgt.K8sServiceDiscovery",
"ImplParameters":{
"MasterURL":"https://kubernetes.docker.internal:6443",
"SAToken":"eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldZpY2VhY2Nvd...",
"Namespace":"default"
}
}
-------------------
As we are introducing a new REST API called /service-discovery, we can
design this REST API to query data based on the properties we pass. These
values may be changed based on the implementation. For K8s, the values look
like as below.
GET /service-discovery
query parameter: query=namespace:wso2 serviceType:clusterIP
Response:
{
"type":"Kubernetes",
"services":[
{
"serviceName":"foo-service",
"serviceURL":"http://10.0.0.11:6379",
"Properties":[
"Namespace:default",
"ServiceType:ClusterIP"
]
},
{
"serviceName":"bar-service",
"serviceURL":"http://10.0.0.11:6379",
"Properties":[
"Namespace:default",
"ServiceType:ClusterIP"
]
}
]
}
In the UI, we can have a filter option where we allow users to search based
on the properties.
Filter - Namespace:default
Service Name Service URL Properties
foo-service http://10.0.0.11:6379 Namespace: default, ServiceType: ClusterIP
bar-service http://10.0.0.12:6379 Namespace: default, ServiceType: ClusterIP
Thank you!
--
*Pubudu Gunatilaka* | Technical Lead | WSO2 Inc.
(m) +94774078049 | (w) +94112145345 | (e) [email protected]
<http://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture