Modified fromNativeToPlatform.sh - form kube-flannel.yml only for supported images
This commit is contained in:
parent
5b8be5461c
commit
76a0510579
@ -1,10 +1,33 @@
|
||||
|
||||
function getFlannelDirs() {
|
||||
platform=$1
|
||||
export U7S_PLATFORM="k8s-$platform"
|
||||
tags=$(curl https://registry.altlinux.org/v2/$U7S_PLATFORM/flannel/tags/list | jq -r '.tags|sort|.[]' | grep -e '^v.*') 2>/dev/null
|
||||
ifs=$IFS
|
||||
dirs=''
|
||||
for tag in $tags
|
||||
do
|
||||
IFS=.
|
||||
set -- $tag
|
||||
major=${1:1:1}
|
||||
minor=$2
|
||||
patch=$3
|
||||
dir="$major/$minor/$patch"
|
||||
dirs+=" $dir"
|
||||
done
|
||||
echo $dirs
|
||||
}
|
||||
|
||||
|
||||
|
||||
platform=$(basename $1)
|
||||
dirs=$(getFlannelDirs $platform)
|
||||
|
||||
cd native
|
||||
for f in */*/*/kube-flannel.yml
|
||||
for dir in $dirs
|
||||
do
|
||||
dir=$(dirname $f)
|
||||
echo $dir
|
||||
f="$dir/kube-flannel.yml"
|
||||
mkdir -p ../$platform/$dir
|
||||
../fromNativeToRegistry.sh registry.altlinux.org $platform $f > ../$platform/$dir/kube-flannel.yml
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user