Comments (5)
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.
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.
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.
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.
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)
- Avoid layout refresh due to unknown image size HOT 1
- Low accessibilty audit score
- No dark mode HOT 7
- Improve golang code sample practices HOT 5
- Add automated testing HOT 1
- Change "Congrats" to "Congratulations"
- Make the container display the value of an env var if present HOT 4
- Move to Go 1.14, use go.mod use smaller base image
- Is it possible to deploy multiple services with same google container image? HOT 1
- Trasnsitions
- embed the index.html HOT 2
- placeholder: support arbitrary args
- Panic right after pushing image HOT 3
- Fix: Update tag to google-22
- README should provide Artifact Registry image
- Evaluate is cloudevent dependency is still needed HOT 1
- Clean up the NetworkEgressError check
- Main CTA is below the fold HOT 1
- The $PORT in the log message is a literal HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-run-hello.