TykTechnologies / tyk-operator

Tyk Operator for Kubernetes
https://tyk.io
Other
198 stars 40 forks source link

[TT-6436] Have tyk operator update Ingress resources with endpoint metadata #493

Open BenWolstencroft opened 2 years ago

BenWolstencroft commented 2 years ago

Tyk Operator should be able to update the originating Ingress resource with metadata once the API has been created within Tyk.

In the following example I have a deployment in kubernetes with a replicaset behind a service, and then two ingress resources defined;

Screenshot from K8s dashboard (detail redacted): Screenshot

The first is a Tyk ingress class, the second is an AWS ALB ingress class. You'll notice that the AWS Load Balancer controller is able to update the kubernetes ingress resource to give us further detail on the endpoints and hosts which have been provisioned for that Ingress.

looking at the k8s api, the definition of the AWS ALB ingress as additional 'status' properties':

status:
  loadBalancer:
    ingress:
      - hostname: >-
          internal-k8s-ossmigrationapi-######-######.eu-west-1.elb.amazonaws.com
komalsukhani commented 2 years ago

Hi @BenWolstencroft,

What kind of information would you like to see in the ingress metadata? I suppose a list of APIs created by Ingress controller.

BenWolstencroft commented 2 years ago

@komalsukhani Yeah exactly that, the "Tyk Url" (host and path) for any APIs created by the ingress controller, it's something that is useful for service discovery as well as allowing dashboards and monitoring to render URLs to assist engineers

komalsukhani commented 2 years ago

That's great idea! @BenWolstencroft. Thank you for raising it! I am sure it will be useful for other users too. We will get to it as soon as we can unless you want to raise PR for it!