Code Monkey home page Code Monkey logo

Comments (5)

ahmetb avatar ahmetb commented on August 23, 2024

My suspicion is that our Region detection causes this.
On a VM, this returns 404:

curl -H "metadata-flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/region

as there's /zone on VMs.

from cloud-run-hello.

samos123 avatar samos123 commented on August 23, 2024

I'm not sure why it worked before though, but looking at the code it must be something related to metadata. I will investigate further later tonight and report back.

from cloud-run-hello.

ahmetb avatar ahmetb commented on August 23, 2024

I mean my comment alone explains at least why it doesn't work. Other variables that trigger this situation seem like they work fine on a VM environment.

from cloud-run-hello.

samos123 avatar samos123 commented on August 23, 2024

Yeah you were spot on. I verified by doing another test this time with GKE_METADATA and workload identity enabled. These commands were run from the application pod:

/ # wget --header "metadata-flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/region
Connecting to metadata.google.internal (169.254.169.254:80)
wget: server returned error: HTTP/1.1 404 Not Found
/ # wget --header "metadata-flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/zone
Connecting to metadata.google.internal (169.254.169.254:80)
saving to 'zone'
zone                 100% |************************************************************************************************|    41  0:00:00 ETA
'zone' saved

I'm going to try create a quick fork that doesn't get the region and see if the rest still works as is. Thanks so much for the pointers saved me a lot of time debuggin this.

from cloud-run-hello.

samos123 avatar samos123 commented on August 23, 2024

This samos123/cloud-run-hello@5584ed7 fixed the issue for Cloud Run on GKE as hacky workaround. I will provide a cleaner fix and submit PR later this week.

from cloud-run-hello.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.