Add kube-vip check to check_readme_versions.sh (#9155)

To check the kube-vip version between readme.md and the default value
on the role, this updates check_readme_versions.sh
pull/9160/head
Kenichi Omichi 2022-08-06 08:26:20 -07:00 committed by GitHub
parent 0d3bd69a17
commit 7e862939db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -e set -e
TARGET_COMPONENTS="containerd calico cilium flannel kube-ovn kube-router weave cert-manager krew helm metallb registry cephfs-provisioner rbd-provisioner aws-ebs-csi-plugin azure-csi-plugin cinder-csi-plugin gcp-pd-csi-plugin local-path-provisioner local-volume-provisioner" TARGET_COMPONENTS="containerd calico cilium flannel kube-ovn kube-router weave cert-manager krew helm metallb registry cephfs-provisioner rbd-provisioner aws-ebs-csi-plugin azure-csi-plugin cinder-csi-plugin gcp-pd-csi-plugin local-path-provisioner local-volume-provisioner kube-vip"
# cd to the root directory of kubespray # cd to the root directory of kubespray
cd $(dirname $0)/../../ cd $(dirname $0)/../../
@ -18,6 +18,9 @@ fi
for component in $(echo ${TARGET_COMPONENTS}); do for component in $(echo ${TARGET_COMPONENTS}); do
echo checking ${component}.. echo checking ${component}..
version_from_default=$(grep "^$(echo ${component} | sed s/"-"/"_"/g)_version:" ./roles/download/defaults/main.yml | awk '{print $2}' | sed s/\"//g | sed s/^v//) version_from_default=$(grep "^$(echo ${component} | sed s/"-"/"_"/g)_version:" ./roles/download/defaults/main.yml | awk '{print $2}' | sed s/\"//g | sed s/^v//)
if [ "${version_from_default}" = "" ]; then
version_from_default=$(grep "^$(echo ${component} | sed s/"-"/"_"/g)_version:" ./roles/kubernetes/node/defaults/main.yml | awk '{print $2}' | sed s/\"//g | sed s/^v//)
fi
version_from_readme=$(grep "\[${component}\]" ./README.md | grep "https" | awk '{print $3}' | sed s/^v//) version_from_readme=$(grep "\[${component}\]" ./README.md | grep "https" | awk '{print $3}' | sed s/^v//)
if [ "${version_from_default}" != "${version_from_readme}" ]; then if [ "${version_from_default}" != "${version_from_readme}" ]; then
echo "The version of ${component} is different between main.yml(${version_from_default}) and README.md(${version_from_readme})." echo "The version of ${component} is different between main.yml(${version_from_default}) and README.md(${version_from_readme})."