apache / incubator-kie-kogito-operator

Kubernetes Operator for Kogito
Apache License 2.0
45 stars 79 forks source link

API for receiving deployed kogito services #788

Closed c0ldd closed 3 years ago

c0ldd commented 3 years ago

Hi ! According to docs example console gets list of kogito services. What API we can use to receive same information for our console ?

sutaakar commented 3 years ago

Hi @c0ldd, The screenshots you see in documentation are taken from OpenShift console itself. It is using standard Kubernetes API to retrieve those resources and their content. You can get those informations for example by running kubectl get kogitoruntimes -n <namespace> -o yaml, that will list all the KogitoRuntime custom resources available in the namespace .

c0ldd commented 3 years ago

By now Is this the only way to receive list of deployed services so far?

sutaakar commented 3 years ago

You can also use Kubernetes REST API. I don't have much experience with accessing it directly, there should be plenty of Kubernetes clients based on the language you use. It seems that you can get the services by REST using URL like <Kubernetes API URL>/apis/app.kiegroup.org/v1beta1/kogitoruntimes, that should list all KogitRuntime CRs in cluster (based on the user used for authentication for this request).