GoogleContainerTools / GoogleContainerTools/skaffold

port forwarding spurious warning.

Open
#5,870 0 comments 0 reactions 0 assignees View on GitHub
area/logging kind/friction kind/usability planning/Q4-21 priority/p1
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

I am working on github.com/google/triage-party project and i am seeing the following warnings.

The warning below
```Skipping the port forwarding resource Service/triage-party because namespace is not specified ```
is confusing. Especially my service gets portforwded correctly later.

```
Deployments stabilized in 3.619 seconds
WARN[0014] Skipping the port forwarding resource Service/triage-party because namespace is not specified
Press Ctrl+C to exit
Watching for changes...
Port forwarding service/triage-party in namespace default, remote port 8080 -> address 127.0.0.1 port 8080
```

expand skaffold.yaml

```
apiVersion: skaffold/v1
kind: Config
metadata:
name: teaparty
build:
artifacts:
- image: tparty
tagPolicy:
sha256: {}
local:
useBuildkit: false
useDockerCLI: false
deploy:
kubectl:
manifests:
- deploy/kubernetes/*.yaml
portForward:
- resourceName: triage-party
resourceType: Service
```

After adding `namespace: default` to the portforward section, i see the following
```
portForward:
- resourceName: triage-party
resourceType: Service
namespace: default
```

1) No warning as expected
2) But another confusing output in red.
`port forwarding service-triage-party-default-0 got terminated: output: error: Service triage-party does not have a service port 0`
```

> Listing files to watch...

- tparty
Generating tags...
- tparty -> gcr.io/tejal-gke1/tparty:latest
Checking cache...
- tparty: Found Remotely
Tags used in deployment:
- tparty -> gcr.io/tejal-gke1/tparty:latest@sha256:d045a1c8a0984e6f28dfa2ff28d6398b098676840c0a7c784249d0cda06f6d3a
Starting deploy...
- namespace/triage-party unchanged
- configmap/triage-party-config unchanged
- deployment.apps/triage-party unchanged
- service/triage-party unchanged
Waiting for deployments to stabilize...
- deployment/triage-party is ready.
Deployments stabilized in 1.851 second
Press Ctrl+C to exit
Watching for changes...
port forwarding service-triage-party-default-0 got terminated: output: error: Service triage-party does not have a service port 0

Port forwarding service/triage-party in namespace default, remote port 8080 -> address 127.0.0.1 port 8080

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.