gke-autoneg-controller icon indicating copy to clipboard operation
gke-autoneg-controller copied to clipboard

Configuring region for Regional Backend config may be unnecessary and confusing

Open rwkarg opened this issue 3 years ago • 4 comments

I missed this when looking at #34 but I don't think there's any opportunity to make choices for the backend region.

An Internal HTTP LB (regional backend service) can only include Backends from the same region. So a Backend Service in us-west1 can only have Backends also in us-west1. Trying to configure autoneg on a us-west1 cluster to add instances to a us-east1 Backend Service will not work, I believe.

I addressed this by pulling the cluster location (region) from metadata: http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-location so that user's aren't in the position of needing to magically know the only value that will actually work for region and having to explicitly configure it for each annotation.

One thing that may make this configuration required would be if there's potential for an Internal HTTP LB at some point in the future to allow Backends to be added to a Backend Service in a different region. If that happens, the it would become necessary to specify the Backend Service region in the annotation.

rwkarg avatar Aug 04 '21 16:08 rwkarg

Fair point, I guess we could use region:"auto" or similar for that functionality.

rosmo avatar Aug 04 '21 16:08 rosmo

Is there a case where we would want more than regional:true? Or can we think of any upcoming case?

soellman avatar Aug 05 '21 07:08 soellman

With the current functionality of global and regional backend services, just a regional: true setting is all that is needed.

I know there is an expressed desire for Internal HTTP Load Balancers to allow for global access, similar to how Internal TCP/UDP Load Balancers can be configured for global/cross-region access today. But I don’t know if that is being worked on or if whenever something like that got it mplemented would still restrict backends to a single region or expand that out.

rwkarg avatar Aug 05 '21 08:08 rwkarg

We can add support for regional boolean in addition to specifying the region manually. No harm in having both options.

rosmo avatar Aug 05 '21 08:08 rosmo