-
At present, we need to specify a This means, that a user, in order to target an internal service, needs to manually construct the target URL in the format:
As an alternative, a user should be able to OPTIONALLY configure a service by namespace, name & port as the target.
Internally, when the reconciler finds
Questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Frankly I do not see anything bad at constructing this url. The same as with yaml config you still need to provide the same values host port and etc. Everyone working in k8s knows about this url format. Do we really solve any issue here, or just overthinking? |
Beta Was this translation helpful? Give feedback.
-
In our documentation, I quote
It shouldn't real matter how this value is derived(k8s/ad-hoc etc). As long as it is a valid URL resource. This works under the assumptions that our customers will also be deploying services in the same cluster which is a very huge assumption. IMHO: keeping a closer mapping between the resource and the resulting apidefinition will be a big win and I don't see this helping. |
Beta Was this translation helpful? Give feedback.
-
I see your points. But I still see massive value in validation of the existence of the underlying service and port. @buger @gernest what do you think if we took part of this rfc - the validation component. And deconstructed the target_url so that we may validate the target service & port? |
Beta Was this translation helpful? Give feedback.
-
Is the goal here to make sure the target is reachable? Assume we remove the loopback targets. On top of checking if it is a valid url. A dns lookup resolving into an IP should suffice, removing the requirement to know the structure of the url components. @asoorm can you maybe expand more on this idea in case I missed something? |
Beta Was this translation helpful? Give feedback.
-
Yes, validation can help here. E.g. if URL ends with "SVC.CLUSTER.LOCAL" actually check if such service exists. |
Beta Was this translation helpful? Give feedback.
-
The canonical / k8s way is for the controller to spit an error and retry with exponential backoff until the service becomes available. The resource would still be created. But the reconciler should return an error and requeue. |
Beta Was this translation helpful? Give feedback.
-
We have settled with specifying both name and namespace of the resource
This is referring to a ApiDefinition resource |
Beta Was this translation helpful? Give feedback.
We have settled with specifying both name and namespace of the resource
example
This is referring to a ApiDefinition resource
proxy-api
in thedefault
namespace.