mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
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 <xuesongzuo@yunify.com>
109 lines
3.9 KiB
YAML
109 lines
3.9 KiB
YAML
---
|
|
- name: Helm | Ensure the Calico binary is available
|
|
when:
|
|
- .cni.calico_version | empty | not
|
|
- .cni.type | eq "calico"
|
|
command: |
|
|
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 }}
|
|
fi
|
|
|
|
- name: Helm | Ensure the Cilium binary is available
|
|
when:
|
|
- .cni.cilium_version | empty | not
|
|
- .cni.type | eq "cilium"
|
|
command: |
|
|
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 }}
|
|
fi
|
|
|
|
- name: Helm | Ensure the Flannel binary is available
|
|
when:
|
|
- .cni.flannel_version | empty | not
|
|
- .cni.type | eq "flannel"
|
|
command: |
|
|
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 }}
|
|
fi
|
|
|
|
- name: Helm | Ensure the Kube-OVN binary is available
|
|
when:
|
|
- .kubeovn_version | empty | not
|
|
- .cni.type | eq "kubeovn"
|
|
command: |
|
|
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 }}
|
|
fi
|
|
|
|
- name: Helm | Ensure the Hybridnet binary is available
|
|
when:
|
|
- .cni.hybridnet_version | empty | not
|
|
- .cni.type | eq "hybridnet"
|
|
command: |
|
|
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 }}
|
|
fi
|
|
|
|
- name: Helm | Ensure the NFS Provisioner binary is available
|
|
when:
|
|
- .storage_class.nfs_provisioner_version | empty | not
|
|
- .storage_class.nfs.enabled
|
|
command: |
|
|
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 }}
|
|
fi
|