Skip to content

Instantly share code, notes, and snippets.

@nov05
Last active June 10, 2026 20:52
Show Gist options
  • Select an option

  • Save nov05/bde6c67f959217434d4296c29c50b3ab to your computer and use it in GitHub Desktop.

Select an option

Save nov05/bde6c67f959217434d4296c29c50b3ab to your computer and use it in GitHub Desktop.
Google Skills Arcade, GSP081 Cloud Run Functions: Qwik Start - Console

https://www.skills.google/games/7222/labs/44672

gcloud run services describe gcfunction \
  --region=$REGION \
  --format="yaml(spec.template)"
  • If the function is created via Cloud Shell:
spec:ormat="yaml(spec.template)"
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/maxScale: '5'
        cloudfunctions.googleapis.com/trigger-type: HTTP_TRIGGER
        run.googleapis.com/base-images: '{"worker":"europe-west3-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22"}'
        run.googleapis.com/client-name: gcloud
        run.googleapis.com/startup-cpu-boost: 'true'
      labels:
        run.googleapis.com/startupProbeType: Default
      name: gcfunction-00001-gew
    spec:
      containerConcurrency: 1
      containers:
      - env:
        - name: LOG_EXECUTION_ID
          value: 'true'
        image: europe-west3-docker.pkg.dev/qwiklabs-gcp-01-44ae3c083acb/gcf-artifacts/qwiklabs--gcp--01--44ae3c083acb__europe--west3__gcfunction:version_1
        name: worker
        ports:
        - containerPort: 8080
          name: http1
        resources:
          limits:
            cpu: '0.1666'
            memory: 256M
        startupProbe:
          failureThreshold: 1
          periodSeconds: 240
          tcpSocket:
            port: 8080
          timeoutSeconds: 240
      runtimeClassName: run.googleapis.com/linux-base-image-update
      serviceAccountName: 660504225966-compute@developer.gserviceaccount.com
      timeoutSeconds: 60
  • If it is created via console:
spec:ormat="yaml(spec.template)"
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/maxScale: '5'
        run.googleapis.com/base-images: '{"gcfunction-1":"europe-west3-docker.pkg.dev/serverless-runtimes/google-22/runtimes/nodejs22"}'
        run.googleapis.com/client-name: cloud-console
        run.googleapis.com/execution-environment: gen2
        run.googleapis.com/startup-cpu-boost: 'true'
      labels:
        run.googleapis.com/startupProbeType: Default
    spec:
      containerConcurrency: 80
      containers:
      - image: europe-west3-docker.pkg.dev/qwiklabs-gcp-01-44ae3c083acb/cloud-run-source-deploy/gcfunction:latest@sha256:713c3d6728d06475f06e232cadc150f2e55ae1bc2db8b1d7ec19d07f92a77337
        name: gcfunction-1
        ports:
        - containerPort: 8080
          name: http1
        resources:
          limits:
            cpu: 1000m
            memory: 512Mi
        startupProbe:
          failureThreshold: 1
          periodSeconds: 240
          tcpSocket:
            port: 8080
          timeoutSeconds: 240
      runtimeClassName: run.googleapis.com/linux-base-image-update
      serviceAccountName: 660504225966-compute@developer.gserviceaccount.com
      timeoutSeconds: 300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment