8000 Change hardcoded "metadata" to "metadata.google.internal" · Issue #4269 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content

Change hardcoded "metadata" to "metadata.google.internal" #4269

@kbhattac

Description

@kbhattac

Resolution of the metadata endpoint from within a Istio enabled GKE pod works only with "metadata.google.internal" as the url and not "metadata". No output is produced without the FQDN.

$ curl "http://metadata/computeMetadata/v1/instance/disks/" -H "Metadata-Flavor: Google"
$ curl "http://metadata.google.internal/computeMetadata/v1/instance/disks/" -H "Metadata-Flavor: Google"
0/

Can this be changed to include the FQDN?

private static final String METADATA_URL = "http://metadata/computeMetadata/v1/";

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0