Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit 437992b

Browse files
committed
Update static GCP metadata URL
When running Istio on Google Kubernetes Enginge (GKE), the Envoy sidecar proxy will fail to route any requests made to the metadata server via the `metadata` hostname (requests will 404). Requests made to the fully qualified `metadata.google.internal` hostname can be routed. Update the constant for the metadata host in `GcpMetadataConfig` to use the FQDN.
1 parent c35bc41 commit 437992b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/resource_util/src/main/java/io/opencensus/contrib/resource/util/GcpMetadataConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
final class GcpMetadataConfig {
3636

37-
private static final String METADATA_URL = "http://metadata/computeMetadata/v1/";
37+
private static final String METADATA_URL = "http://metadata.google.internal/computeMetadata/v1/";
3838

3939
private GcpMetadataConfig() {}
4040

0 commit comments

Comments
 (0)