GoogleContainerTools / GoogleContainerTools/skaffold

Change the explanation of "default repo" setting in the doc to reflect actual implementation

Open
#1,516 3 comments 0 reactions 0 assignees View on GitHub
area/default-repo area/docs bugbash/q4-2022 fixit help wanted july-chill kind/documentation
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
Describe that 3rd default-repo config option described in the doc depends on kubectl context, not global.
https://skaffold.dev/docs/concepts/#image-repository-handling

### Actual behavior
It's documented as "skaffold’s global config", which is misleading. (Though `~/.skaffold/config` is global to all command call, the default repo setting is not "global")

### Information

- Skaffold version: v0.20.0
- Operating system: Debian 9.6
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v1beta2
kind: Config
build:
artifacts:
- image: frontendservice
context: src/frontend
- image: arrayparseservice
context: src/arrayparse
- image: addnumberservice
context: src/addnumber
deploy:
kubectl:
manifests:
- ./k8s-manifests/**.yaml
profiles:
- name: gcb
build:
googleCloudBuild:
diskSizeGb: 30
machineType: N1_HIGHCPU_32
timeout: 4000s
```

### Steps to reproduce the behavior

1. Set `artifacts/image` without target repo path.
2. Call `skaffold config set default-repo ` in some kubectl context
3. Change kubectl context
4. See the log `The push refers to repository [docker.io/library/xxxxxx]` and fail to deploy images during `skaffold dev/run`

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.