Skip to content

Commit acd50ab

Browse files
authored
fix: remove image_registry tags from binary tasks (#3066)
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
1 parent 254b4ff commit acd50ab

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

builtin/core/roles/defaults/defaults/main/10-download.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ download:
131131
images:
132132
manifests: []
133133
# Architectures for which images should be downloaded.
134-
registry: ""
134+
registry: >
135+
{{- if .zone | eq "cn" }}
136+
hub.kubesphere.com.cn
137+
{{- end }}
135138
# Determines the image pull policy. support strict, warn
136139
policy: "strict"
137140
# kubernetes images list

builtin/core/roles/download/package/tasks/binary.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
dest: "{{ .artifact_dir }}/kubekey/crictl/{{ .item.version }}/{{ .item.arch }}/crictl-{{ .item.version }}-linux-{{ .item.arch }}.tar.gz"
113113

114114
- name: Binary | Ensure Docker binary is present
115-
tags: ["image_registry"]
116115
loop: >
117116
{{- $result := list -}}
118117
{{- range $arch := .download.arch }}
@@ -198,7 +197,6 @@
198197
dest: "{{ .artifact_dir }}/kubekey/cni/calico/{{ .item.version }}/{{ .item.arch }}/calicoctl-linux-{{ .item.arch }}"
199198

200199
- name: Binary | Ensure Docker Registry binary is present
201-
tags: ["image_registry"]
202200
loop: >
203201
{{- $result := list -}}
204202
{{- range $arch := .download.arch }}
@@ -216,7 +214,6 @@
216214
dest: "{{ .artifact_dir }}/kubekey/image-registry/docker-registry/{{ .item.version }}/{{ .item.arch }}/docker-registry-{{ .item.version }}-linux-{{ .item.arch }}.tgz"
217215

218216
- name: Binary | Ensure docker-compose binary is present
219-
tags: ["image_registry"]
220217
loop: >
221218
{{- $result := list -}}
222219
{{- range $arch := .download.arch }}
@@ -234,7 +231,6 @@
234231
dest: "{{ .artifact_dir }}/kubekey/image-registry/docker-compose/{{ .item.version }}/{{ .item.arch }}/docker-compose"
235232

236233
- name: Binary | Ensure Harbor binary is present
237-
tags: ["image_registry"]
238234
loop: >
239235
{{- $result := list -}}
240236
{{- range $arch := .download.arch }}
@@ -253,7 +249,6 @@
253249

254250

255251
- name: Binary | Ensure keepalived binary is present
256-
tags: ["image_registry"]
257252
loop: >
258253
{{- $result := list -}}
259254
{{- range $arch := .download.arch }}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@
119119
timeout: "{{ .download.timeout }}"
120120

121121
- name: Binary | Ensure Docker binary is present
122-
tags: ["image_registry"]
123122
loop: >
124123
{{- $result := list -}}
125124
{{- range $arch := .download.arch }}
@@ -214,7 +213,6 @@
214213
timeout: "{{ .download.timeout }}"
215214

216215
- name: Binary | Ensure Docker Registry binary is present
217-
tags: ["image_registry"]
218216
loop: >
219217
{{- $result := list -}}
220218
{{- range $arch := .download.arch }}
@@ -233,7 +231,6 @@
233231
timeout: "{{ .download.timeout }}"
234232

235233
- name: Binary | Ensure docker-compose binary is present
236-
tags: ["image_registry"]
237234
loop: >
238235
{{- $result := list -}}
239236
{{- range $arch := .download.arch }}
@@ -252,7 +249,6 @@
252249
timeout: "{{ .download.timeout }}"
253250

254251
- name: Binary | Ensure Harbor binary is present
255-
tags: ["image_registry"]
256252
loop: >
257253
{{- $result := list -}}
258254
{{- range $arch := .download.arch }}

cmd/kk/app/options/builtin/artifact.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ func NewArtifactImagesOptions() *ArtifactImagesOptions {
116116
func (o *ArtifactImagesOptions) Flags() cliflag.NamedFlagSets {
117117
fss := o.CommonOptions.Flags()
118118
kfs := fss.FlagSet("config")
119-
kfs.StringVar(&o.Kubernetes, "with-kubernetes", o.Kubernetes, fmt.Sprintf("Specify a supported version of kubernetes. default is %s", o.Kubernetes))
120119
kfs.BoolVar(&o.Push, "push", o.Push, "Push image to image registry")
121120
kfs.BoolVar(&o.Pull, "pull", o.Pull, "Pull image to binary dir")
122121

0 commit comments

Comments
 (0)