From 7414409aa0039dbc93aa913776a23ace5b82bab6 Mon Sep 17 00:00:00 2001 From: Kenichi Omichi Date: Tue, 5 Jul 2022 08:02:47 -0700 Subject: [PATCH] Add target components on check_readme_versions.sh (#9045) This adds target components on check_readme_versions.sh after merging https://github.com/kubernetes-sigs/kubespray/pull/9044 In addition, this fixes typo on check_readme_versions.sh This adds `foo_version` variables for some components because check_readme_versions.sh verifies the corresponding version for `_version` from main.yml. This change also makes consistency in the main.yml. In long-term, we will be able to remove the existing `foo_image_tag` variables, but that is not now for backwards compatibility for users. --- README.md | 8 ++++---- roles/download/defaults/main.yml | 27 +++++++++++++++++--------- tests/scripts/check_readme_versions.sh | 8 ++++---- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index d42c3382c..4c2c1b52d 100644 --- a/README.md +++ b/README.md @@ -161,10 +161,10 @@ Note: Upstart/SysV init based OS types are not supported. - Storage Plugin - [cephfs-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.0-k8s1.11 - [rbd-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.1-k8s1.11 - - [aws-ebs-csi](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) v0.5.0 - - [azuredisk-csi](https://github.com/kubernetes-sigs/azuredisk-csi-driver) v1.10.0 - - [cinder-csi](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md) v1.22.0 - - [gcp-pd-csi](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) v0.7.0-gke.0 + - [aws-ebs-csi-plugin](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) v0.5.0 + - [azure-csi-plugin](https://github.com/kubernetes-sigs/azuredisk-csi-driver) v1.10.0 + - [cinder-csi-plugin](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md) v1.22.0 + - [gcp-pd-csi-plugin](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) v1.4.0 - [local-path-provisioner](https://github.com/rancher/local-path-provisioner) v0.0.21 - [local-volume-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) v2.4.0 diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index 1ba84dc40..7d35e47e6 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -874,19 +874,24 @@ dnsautoscaler_version: 1.8.5 dnsautoscaler_image_repo: "{{ kube_image_repo }}/cpa/cluster-proportional-autoscaler-{{ image_arch }}" dnsautoscaler_image_tag: "{{ dnsautoscaler_version }}" +registry_version: "2.7.1" registry_image_repo: "{{ docker_image_repo }}/library/registry" -registry_image_tag: "2.7.1" +registry_image_tag: "{{ registry_version }}" metrics_server_version: "v0.6.1" metrics_server_image_repo: "{{ kube_image_repo }}/metrics-server/metrics-server" metrics_server_image_tag: "{{ metrics_server_version }}" +local_volume_provisioner_version: "v2.4.0" local_volume_provisioner_image_repo: "{{ kube_image_repo }}/sig-storage/local-volume-provisioner" -local_volume_provisioner_image_tag: "v2.4.0" +local_volume_provisioner_image_tag: "{{ local_volume_provisioner_version }}" +cephfs_provisioner_version: "v2.1.0-k8s1.11" cephfs_provisioner_image_repo: "{{ quay_image_repo }}/external_storage/cephfs-provisioner" -cephfs_provisioner_image_tag: "v2.1.0-k8s1.11" +cephfs_provisioner_image_tag: "{{ cephfs_provisioner_version }}" +rbd_provisioner_version: "v2.1.1-k8s1.11" rbd_provisioner_image_repo: "{{ quay_image_repo }}/external_storage/rbd-provisioner" -rbd_provisioner_image_tag: "v2.1.1-k8s1.11" +rbd_provisioner_image_tag: "{{ rbd_provisioner_version }}" +local_path_provisioner_version: "v0.0.21" local_path_provisioner_image_repo: "{{ docker_image_repo }}/rancher/local-path-provisioner" -local_path_provisioner_image_tag: "v0.0.21" +local_path_provisioner_image_tag: "{{ local_path_provisioner_version }}" ingress_nginx_controller_image_repo: "{{ kube_image_repo }}/ingress-nginx/controller" ingress_nginx_controller_image_tag: "v1.2.1" ingress_nginx_kube_webhook_certgen_imae_repo: "{{ kube_image_repo }}/ingress-nginx/kube-webhook-certgen" @@ -921,14 +926,17 @@ snapshot_controller_supported_versions: snapshot_controller_image_repo: "{{ kube_image_repo }}/sig-storage/snapshot-controller" snapshot_controller_image_tag: "{{ snapshot_controller_supported_versions[kube_major_version] }}" +cinder_csi_plugin_version: "v1.22.0" cinder_csi_plugin_image_repo: "{{ docker_image_repo }}/k8scloudprovider/cinder-csi-plugin" -cinder_csi_plugin_image_tag: "v1.22.0" +cinder_csi_plugin_image_tag: "{{ cinder_csi_plugin_version }}" +aws_ebs_csi_plugin_version: "v0.5.0" aws_ebs_csi_plugin_image_repo: "{{ docker_image_repo }}/amazon/aws-ebs-csi-driver" -aws_ebs_csi_plugin_image_tag: "v0.5.0" +aws_ebs_csi_plugin_image_tag: "{{ aws_ebs_csi_plugin_version }}" +gcp_pd_csi_plugin_version: "v1.4.0" gcp_pd_csi_plugin_image_repo: "{{ kube_image_repo }}/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver" -gcp_pd_csi_plugin_image_tag: "v1.4.0" +gcp_pd_csi_plugin_image_tag: "{{ gcp_pd_csi_plugin_version }}" azure_csi_image_repo: "mcr.microsoft.com/oss/kubernetes-csi" azure_csi_provisioner_image_tag: "v2.2.2" @@ -937,8 +945,9 @@ azure_csi_resizer_image_tag: "v1.3.0" azure_csi_livenessprobe_image_tag: "v2.5.0" azure_csi_node_registrar_image_tag: "v2.4.0" azure_csi_snapshotter_image_tag: "v3.0.3" +azure_csi_plugin_version: "v1.10.0" azure_csi_plugin_image_repo: "mcr.microsoft.com/k8s/csi" -azure_csi_plugin_image_tag: "v1.10.0" +azure_csi_plugin_image_tag: "{{ azure_csi_plugin_version }}" gcp_pd_csi_image_repo: "gke.gcr.io" gcp_pd_csi_driver_image_tag: "v0.7.0-gke.0" diff --git a/tests/scripts/check_readme_versions.sh b/tests/scripts/check_readme_versions.sh index ec18ffd18..a117a5607 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" +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" # cd to the root directory of kubespray cd $(dirname $0)/../../ @@ -11,17 +11,17 @@ version_from_default=$(grep "^kube_version:" ./roles/kubespray-defaults/defaults version_from_readme=$(grep " \[kubernetes\]" ./README.md | awk '{print $3}') if [ "${version_from_default}" != "${version_from_readme}" ]; then echo "The version of kubernetes is different between main.yml(${version_from_default}) and README.md(${version_from_readme})." - echo "If the pull request updates kubernetes version, please updates README.md also." + echo "If the pull request updates kubernetes version, please update README.md also." exit 1 fi for component in $(echo ${TARGET_COMPONENTS}); do echo checking ${component}.. - version_from_default=$(grep "^$(echo ${component} | sed s/"-"/"_"/)_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//) 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})." - echo "If the pull request updates ${component} version, please updates README.md also." + echo "If the pull request updates ${component} version, please update README.md also." exit 1 fi done