Skip to content

Commit

Permalink
Drop k8s <= v1.20.x (#643)
Browse files Browse the repository at this point in the history
* Bump latest versions of k8s and occm:

k8s:
* v1.28.1 -> v1.28.3
* v1.27.5 -> v1.27.7
* v1.26.8 -> v1.26.10
* v1.25.13 -> v1.25.15
Drop versions v1.19.x and v1.18.x

occm/csi:
* v1.28.0 -> v1.28.1
* v1.27.2 -> v1.27.3
* v1.26.3 -> v1.26.4
Also drop stuff prior to v1.20.

Signed-off-by: Kurt Garloff <[email protected]>

* Drop also v1.20.x

Signed-off-by: Roman Hros <[email protected]>

* Remove 'min_snapshot_master' logic

Always download 'master'

Signed-off-by: Roman Hros <[email protected]>

---------

Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Roman Hros <[email protected]>
Co-authored-by: Roman Hros <[email protected]>
  • Loading branch information
garloff and chess-knight authored Jan 29, 2024
1 parent 5b7e1f9 commit eac1608
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 452 deletions.
45 changes: 21 additions & 24 deletions terraform/files/bin/apply_cindercsi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,29 @@ else
fi
echo "# Install Cinder CSI persistent storage support $CCSI_VERSION to $CLUSTER_NAME"

if test -n "$SNAP_VERSION"; then
# deploy snapshot CRDs
for name in snapshot.storage.k8s.io_volumesnapshotcontents.yaml snapshot.storage.k8s.io_volumesnapshotclasses.yaml snapshot.storage.k8s.io_volumesnapshots.yaml; do
NAME=${name%.yaml}-$SNAP_VERSION.yaml
if ! test -s $NAME; then
curl -L https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$SNAP_VERSION/client/config/crd/$name -o $NAME
echo -e "\n---" >> $NAME
fi
done
# FIXME: Should we ignore non-working snapshots?
cat snapshot.storage.k8s.io_volumesnapshot* > cindercsi-snapshot-$SNAP_VERSION.yaml
SNAP_VERSION="master"
# deploy snapshot CRDs
for name in snapshot.storage.k8s.io_volumesnapshotcontents.yaml snapshot.storage.k8s.io_volumesnapshotclasses.yaml snapshot.storage.k8s.io_volumesnapshots.yaml; do
NAME=${name%.yaml}-$SNAP_VERSION.yaml
if ! test -s $NAME; then
curl -L https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$SNAP_VERSION/client/config/crd/$name -o $NAME
echo -e "\n---" >> $NAME
fi
done
# FIXME: Should we ignore non-working snapshots?
cat snapshot.storage.k8s.io_volumesnapshot* > cindercsi-snapshot-$SNAP_VERSION.yaml

# deploy snapshot controller
for name in rbac-snapshot-controller.yaml setup-snapshot-controller.yaml; do
NAME=${name%.yaml}-$SNAP_VERSION.yaml
if ! test -s $NAME; then
curl -L https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$SNAP_VERSION/deploy/kubernetes/snapshot-controller/$name -o $NAME
echo -e "\n---" >> $NAME
fi
cat $NAME >> cindercsi-snapshot-$SNAP_VERSION.yaml
done
# deploy snapshot controller
for name in rbac-snapshot-controller.yaml setup-snapshot-controller.yaml; do
NAME=${name%.yaml}-$SNAP_VERSION.yaml
if ! test -s $NAME; then
curl -L https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$SNAP_VERSION/deploy/kubernetes/snapshot-controller/$name -o $NAME
echo -e "\n---" >> $NAME
fi
cat $NAME >> cindercsi-snapshot-$SNAP_VERSION.yaml
done

cp -p cindercsi-snapshot-$SNAP_VERSION.yaml ~/${CLUSTER_NAME}/deployed-manifests.d/cindercsi-snapshot.yaml
else
cp -p external-snapshot-crds.yaml ~/$CLUSTER_NAME/deployed-manifests.d/cindercsi-snapshot.yaml
fi
cp -p cindercsi-snapshot-$SNAP_VERSION.yaml ~/${CLUSTER_NAME}/deployed-manifests.d/cindercsi-snapshot.yaml

if test -n "$CCSI_VERSION"; then
# Now get cinder
Expand Down
14 changes: 6 additions & 8 deletions terraform/files/bin/openstack-kube-versions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# (c) Kurt Garloff <[email protected]>, 3/2022
# SPDX-License-Identifier: Apache-2.0
# Images from https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-k8s-capi-images
k8s_versions=("v1.18.20" "v1.19.16" "v1.20.15" "v1.21.14" "v1.22.17" "v1.23.16" "v1.24.15" "v1.25.15" "v1.26.11" "v1.27.8" "v1.28.4")
k8s_versions=("v1.21.14" "v1.22.17" "v1.23.16" "v1.24.15" "v1.25.15" "v1.26.11" "v1.27.8" "v1.28.4")
# OCCM, CCM-RBAC, Cinder CSI, Cinder-Snapshot (TODO: Manila CSI)
occm_versions=("" "" "v1.21.1" "v1.21.1" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")
#ccmr_versions=("" "" "" "" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")
ccmr_versions=("" "" "v1.22.2" "v1.22.2" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")
ccsi_versions=("" "" "v1.20.5" "v1.21.1" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")
min_snapshot_master="v1.21.0"
occm_versions=("v1.21.1" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")
#ccmr_versions=("" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")
ccmr_versions=("v1.22.2" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")
ccsi_versions=("v1.21.1" "v1.22.2" "v1.23.4" "v1.24.6" "v1.25.6" "v1.26.4" "v1.27.3" "v1.28.1")

# Versions that require a --allow-preview-versions flag
techprev_versions=("v1.28" "v2")

Expand Down Expand Up @@ -83,8 +83,6 @@ find_openstack_versions()
NUMV=${#k8s_versions[*]}
k8min=$(dotversion ${k8s_versions[0]%.*})
k8max=$(dotversion ${k8s_versions[$((NUMV-1))]%.*})
snapmaster=$(dotversion $min_snapshot_master)
if test $k8vers -lt $snapmaster; then SNAP_VERSION=""; else SNAP_VERSION="master"; fi
#echo "$k8vers $k8min $k8max"
if test $k8vers -lt $k8min; then setversions 0; return 0; fi
if test $k8vers -gt $((k8max+99)); then setversions $((NUMV-1)); return 0; fi
Expand Down
Loading

0 comments on commit eac1608

Please sign in to comment.