From 0b73e0a125633ebb7f70252ad390d435b7307b4b Mon Sep 17 00:00:00 2001 From: zuoxuesong-worker Date: Thu, 18 Dec 2025 18:45:29 +0800 Subject: [PATCH] bugfix : skip download when url not set (#2901) bugfix : fix image auth bug bugfix : fix image auth bug bugfix : fix image auth bug bugfix : fix image auth bug bugfix : skip download when url not set bugfix : skip download when url not set Signed-off-by: xuesongzuo@yunify.com --- builtin/core/roles/copy/tasks/binary.yaml | 64 +++++++++---- builtin/core/roles/copy/tasks/helm.yaml | 24 +++-- builtin/core/roles/copy/tasks/iso.yaml | 4 +- builtin/core/roles/download/tasks/binary.yaml | 89 ++++++++++++++++++- builtin/core/roles/download/tasks/helm.yaml | 30 +++++++ 5 files changed, 185 insertions(+), 26 deletions(-) diff --git a/builtin/core/roles/copy/tasks/binary.yaml b/builtin/core/roles/copy/tasks/binary.yaml index f9134489..144047dd 100644 --- a/builtin/core/roles/copy/tasks/binary.yaml +++ b/builtin/core/roles/copy/tasks/binary.yaml @@ -9,7 +9,9 @@ artifact_path={{ .binary_dir }}/etcd/{{ .etcd.etcd_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/etcd/{{ .etcd.etcd_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure Kubernetes binaries are present tags: ["kubernetes"] @@ -19,9 +21,15 @@ kube_path={{ .binary_dir }}/kube/{{ .kubernetes.kube_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/kube/{{ .kubernetes.kube_version }}/{{ .item }} mkdir -p $target_path - cp $kube_path/kubelet $target_path/ - cp $kube_path/kubeadm $target_path/ - cp $kube_path/kubectl $target_path/ + if [ -f $kube_path/kubelet ];then + cp $kube_path/kubelet $target_path/ + fi + if [ -f $kube_path/kubeadm ];then + cp $kube_path/kubeadm $target_path/ + fi + if [ -f $kube_path/kubectl ];then + cp $kube_path/kubectl $target_path/ + fi - name: Binary | Ensure CNI plugins are present tags: ["kubernetes"] @@ -32,7 +40,9 @@ artifact_path={{ .binary_dir }}/cni/plugins/{{ .cni.cni_plugins_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/cni/plugins/{{ .cni.cni_plugins_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure Helm binary is present tags: ["kubernetes"] @@ -43,7 +53,9 @@ artifact_path={{ .binary_dir }}/helm/{{ .kubernetes.helm_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/helm/{{ .kubernetes.helm_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure crictl binary is present tags: ["kubernetes"] @@ -54,7 +66,9 @@ artifact_path={{ .binary_dir }}/crictl/{{ .cri.crictl_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/crictl/{{ .cri.crictl_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure Docker binary is present tags: ["kubernetes","image_registry"] @@ -67,7 +81,9 @@ artifact_path={{ .binary_dir }}/docker/{{ .cri.docker_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/docker/{{ .cri.docker_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure cri-dockerd binary is present tags: ["kubernetes"] @@ -81,7 +97,9 @@ artifact_path={{ .binary_dir }}/cri-dockerd/{{ .cri.cridockerd_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/cri-dockerd/{{ .cri.cridockerd_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure containerd binary is present tags: ["kubernetes"] @@ -94,7 +112,9 @@ artifact_path={{ .binary_dir }}/containerd/{{ .cri.containerd_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/containerd/{{ .cri.containerd_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure runc binary is present tags: ["kubernetes"] @@ -107,7 +127,9 @@ artifact_path={{ .binary_dir }}/runc/{{ .cri.runc_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/runc/{{ .cri.runc_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure calicoctl binary is present tags: ["kubernetes"] @@ -120,7 +142,9 @@ artifact_path={{ .binary_dir }}/cni/calico/{{ .cni.calico_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/cni/calico/{{ .cni.calico_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure Docker Registry binary is present tags: ["image_registry"] @@ -133,7 +157,9 @@ artifact_path={{ .binary_dir }}/image-registry/docker-registry/{{ .image_registry.docker_registry_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/image-registry/docker-registry/{{ .image_registry.docker_registry_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Binary | Ensure docker-compose binary is present tags: ["image_registry"] @@ -146,7 +172,9 @@ compose_path={{ .binary_dir }}/image-registry/docker-compose/{{ .cri.dockercompose_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/image-registry/docker-compose/{{ .cri.dockercompose_version }}/{{ .item }} mkdir -p $target_path - cp $compose_path/$compose_name $target_path/ + if [ -f $compose_path/$compose_name ];then + cp $compose_path/$compose_name $target_path/ + fi - name: Binary | Ensure Harbor binary is present tags: ["image_registry"] @@ -159,7 +187,9 @@ harbor_path={{ .binary_dir }}/image-registry/harbor/{{ .image_registry.harbor_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/image-registry/harbor/{{ .image_registry.harbor_version }}/{{ .item }} mkdir -p $target_path - cp $harbor_path/$harbor_name $target_path/ + if [ -f $harbor_path/$harbor_name ];then + cp $harbor_path/$harbor_name $target_path/ + fi - name: Binary | Ensure keepalived binary is present tags: ["image_registry"] @@ -173,4 +203,6 @@ artifact_path={{ .binary_dir }}/image-registry/keepalived/{{ .keepalived_version }}/{{ .item }} target_path={{ .artifact_file_dir }}/kubekey/kubekey/image-registry/keepalived/{{ .keepalived_version }}/{{ .item }} mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi diff --git a/builtin/core/roles/copy/tasks/helm.yaml b/builtin/core/roles/copy/tasks/helm.yaml index 11878fe5..7ba5812b 100644 --- a/builtin/core/roles/copy/tasks/helm.yaml +++ b/builtin/core/roles/copy/tasks/helm.yaml @@ -8,7 +8,9 @@ artifact_path={{ .binary_dir }}/cni/calico target_path={{ .artifact_file_dir }}/kubekey/kubekey/cni/calico mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Helm | Ensure the Cilium binary is available when: @@ -19,7 +21,9 @@ artifact_path={{ .binary_dir }}/cni/cilium target_path={{ .artifact_file_dir }}/kubekey/kubekey/cni/cilium mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Helm | Ensure the Flannel binary is available when: @@ -30,7 +34,9 @@ artifact_path={{ .binary_dir }}/cni/flannel target_path={{ .artifact_file_dir }}/kubekey/kubekey/cni/flannel mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Helm | Ensure the Kube-OVN binary is available when: @@ -41,7 +47,9 @@ artifact_path={{ .binary_dir }}/cni/kubeovn target_path={{ .artifact_file_dir }}/kubekey/kubekey/cni/kubeovn mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Helm | Ensure the Hybridnet binary is available when: @@ -52,7 +60,9 @@ artifact_path={{ .binary_dir }}/cni/hybridnet target_path={{ .artifact_file_dir }}/kubekey/kubekey/cni/hybridnet mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi - name: Helm | Ensure the NFS Provisioner binary is available when: @@ -63,4 +73,6 @@ artifact_path={{ .binary_dir }}/sc target_path={{ .artifact_file_dir }}/kubekey/kubekey/sc mkdir -p $target_path - cp $artifact_path/$artifact_name $target_path/ + if [ -f $artifact_path/$artifact_name ];then + cp $artifact_path/$artifact_name $target_path/ + fi diff --git a/builtin/core/roles/copy/tasks/iso.yaml b/builtin/core/roles/copy/tasks/iso.yaml index 9d1143cb..94df4364 100644 --- a/builtin/core/roles/copy/tasks/iso.yaml +++ b/builtin/core/roles/copy/tasks/iso.yaml @@ -7,4 +7,6 @@ if [ ! -f {{ .artifact_file_dir }}/kubekey/kubekey/repository/ ];then mkdir -p {{ .artifact_file_dir }}/kubekey/kubekey/repository/ fi - cp $iso_path {{ .artifact_file_dir }}/kubekey/kubekey/repository/ \ No newline at end of file + if [ -f $iso_path ];then + cp $iso_path {{ .artifact_file_dir }}/kubekey/kubekey/repository/ + fi \ No newline at end of file diff --git a/builtin/core/roles/download/tasks/binary.yaml b/builtin/core/roles/download/tasks/binary.yaml index 768732ad..452afd95 100644 --- a/builtin/core/roles/download/tasks/binary.yaml +++ b/builtin/core/roles/download/tasks/binary.yaml @@ -8,6 +8,11 @@ command: | artifact_name={{ get .download.artifact_url.etcd .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/etcd/{{ .etcd.etcd_version }}/{{ .item }} + url={{ get .download.artifact_url.etcd .item | trim }} + if [ "$url" = "" ] ; then + echo "url for etcd ({{ .item }}) not set" + exit 0 + fi if [ ! -f $artifact_path/$artifact_name ]; then mkdir -p $artifact_path # Attempt to download etcd binary @@ -26,6 +31,11 @@ command: | kube_path={{ .binary_dir }}/kube/{{ .kubernetes.kube_version }}/{{ .item }} if [ ! -f $kube_path/kubelet ]; then + url={{ get .download.artifact_url.kubelet .item | trim }} + if [ "$url" = "" ] ; then + echo "url for kubelet ({{ .item }}) not set" + exit 0 + fi mkdir -p $kube_path # Download kubelet if missing http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.kubelet .item }}) @@ -36,6 +46,11 @@ curl -L -o $kube_path/kubelet {{ get .download.artifact_url.kubelet .item }} fi if [ ! -f $kube_path/kubeadm ]; then + url={{ get .download.artifact_url.kubeadm .item | trim }} + if [ "$url" = "" ] ; then + echo "url for kubeadm ({{ .item }}) not set" + exit 0 + fi mkdir -p $kube_path # Download kubeadm if missing http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.kubeadm .item }}) @@ -46,6 +61,11 @@ curl -L -o $kube_path/kubeadm {{ get .download.artifact_url.kubeadm .item }} fi if [ ! -f $kube_path/kubectl ]; then + url={{ get .download.artifact_url.kubectl .item | trim }} + if [ "$url" = "" ] ; then + echo "url for kubectl ({{ .item }}) not set" + exit 0 + fi mkdir -p $kube_path # Download kubectl if missing http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.kubectl .item }}) @@ -59,11 +79,17 @@ - name: Binary | Ensure CNI plugins are present tags: ["kubernetes"] loop: "{{ .download.arch | toJson }}" - when: .cni.cni_plugins_version | empty | not + when: + - .cni.cni_plugins_version | empty | not command: | artifact_name={{ get .download.artifact_url.cni_plugins .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/cni/plugins/{{ .cni.cni_plugins_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.cni_plugins .item | trim }} + if [ "$url" = "" ] ; then + echo "url for cni_plugins ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download CNI plugins http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.cni_plugins .item }}) @@ -77,11 +103,17 @@ - name: Binary | Ensure Helm binary is present tags: ["kubernetes"] loop: "{{ .download.arch | toJson }}" - when: .kubernetes.helm_version | empty | not + when: + - .kubernetes.helm_version | empty | not command: | artifact_name={{ get .download.artifact_url.helm .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/helm/{{ .kubernetes.helm_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.helm .item | trim }} + if [ "$url" = "" ] ; then + echo "url for helm ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download Helm binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.helm .item }}) @@ -95,11 +127,17 @@ - name: Binary | Ensure crictl binary is present tags: ["kubernetes"] loop: "{{ .download.arch | toJson }}" - when: .cri.crictl_version | empty | not + when: + - .cri.crictl_version | empty | not command: | artifact_name={{ get .download.artifact_url.crictl .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/crictl/{{ .cri.crictl_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.crictl .item | trim }} + if [ "$url" = "" ] ; then + echo "url for crictl ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download crictl binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.crictl .item }}) @@ -120,6 +158,11 @@ artifact_name={{ get .download.artifact_url.docker .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/docker/{{ .cri.docker_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.docker .item | trim }} + if [ "$url" = "" ] ; then + echo "url for docker ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download Docker binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.docker .item }}) @@ -141,6 +184,11 @@ artifact_name={{ get .download.artifact_url.cridockerd .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/cri-dockerd/{{ .cri.cridockerd_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.cridockerd .item | trim }} + if [ "$url" = "" ] ; then + echo "url for cridockerd ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download cri-dockerd binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.cridockerd .item }}) @@ -161,6 +209,11 @@ artifact_name={{ get .download.artifact_url.containerd .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/containerd/{{ .cri.containerd_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.containerd .item | trim }} + if [ "$url" = "" ] ; then + echo "url for containerd ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download containerd binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.containerd .item }}) @@ -181,6 +234,11 @@ artifact_name={{ get .download.artifact_url.runc .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/runc/{{ .cri.runc_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.runc .item | trim }} + if [ "$url" = "" ] ; then + echo "url for runc ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download runc binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.runc .item }}) @@ -201,6 +259,11 @@ artifact_name=calicoctl artifact_path={{ .binary_dir }}/cni/calico/{{ .cni.calico_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.calicoctl .item | trim }} + if [ "$url" = "" ] ; then + echo "url for calicoctl ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download calicoctl binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.calicoctl .item }}) @@ -221,6 +284,11 @@ artifact_name={{ get .download.artifact_url.docker_registry .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/image-registry/docker-registry/{{ .image_registry.docker_registry_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.docker_registry .item | trim }} + if [ "$url" = "" ] ; then + echo "url for docker_registry ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download Docker Registry binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.docker_registry .item }}) @@ -241,6 +309,11 @@ compose_name=docker-compose compose_path={{ .binary_dir }}/image-registry/docker-compose/{{ .cri.dockercompose_version }}/{{ .item }} if [ ! -f $compose_path/$compose_name ]; then + url={{ get .download.artifact_url.dockercompose .item | trim }} + if [ "$url" = "" ] ; then + echo "url for dockercompose ({{ .item }}) not set" + exit 0 + fi mkdir -p $compose_path # Attempt to download docker-compose binary curl -L -o $compose_path/$compose_name {{ get .download.artifact_url.dockercompose .item }} @@ -256,6 +329,11 @@ harbor_name={{ get .download.artifact_url.harbor .item | splitList "/" | last }} harbor_path={{ .binary_dir }}/image-registry/harbor/{{ .image_registry.harbor_version }}/{{ .item }} if [ ! -f $harbor_path/$harbor_name ]; then + url={{ get .download.artifact_url.harbor .item | trim }} + if [ "$url" = "" ] ; then + echo "url for harbor ({{ .item }}) not set" + exit 0 + fi mkdir -p $harbor_path # Attempt to download Harbor binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.harbor .item }}) @@ -277,6 +355,11 @@ artifact_name={{ get .download.artifact_url.keepalived .item | splitList "/" | last }} artifact_path={{ .binary_dir }}/image-registry/keepalived/{{ .keepalived_version }}/{{ .item }} if [ ! -f $artifact_path/$artifact_name ]; then + url={{ get .download.artifact_url.keepalived .item | trim }} + if [ "$url" = "" ] ; then + echo "url for keepalived ({{ .item }}) not set" + exit 0 + fi mkdir -p $artifact_path # Attempt to download keepalived binary http_code=$(curl -Lo /dev/null -s -w "%{http_code}" {{ get .download.artifact_url.keepalived .item }}) diff --git a/builtin/core/roles/download/tasks/helm.yaml b/builtin/core/roles/download/tasks/helm.yaml index 29155e27..5e3a825a 100644 --- a/builtin/core/roles/download/tasks/helm.yaml +++ b/builtin/core/roles/download/tasks/helm.yaml @@ -7,6 +7,11 @@ artifact_name={{ .download.artifact_url.calico | splitList "/" | last }} artifact_path={{ .binary_dir }}/cni/calico if [ ! -f $artifact_path/$artifact_name ]; then + url={{ .download.artifact_url.calico | trim }} + if [ "$url" = "" ] ; then + echo "url for calico not set" + exit 0 + fi mkdir -p $artifact_path # Download the Calico binary if it does not exist curl -Lo $artifact_path/$artifact_name {{ .download.artifact_url.calico }} @@ -20,6 +25,11 @@ artifact_name={{ .download.artifact_url.cilium | splitList "/" | last }} artifact_path={{ .binary_dir }}/cni/cilium if [ ! -f $artifact_path/$artifact_name ]; then + url={{ .download.artifact_url.cilium | trim }} + if [ "$url" = "" ] ; then + echo "url for cilium not set" + exit 0 + fi mkdir -p $artifact_path # Download the Cilium binary if it does not exist curl -Lo $artifact_path/$artifact_name {{ .download.artifact_url.cilium }} @@ -33,6 +43,11 @@ artifact_name={{ .download.artifact_url.flannel | splitList "/" | last }} artifact_path={{ .binary_dir }}/cni/flannel if [ ! -f $artifact_path/$artifact_name ]; then + url={{ .download.artifact_url.flannel | trim }} + if [ "$url" = "" ] ; then + echo "url for flannel not set" + exit 0 + fi mkdir -p $artifact_path # Download the Flannel binary if it does not exist curl -Lo $artifact_path/$artifact_name {{ .download.artifact_url.flannel }} @@ -46,6 +61,11 @@ artifact_name={{ .download.artifact_url.kubeovn | splitList "/" | last }} artifact_path={{ .binary_dir }}/cni/kubeovn if [ ! -f $artifact_path/$artifact_name ]; then + url={{ .download.artifact_url.kubeovn | trim }} + if [ "$url" = "" ] ; then + echo "url for kubeovn not set" + exit 0 + fi mkdir -p $artifact_path # Download the Kube-OVN binary if it does not exist curl -Lo $artifact_path/$artifact_name {{ .download.artifact_url.kubeovn }} @@ -59,6 +79,11 @@ artifact_name={{ .download.artifact_url.hybridnet | splitList "/" | last }} artifact_path={{ .binary_dir }}/cni/hybridnet if [ ! -f $artifact_path/$artifact_name ]; then + url={{ .download.artifact_url.hybridnet | trim }} + if [ "$url" = "" ] ; then + echo "url for hybridnet not set" + exit 0 + fi mkdir -p $artifact_path # Download the Hybridnet binary if it does not exist curl -Lo $artifact_path/$artifact_name {{ .download.artifact_url.hybridnet }} @@ -72,6 +97,11 @@ artifact_name={{ .download.artifact_url.nfs_provisioner | splitList "/" | last }} artifact_path={{ .binary_dir }}/sc if [ ! -f $artifact_path/$artifact_name ]; then + url={{ .download.artifact_url.nfs_provisioner | trim }} + if [ "$url" = "" ] ; then + echo "url for nfs_provisioner not set" + exit 0 + fi mkdir -p $artifact_path # Download the NFS Provisioner binary if it does not exist curl -Lo $artifact_path/$artifact_name {{ .download.artifact_url.nfs_provisioner }}