google-cloud-run

Trying to access FirestoreAdminClient from Cloud Run service using firebase-admin. ERROR: 7 PERMISSION_DENIED: The caller does not have permission

╄→尐↘猪︶ㄣ 提交于 2021-02-11 12:47:29
问题 I've got the following code for a an API endpoint that is supposed to trigger a Firestore backup using firebase-admin . This is how I'm initializing firebase-admin ; import * as admin from "firebase-admin"; admin.initializeApp({ credential: admin.credential.cert( SERVICE_ACCOUNT as admin.ServiceAccount )}); The service account key is a JSON I've downloaded using the default firebase-admin service account: This is the backup.ts API request handler. export const backupData: RequestHandler =

Is there way white list IP addresses to access Cloud Run services?

倖福魔咒の 提交于 2021-02-10 17:00:56
问题 Is there way to setup access to Cloud Run services via whitelisted IP addresses? I could not find in documentation beside this Authentication overview 回答1: When you deploy a Cloud Run in private mode, the requester have to request the endpoint with a bearer token. This token is checked by Google Front End (GFE), also in charge of managing SSL certificate for example, and it has to reference an account (member, group or service account) that have the role run.invoker on the Cloud Run service.

How to get Cloud Run to handle multiple simultaneous deployments?

扶醉桌前 提交于 2021-02-10 14:29:47
问题 I've got a project with 4 components, and every component has hosting set up on Google Cloud Run, separate deployments for testing and for production. I'm also using Google Cloud Build to handle the build & deployment of the components. Due to lack of good webhook events from source system, I'm currently forced to trigger a rebuild of all components in a project every time there is a new change. In the project this means 8 different images to build and deploy, as testing and production use

How to get Cloud Run to handle multiple simultaneous deployments?

徘徊边缘 提交于 2021-02-10 14:27:34
问题 I've got a project with 4 components, and every component has hosting set up on Google Cloud Run, separate deployments for testing and for production. I'm also using Google Cloud Build to handle the build & deployment of the components. Due to lack of good webhook events from source system, I'm currently forced to trigger a rebuild of all components in a project every time there is a new change. In the project this means 8 different images to build and deploy, as testing and production use

How to map domain in AWS Route53 with GCP Cloud Run app

耗尽温柔 提交于 2021-02-08 08:13:23
问题 Our domain is registered in Route 53. We have 1 hosted zone, and the domain is currently used for one of our EC2 instances (I think as an elastic IP address). Our hosted zone has all of the records needed to work with our EC2 instance. We now need to use this domain instead for my an application deployed through GCP's Cloud Run. I have headed to console.cloud.google.com/run/domains and clicked Add Mapping , typed in our base url, and received a button to Verify in Webmaster Central , which I

Use Cloudflare Authenticated Origin Pull with GCP Cloud Run

帅比萌擦擦* 提交于 2021-02-05 11:22:08
问题 I'm wanting to put Cloudflare in front of my API hosted on Cloud Run. I'd like to ensure my Cloud Run app only accepts connections from Cloudflare (to avoid bypassing DDoS mitigation + rate limiting in Cloudflare). Is there any way to use Cloudflare's Authenticated Origin Pulls with Cloud Run? Other solutions that achieve the same effect are welcome too - however the key is I don't want traffic from non-Cloudflare sources to trigger a Cloud Run invocation (otherwise a DDoS could result in

Google cloud run: Can a service know its own url?

旧街凉风 提交于 2021-01-29 22:45:04
问题 I'm wondering if a container deployed on cloud run can somehow obtain its own service url or is it impossible? I'm wanting to know this because I want a cloud run worker that creates google cloud tasks for itself. If it is possible, how can it be done? 回答1: If you know the service name, you can make a GET HTTP request to https://{endpoint}/apis/serving.knative.dev/v1/{name} Method: namespaces.services.get For example : curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)"

Google cloud run: Can a service know its own url?

孤街浪徒 提交于 2021-01-29 22:36:02
问题 I'm wondering if a container deployed on cloud run can somehow obtain its own service url or is it impossible? I'm wanting to know this because I want a cloud run worker that creates google cloud tasks for itself. If it is possible, how can it be done? 回答1: If you know the service name, you can make a GET HTTP request to https://{endpoint}/apis/serving.knative.dev/v1/{name} Method: namespaces.services.get For example : curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)"

Google cloud run: Can a service know its own url?

妖精的绣舞 提交于 2021-01-29 22:20:30
问题 I'm wondering if a container deployed on cloud run can somehow obtain its own service url or is it impossible? I'm wanting to know this because I want a cloud run worker that creates google cloud tasks for itself. If it is possible, how can it be done? 回答1: If you know the service name, you can make a GET HTTP request to https://{endpoint}/apis/serving.knative.dev/v1/{name} Method: namespaces.services.get For example : curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)"

Gcloud - cloud run deployment fails for deployment to GKE

房东的猫 提交于 2021-01-29 21:32:07
问题 I am trying to deploy a sample angular app to GKE. I created a sample cluster enabling cloud run and istio services in it gcloud beta container clusters create new-cluster \ --addons=HorizontalPodAutoscaling,HttpLoadBalancing,Istio,CloudRun \ --machine-type=n1-standard-2 \ --cluster-version=latest \ --zone=us-east1-b \ --enable-stackdriver-kubernetes --enable-ip-alias \ --scopes cloud-platform --num-nodes 4 --disk-size "10" --image-type "COS" Following is my cloudbuild.yaml file steps: #