GoogleContainerTools / GoogleContainerTools/skaffold
Constructing Image Names And Pushing: Append private repo and port to --default-repo eu.gcr.io/myproject
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
**Seeking Clarification of Functionality**
Is it possible to confirm that the below extract doesn't overlap with our enhancement request below - it seems similar - and of course we've tried to do this - and failed. If our enhancement request HAS has already been covered by skaffold, we'll convert this issue to a bug, and follow up with the detailed logs for our failed attempt.
Extract from [https://skaffold.dev/docs/environment/image-registries/](https://skaffold.dev/docs/environment/image-registries/)
```
default-repo contain gcr.io or -docker.pkg.dev (special cases - as GCR and AR allow for arbitrarily deep directory structure in image repo names)
strategy: concat unless prefix matches
example1: prefix doesn’t match:
original image: gcr.io/k8s-skaffold/skaffold-example1
default-repo: gcr.io/myproject/myimage
rewritten image: gcr.io/myproject/myimage/gcr.io/k8s-skaffold/skaffold-example1
```
**Enhancement Request**
```
EXTRACT...
default-repo domain CONTAINS eu.gcr.io, gcr.io, asia.gcr.io, us.gcr.io BUT original pre-built image is from a private repo. Port is also handled appropriately.
strategy: escape & concat & truncate to 256
original image: nexus.private.com:8001/k8s-skaffold/skaffold-exampleX
default-repo: eu.gcr.io/my-gcp-project-id
rewritten image: eu.gcr.io/my-gcp-project-id/nexus_private_com_8001/k8s-skaffold/skaffold-exampleX
```
We can achieve the same thing by doing this manually in bash, but it would be nice if skaffold natively supported it, including the automatic push of the image(s) to the target repo.
---
Contributor guide
Assessment
This issue has not been assessed yet.