GoogleCloudPlatform / traffic-director-grpc-bootstrap

Apache License 2.0
20 stars 18 forks source link

add --gke-location-experimental to generate mesh ID for both regional and zonal GKE clusters #49

Closed arvindbr8 closed 10 months ago

arvindbr8 commented 1 year ago

Fixes #47

The value of --locality-zone flag has been used to auto generate Mesh ID as cluster location. However usage of zone to always generate the mesh ID is not correct. The location of the GKE cluster could either be either zonal or regional based on the deployment.

Hence we need to introduce a new flag --gke-location-experimental to determine the location of the GKE cluster. The flag is Ignored if not used with --generate-mesh-id-experimental. If unset the location of the GKE cluster can be determined using the following GKE metadata server (MDS) API http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-location.

For existing PSM users of the generator version https://github.com/GoogleCloudPlatform/traffic-director-grpc-boostrap/releases/v1.15.0 could continue using the same version of the generator if:

Customers would have to explicitly upgrade their version to include this change in order to get the new UX of determining the location of the GKE cluster using the MDS server. In which case, the value passed to --location-zone would be ignored and the new flag would be used instead.

arvindbr8 commented 10 months ago

@gnossen -- I've addressed your comments again, ptal

arvindbr8 commented 10 months ago

@ejona - gentle ping :)