Skip to content

Remove dependency on cloud.google.com/go/compute/metadata #3

@joaopenteado

Description

@joaopenteado

Currently, this package is using Google Cloud official metadata Go SDK to fetch metadata (cloud.google.com/go/compute/metadata). However, this package is made for the GCE instance metadata server in mind and doesn't follow the Cloud Run runtime contract, which states that:

To access metadata server data, use HTTP requests to the http://metadata.google.internal/ endpoint with the Metadata-Flavor: Google header: no client libraries are required. For more information, see Getting metadata.

While this works because currently metadata.google.internal points at the same 169.254.169.254 IP address, the runtime contract makes no such guarantees.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions