kubeshop / kusk-gen

Kusk Gen generates Ingress-controller configurations from your OpenAPI definition
https://kubeshop.github.io/kusk-gen
MIT License
173 stars 12 forks source link

Detect presence of Ambassador in current Kubernetes cluster #19

Closed dobegor closed 3 years ago

dobegor commented 3 years ago

Resolves #12.

This implementation is just a stub to start with something and iterate over design of pluggable Services that we can detect and generate stuff for. The subcommand provided (detect) is there just to test it (and Linkerd presence when it's ready), once #13 is implemented it won't be there.

I chose the approach with detecting the Ambassador Deployment with the appropriate label since this covers all standard ways of Ambassador installation (edgectl, Edge Stack operator, manual installation). The other approach I was thinking of is to detect presence of CRDs in the cluster, but the implementation gets too complex. We might revisit that if more sophisticated detection is needed.

Remember, this is just a stub to start with something. I.e. once Ambassador 2.x is released, we might need to make some changes here.