Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
d79ada93
Unverified
Commit
d79ada93
authored
1 year ago
by
Victor Morales
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Update download hash bash script (#10120)
parent
b2f6abe4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/download_hash.sh
+20
-3
20 additions, 3 deletions
scripts/download_hash.sh
with
20 additions
and
3 deletions
scripts/download_hash.sh
+
20
−
3
View file @
d79ada93
...
@@ -159,6 +159,23 @@ function get_containerd_archive_checksums {
...
@@ -159,6 +159,23 @@ function get_containerd_archive_checksums {
done
done
}
}
function
get_k8s_checksums
{
local
binary
=
$1
echo
"
${
binary
}
_checksums:"
|
tee
--append
"
$checksums_file
"
echo
" arm:"
|
tee
--append
"
$checksums_file
"
for
version
in
"
${
@
:2
}
"
;
do
_vercmp
"
${
version
#v
}
"
'<'
"1.27"
&&
checksum
=
$(
_get_checksum
"
$binary
"
"
$version
"
"
$arch
"
)
||
checksum
=
0
echo
"
${
version
#v
}
:
$checksum
"
|
tee
--append
"
$checksums_file
"
done
for
arch
in
arm64 amd64 ppc64le
;
do
echo
"
$arch
:"
|
tee
--append
"
$checksums_file
"
for
version
in
"
${
@
:2
}
"
;
do
echo
"
${
version
#v
}
:
$(
_get_checksum
"
$binary
"
"
$version
"
"
$arch
"
)
"
|
tee
--append
"
$checksums_file
"
done
done
}
function
_get_checksum
{
function
_get_checksum
{
local
binary
=
"
$1
"
local
binary
=
"
$1
"
local
version
=
"
$2
"
local
version
=
"
$2
"
...
@@ -175,7 +192,7 @@ function _get_checksum {
...
@@ -175,7 +192,7 @@ function _get_checksum {
# Download URLs
# Download URLs
declare
-A
urls
=(
declare
-A
urls
=(
[
"crictl"
]=
"
$(
printf
"
$github_releases_url
"
"kubernetes-sigs/cri-tools"
"crictl-
$version
-
$os
-
$arch
.tar.gz"
)
"
[
"crictl"
]=
"
$(
printf
"
$github_releases_url
"
"kubernetes-sigs/cri-tools"
"crictl-
$version
-
$os
-
$arch
.tar.gz"
)
"
[
"crio_archive"
]=
"
$
(
printf
"
$github_releases
_url
"
"
cri-o/
cri-o"
"
cri-o.
$arch
.
$version
.tar.gz"
)
"
[
"crio_archive"
]=
"
$
google
_url
/
cri-o/
artifacts/
cri-o.
$arch
.
$version
.tar.gz"
[
"kubelet"
]=
"
$(
printf
"
$k8s_url
"
"kubelet"
)
"
[
"kubelet"
]=
"
$(
printf
"
$k8s_url
"
"kubelet"
)
"
[
"kubectl"
]=
"
$(
printf
"
$k8s_url
"
"kubectl"
)
"
[
"kubectl"
]=
"
$(
printf
"
$k8s_url
"
"kubectl"
)
"
[
"kubeadm"
]=
"
$(
printf
"
$k8s_url
"
"kubeadm"
)
"
[
"kubeadm"
]=
"
$(
printf
"
$k8s_url
"
"kubeadm"
)
"
...
@@ -212,9 +229,9 @@ function main {
...
@@ -212,9 +229,9 @@ function main {
kubernetes_versions
=
$(
get_versions github_tags kubernetes/kubernetes 20
)
kubernetes_versions
=
$(
get_versions github_tags kubernetes/kubernetes 20
)
echo
"# Checksum"
|
tee
--append
"
$checksums_file
"
echo
"# Checksum"
|
tee
--append
"
$checksums_file
"
echo
"# Kubernetes versions above Kubespray's current target version are untested and should be used with caution."
|
tee
--append
"
$checksums_file
"
echo
"# Kubernetes versions above Kubespray's current target version are untested and should be used with caution."
|
tee
--append
"
$checksums_file
"
get_checksums kubelet
$kubernetes_versions
get_
k8s_
checksums kubelet
$kubernetes_versions
get_checksums kubectl
$kubernetes_versions
get_checksums kubectl
$kubernetes_versions
get_checksums kubeadm
$kubernetes_versions
get_
k8s_
checksums kubeadm
$kubernetes_versions
get_checksums etcd_binary
$(
get_versions github_tags etcd-io/etcd
)
get_checksums etcd_binary
$(
get_versions github_tags etcd-io/etcd
)
get_checksums cni_binary
$(
get_versions github_tags containernetworking/plugins
)
get_checksums cni_binary
$(
get_versions github_tags containernetworking/plugins
)
calico_versions
=
$(
get_versions github_tags projectcalico/calico 20
)
calico_versions
=
$(
get_versions github_tags projectcalico/calico 20
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment