From 7e862939dbbc933cb13a67a388c0ab430fa3547d Mon Sep 17 00:00:00 2001 From: Kenichi Omichi Date: Sat, 6 Aug 2022 08:26:20 -0700 Subject: [PATCH] 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 --- tests/scripts/check_readme_versions.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/scripts/check_readme_versions.sh b/tests/scripts/check_readme_versions.sh index a117a5607..f6089fe42 100755 --- a/tests/scripts/check_readme_versions.sh +++ b/tests/scripts/check_readme_versions.sh @@ -1,7 +1,7 @@ #!/bin/bash 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 $(dirname $0)/../../ @@ -18,6 +18,9 @@ fi for component in $(echo ${TARGET_COMPONENTS}); do 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//) + 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//) 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})."