GoogleContainerTools / GoogleContainerTools/skaffold

Skaffold forcing localhost when other registry name is specified

Open
#7,431 7 comments 0 reactions 0 assignees View on GitHub
area/tag kind/bug needs-reproduction priority/p1
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
Skaffold will tag the artifacts with the registry provided
`registry.localhost:32000/api-gateway:2d7ca77d4@sha256:e11640290a608312c2cdd72c038bdfaef65cf2d7f2cca1fb62092ba28a265197`

This is the behavior I see in skaffold version `v1.35.0`

### Actual behavior
Skaffold tags the artifacts forcing localhost and using the original registry as part of the name
`localhost:32000/registry_localhost_32000_api-gateway:2d7ca77d4@sha256:e11640290a608312c2cdd72c038bdfaef65cf2d7f2cca1fb62092ba28a265197`

### Information

- Skaffold version: v1.38.0
- Operating system: ubuntu 20.04 kernel 5.4.0-110-generic
- Installed via: skaffold.dev
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v2beta28
kind: Config
build:
artifacts:
- image: registry.localhost:32000/api-gateway
context: ../../../api-gateway
docker:
dockerfile: Dockerfile
target: dev-test
buildArgs:
BUILD_TYPE: dev-test
insecureRegistries:
- registry.localhost:32000
tagPolicy:
gitCommit:
variant: AbbrevCommitSha
local:
push: true
useBuildkit: true
concurrency: 0
deploy:
helm:
releases:
- name: nloop
chartPath: ../../../../charts/split-charts/stable/nloop
valuesFiles:
- values.yaml
artifactOverrides:
apiGateway.deployment.image: registry.localhost:32000/api-gateway
namespace: nloop
createNamespace: true
skipBuildDependencies: true
imageStrategy:
helm:
explicitRegistry: true
statusCheckDeadlineSeconds: 600
kubeContext: k3d-nl-local
portForward:
- resourceType: Service
resourceName: postgresql
namespace: postgres
port: 5432
localPort: 5432
- resourceType: Service
resourceName: redis-master
namespace: nloop
port: 6379
localPort: 6379
```

### Steps to reproduce the behavior

1. A helm chart with a deployment to match the artifactOverride
2. `skaffold dev`
3. `kubectl describe pod`

### skaffold log

```
Listing files to watch...
- registry.localhost:32000/api-gateway
Generating tags...
- registry.localhost:32000/api-gateway -> localhost:32000/registry_localhost_32000_api-gateway:2d7ca77d4
Checking cache...
- registry.localhost:32000/api-gateway: Found Remotely
Tags used in deployment:
- registry.localhost:32000/api-gateway -> localhost:32000/registry_localhost_32000_api-gateway:2d7ca77d4@sha256:e11640290a608312c2cdd72c038bdfaef65cf2d7f2cca1fb62092ba28a265197
Starting deploy...
NAME: nloop
LAST DEPLOYED: Thu May 19 23:12:32 2022
NAMESPACE: nloop
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The website can be accessed at localhost
Waiting for deployments to stabilize...
- nloop:deployment/api-gateway: waiting for rollout to finish: 0 of 1 updated replicas are available...
Cleaning up...
release "nloop" uninstalled
```

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.