mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Update versions in README.md with pre-commit
Currently, versions in README.md need to be manually updated, and we check it's done with a bash script. Add a small utility playbook to add versions in README.md from their actual default values, automatically. This is done in pre-commit, and replace the scripted check ; instead it will autofix the README.md, and fails in CI if needed. We switch markdownlint behind the local hooks to gave it the opportunity to catch a problem with the rendering.
This commit is contained in:
35
scripts/readme_versions.md.j2
Normal file
35
scripts/readme_versions.md.j2
Normal file
@@ -0,0 +1,35 @@
|
||||
- Core
|
||||
- [kubernetes](https://github.com/kubernetes/kubernetes) {{ kube_version }}
|
||||
- [etcd](https://github.com/etcd-io/etcd) {{ etcd_version }}
|
||||
- [docker](https://www.docker.com/) v{{ docker_version }}
|
||||
- [containerd](https://containerd.io/) v{{ containerd_version }}
|
||||
- [cri-o](http://cri-o.io/) {{ crio_version }} (experimental: see [CRI-O Note](docs/CRI/cri-o.md). Only on fedora, ubuntu and centos based OS)
|
||||
- Network Plugin
|
||||
- [cni-plugins](https://github.com/containernetworking/plugins) {{ cni_version }}
|
||||
- [calico](https://github.com/projectcalico/calico) {{ calico_version }}
|
||||
- [cilium](https://github.com/cilium/cilium) {{ cilium_version }}
|
||||
- [flannel](https://github.com/flannel-io/flannel) {{ flannel_version }}
|
||||
- [kube-ovn](https://github.com/alauda/kube-ovn) {{ kube_ovn_version }}
|
||||
- [kube-router](https://github.com/cloudnativelabs/kube-router) {{ kube_router_version }}
|
||||
- [multus](https://github.com/k8snetworkplumbingwg/multus-cni) {{ multus_version }}
|
||||
- [weave](https://github.com/rajch/weave) v{{ weave_version }}
|
||||
- [kube-vip](https://github.com/kube-vip/kube-vip) {{ kube_vip_version }}
|
||||
- Application
|
||||
- [cert-manager](https://github.com/jetstack/cert-manager) {{ cert_manager_version }}
|
||||
- [coredns](https://github.com/coredns/coredns) {{ coredns_version }}
|
||||
- [ingress-nginx](https://github.com/kubernetes/ingress-nginx) {{ ingress_nginx_version }}
|
||||
- [krew](https://github.com/kubernetes-sigs/krew) {{ krew_version }}
|
||||
- [argocd](https://argoproj.github.io/) {{ argocd_version }}
|
||||
- [helm](https://helm.sh/) {{ helm_version }}
|
||||
- [metallb](https://metallb.universe.tf/) {{ metallb_version }}
|
||||
- [registry](https://github.com/distribution/distribution) v{{ registry_version }}
|
||||
- Storage Plugin
|
||||
- [cephfs-provisioner](https://github.com/kubernetes-incubator/external-storage) {{ cephfs_provisioner_version }}
|
||||
- [rbd-provisioner](https://github.com/kubernetes-incubator/external-storage) {{ rbd_provisioner_version }}
|
||||
- [aws-ebs-csi-plugin](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) {{ aws_ebs_csi_plugin_version }}
|
||||
- [azure-csi-plugin](https://github.com/kubernetes-sigs/azuredisk-csi-driver) {{ azure_csi_plugin_version }}
|
||||
- [cinder-csi-plugin](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md) {{ cinder_csi_plugin_version }}
|
||||
- [gcp-pd-csi-plugin](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) {{ gcp_pd_csi_plugin_version }}
|
||||
- [local-path-provisioner](https://github.com/rancher/local-path-provisioner) {{ local_path_provisioner_version }}
|
||||
- [local-volume-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) {{ local_volume_provisioner_version }}
|
||||
- [node-feature-discovery](https://github.com/kubernetes-sigs/node-feature-discovery) {{ node_feature_discovery_version }}
|
||||
22
scripts/render_readme_version.yml
Executable file
22
scripts/render_readme_version.yml
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- name: Update README.md versions
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
vars:
|
||||
fallback_ip: 'bypass tasks in kubespray-defaults'
|
||||
roles:
|
||||
- kubespray-defaults
|
||||
tasks:
|
||||
- name: Include versions not in kubespray-defaults
|
||||
include_vars: "{{ item }}"
|
||||
loop:
|
||||
- ../roles/container-engine/docker/defaults/main.yml
|
||||
- ../roles/kubernetes/node/defaults/main.yml
|
||||
- ../roles/kubernetes-apps/argocd/defaults/main.yml
|
||||
- name: Render versions in README.md
|
||||
blockinfile:
|
||||
marker: '[//]: # {mark} ANSIBLE MANAGED BLOCK'
|
||||
block: "\n{{ lookup('ansible.builtin.template', 'readme_versions.md.j2') }}\n\n"
|
||||
path: ../README.md
|
||||
Reference in New Issue
Block a user