Skip to content

Commit 238eb2b

Browse files
Feat/pull image with multi arch (#2883)
* feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> * feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> * feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> * feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: support user pull one or more arch from image registry and combine them to one image Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> --------- Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
1 parent 38ba775 commit 238eb2b

File tree

4 files changed

+297
-50
lines changed

4 files changed

+297
-50
lines changed

.golangci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ linters-settings:
150150
- github.com/go-openapi/spec
151151
- github.com/google/go-cmp/cmp
152152
- github.com/google/gops
153+
- github.com/opencontainers/go-digest
153154
- github.com/kubesphere/kubekey
154155
- github.com/opencontainers/image-spec
155156
- github.com/pkg/sftp

builtin/core/roles/download/tasks/images.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
- name: Image | Download container images
22
image:
33
pull:
4+
platform: >-
5+
{{- if .download.image_platform_all }}
6+
*
7+
{{- else }}
8+
{{ .download.arch | toJson }}
9+
{{- end -}}
410
auths: "{{ .cri.registry.auths | toJson }}"
511
images_dir: >-
612
{{ .binary_dir }}/images/

docs/zh/modules/image.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ image模块允许用户下载镜像到本地目录或上传镜像到远程目录
1515
| pull.auths.password | 用于认证远程仓库的密码 | 字符串 || - |
1616
| pull.auths.insecure | 是否跳过当前远程仓库的tls认证 | bool || - |
1717
| pull.auths.plain_http | 是否使用http访问远程仓库 | bool || - |
18-
| pull.platform | 镜像的架构信息 | 字符串 || - |
18+
| pull.platform | 镜像的架构信息 | 字符串数组 || - |
1919
| pull.skip_tls_verify | 默认的是否跳过远程仓库的tls认证 | bool || - |
2020
| push | 从本地目录中推送镜像到远程仓库 | map || - |
2121
| push.images_dir | 镜像存放的本地目录 | 字符串 || - |
@@ -29,6 +29,7 @@ image模块允许用户下载镜像到本地目录或上传镜像到远程目录
2929
| push.src_pattern | 正则表达式,过滤本地目录中存放的镜像 | map || - |
3030
| push.dest | 模版语法,从本地目录镜像推送到的远程仓库镜像 | map || - |
3131
| copy | 模版语法,将镜像在文件系统和镜像仓库内相互复制 | map || - |
32+
| copy.platform | 镜像的架构信息 | 字符串数组 || - |
3233
| copy.from | 模版语法,源镜像信息 | map || - |
3334
| copy.from.path | 镜像源文件路径 | 字符串 || - |
3435
| copy.from.manifests | 源镜像列表 | 字符串数组 || - |
@@ -65,7 +66,9 @@ image模块允许用户下载镜像到本地目录或上传镜像到远程目录
6566
image:
6667
pull:
6768
images_dir: /tmp/images/
68-
platform: linux/amd64
69+
platform:
70+
- amd64
71+
- arm64
6972
manifests:
7073
- "docker.io/kubesphere/ks-apiserver:v4.1.3"
7174
- "docker.io/kubesphere/ks-controller-manager:v4.1.3"

0 commit comments

Comments
 (0)