Skip to content

Commit ee6a16a

Browse files
committed
fix: exclude cni_plugins_version
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
1 parent 2a784be commit ee6a16a

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

builtin/core/roles/defaults/templates/manifests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,11 @@ download:
521521
type: {{ .download.cni.type | toJson }}
522522
# ========== cni ==========
523523
# cni_plugins binary
524+
{{- if .download.cni.type | empty | not }}
524525
cni_plugins_version: {{ .download.cni.cni_plugins_version| default (list "v1.9.1") | toJson }}
526+
{{- else }}
527+
cni_plugins_version: []
528+
{{- end }}
525529
# ========== cni: calico ==========
526530
# calicoctl binary
527531
{{- if .download.cni.type | has "calico" }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
- name: Package | Export artifact
2020
command: |
2121
# package binary directory
22-
cd {{ .artifact_dir }}/kubekey && tar -czvf {{ .artifact_dir }}/kubekey-artifact.tgz . && rm -rf {{ .artifact_dir }}/kubekey
22+
tar -czvf {{ .artifact_dir }}/kubekey-artifact.tgz -C {{ .artifact_dir }}/kubekey . && rm -rf {{ .artifact_dir }}/kubekey

hack/downloadKubekey.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ fi
114114
115115
echo "Exporting artifact with kk..."
116116
./kk artifact export -c "\$CONFIG_FILE" --workdir prepare --set download.tools.kubekey=$DOWNLOAD_PREFIX/releases/download/$VERSION/kubekey-$VERSION-linux-"{{ \"{{ .arch }}\" }}".tar.gz --set artifact_dir=prepare/${ARTIFACT_DIR}
117+
if [ \$? -ne 0 ]; then
118+
echo "Failed to export artifact with kk. Please check the command output above."
119+
exit 1
120+
fi
117121
118122
if [ -f "web-installer.tgz" ]; then
119123
echo "Extracting web-installer.tgz to ${ARTIFACT_DIR}/web-installer/ ..."

0 commit comments

Comments
 (0)