Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update hack/generate-kind-config.sh to handle multiple mirrors #5977

Merged
merged 2 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,26 @@ jobs:
- C:\\Users\\travis\\AppData\\Local\\go-build
- name: "kind integration partition 0"
<<: *integration_test
<<: *upgrade_docker
<<: *registry_mirror
script:
- env IT_PARTITION=0 make integration-in-kind
- name: "kind integration partition 1"
<<: *integration_test
<<: *upgrade_docker
<<: *registry_mirror
script:
- env IT_PARTITION=1 make integration-in-kind
- name: "kind integration partition 2"
<<: *integration_test
<<: *upgrade_docker
<<: *registry_mirror
script:
- env IT_PARTITION=2 make integration-in-kind
- name: "kind integration partition 3"
<<: *integration_test
<<: *upgrade_docker
<<: *registry_mirror
script:
- env IT_PARTITION=3 make integration-in-kind
- name: "k3d integration partition 0"
Expand Down
2 changes: 1 addition & 1 deletion hack/generate-kind-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.

# Create a kind configuration to use the docker daemon's configured registry-mirrors.
docker system info --format '{{printf "apiVersion: kind.x-k8s.io/v1alpha4\nkind: Cluster\ncontainerdConfigPatches:\n"}}{{range $reg, $config := .RegistryConfig.IndexConfigs}}{{if $config.Mirrors}}{{printf "- |-\n [plugins.\"io.containerd.grpc.v1.cri\".registry.mirrors.\"%s\"]\n endpoint = %q\n" $reg $config.Mirrors}}{{end}}{{end}}'
docker system info --format '{{printf "apiVersion: kind.x-k8s.io/v1alpha4\nkind: Cluster\ncontainerdConfigPatches:\n"}}{{range $reg, $config := .RegistryConfig.IndexConfigs}}{{if $config.Mirrors}}{{printf "- |-\n [plugins.\"io.containerd.grpc.v1.cri\".registry.mirrors.\"%s\"]\n endpoint = [" $reg}}{{range $index, $mirror := $config.Mirrors}}{{if $index}},{{end}}{{printf "%q" $mirror}}{{end}}{{printf "]\n"}}{{end}}{{end}}'