Improve the documentation for the default-repo logic on gcr.io
@@ -86,7 +86,7 @@ the full image name is rewritten on top of the default-repo so similar image nam
Automated image name rewriting strategies are determined based on the default-repo and the original image repository:
-* default-repo does not contain gcr.io
+* default-repo does not begin with gcr.io
* **strategy**: escape & concat & truncate to 256
```
@@ -94,14 +94,14 @@ Automated image name rewriting strategies are determined based on the default-re
default-repo: aws_account_id.dkr.ecr.region.amazonaws.com
rewritten image: aws_account_id.dkr.ecr.region.amazonaws.com/gcr_io_k8s-skaffold_skaffold-example1
```
-* default-repo contains "gcr.io" (special case - as GCR allows for infinite deep image repo names)
+* default-repo begins with "gcr.io" (special case - as GCR allows for infinite deep 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/gcr.io/k8s-skaffold/skaffold-example1
+ rewritten image: gcr.io/myproject/myimage/gcr.io/k8s-skaffold/skaffold-example1
````
* **example2**: prefix matches:
@@ -110,6 +110,13 @@ Automated image name rewriting strategies are determined based on the default-re
default-repo: gcr.io/k8s-skaffold
rewritten image: gcr.io/k8s-skaffold/skaffold-example1
```
+ * **example3**: shared prefix:
+
+ ```
+ original image: gcr.io/k8s-skaffold/skaffold-example1
+ default-repo: gcr.io/k8s-skaffold/myimage
+ rewritten image: gcr.io/k8s-skaffold/myimage/skaffold-example1
+ ```
## Architecture
