Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Run Port Forwarding Fails with Templating #9554

Open
alexwilson1 opened this issue Oct 30, 2024 · 0 comments
Open

Cloud Run Port Forwarding Fails with Templating #9554

alexwilson1 opened this issue Oct 30, 2024 · 0 comments

Comments

@alexwilson1
Copy link

Bug Report

Description

The skaffold.yaml configuration below is intended to set up port forwarding for a specific Cloud Run service using dynamic USER-based naming. The configuration appears to resolve the service name correctly, but the port forwarding still fails with a "service not found" error.

Configuration

apiVersion: skaffold/v4beta11
kind: Config

manifests:
  helm:
    releases:
      - name: test
        chartPath: "./skaffold/test"
        setValueTemplates:
          "service.name": "{{ .USER }}-test"

build:
  local:
    push: true

  artifacts:
    - image: us-central1-docker.pkg.dev/.../test
      context: context
      docker:
        dockerfile: Dockerfile

deploy:
  cloudrun:
    projectid: ID
    region: REGION

portForward:
  - resourceType: service
    resourceName: "{{ .USER }}-test"
    localPort: 9001

Environment

  • Skaffold Version: v2.13.1
  • Installation Method: Installed via Cloud Code
  • Operating System: macOS 15.0.1

Error Logs

Forwarding service projects/project-id/locations/us-central1/services/user-test to local port 8080
Forwarding service projects/project-id/locations/us-central1/services/user-processing to local port 8081
could not map pods to service default/user-test/0: getting service default/user-test: services "user-test" not found

Expected Behavior

The portForward directive should map the dynamically generated {{ .USER }}-test service name to the specified local port without errors.

Actual Behavior

Despite correctly resolving the {{ .USER }} placeholder in the logs, the port forwarding fails with a "service not found" error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant