From 93179a41f37752b9f45621fc56301295c685a87c Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 28 Aug 2024 09:58:26 +0200 Subject: [PATCH 1/2] ci: slightly rework the docs-check workflow This reworks the docs-check ci workflow in several ways: * It renames the make target 'check-docs' to the more systematic 'check.docs'. * It adds a 'docs'mode to the files validation script, and uses the script in `make check.docs`. Overall, the workflow and local make targets are more systematic and consistent with this change. Signed-off-by: Michael Adam --- .github/workflows/docs-check.yml | 2 +- Documentation/Contributing/documentation.md | 2 +- Makefile | 7 ++----- tests/scripts/validate_modified_files.sh | 6 +++++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index c060ce5d4b74..1a13e842d604 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -45,7 +45,7 @@ jobs: - name: Check helm-docs run: make check-helm-docs - name: Check docs - run: make check-docs + run: make check.docs - name: Install mkdocs and dependencies run: cd build/release/ && make deps.docs diff --git a/Documentation/Contributing/documentation.md b/Documentation/Contributing/documentation.md index ef9e1d370bdb..aa88f6a9e425 100644 --- a/Documentation/Contributing/documentation.md +++ b/Documentation/Contributing/documentation.md @@ -35,4 +35,4 @@ When previewing, now you can navigate your browser to [http://127.0.0.1:8000/](h ## Making docs [helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the documentation for a helm chart automatically. If there are changes in the helm chart, the developer needs to run `make docs` (to run helm-docs) and check in the resulting autogenerated files. -To make it easy to check locally for uncommitted changes generated by `make docs`, an additional `make` target exists: simply running `make check-docs` will run the docs auto-generation and will complain if this produces uncommitted changes to doc files. It is therefore a good habit to always run `make check-docs` locally before creating or updating a PR. +To make it easy to check locally for uncommitted changes generated by `make docs`, an additional `make` target exists: simply running `make check.docs` will run the docs auto-generation and will complain if this produces uncommitted changes to doc files. It is therefore a good habit to always run `make check.docs` locally before creating or updating a PR. diff --git a/Makefile b/Makefile index 29d1c24839eb..825664cf7937 100644 --- a/Makefile +++ b/Makefile @@ -207,12 +207,9 @@ check-helm-docs: echo "Please run 'make helm-docs' locally, commit the updated docs, and push the change. See https://rook.io/docs/rook/latest/Contributing/documentation/#making-docs" ; \ exit 2 ; \ }; -check-docs: +check.docs: @$(MAKE) docs - @git diff --exit-code || { \ - echo "Please run 'make docs' locally, commit the updated docs, and push the change." ; \ - exit 2 ; \ - }; + @tests/scripts/validate_modified_files.sh docs docs-preview: ## Preview the documentation through mkdocs diff --git a/tests/scripts/validate_modified_files.sh b/tests/scripts/validate_modified_files.sh index 1b51d81ca9d7..27cdb13f7279 100755 --- a/tests/scripts/validate_modified_files.sh +++ b/tests/scripts/validate_modified_files.sh @@ -9,6 +9,7 @@ MOD_ERR="changes found by mod.check. You may need to run make clean" CRD_ERR="changes found by 'make crds'. please run 'make crds' locally and update your PR" BUILD_ERR="changes found by make build', please commit your go.sum or other changed files" HELM_ERR="changes found by 'make gen-rbac'. please run 'make gen-rbac' locally and update your PR" +DOCS_ERR="changes found by 'make docs'. please run 'make docs' locally and update your PR" ############# # FUNCTIONS # @@ -29,6 +30,9 @@ function validate(){ # MAIN # ######## case "$1" in + docs) + validate "$DOCS_ERR" + ;; codegen) validate "$CODEGEN_ERR" ;; @@ -45,6 +49,6 @@ case "$1" in validate "$HELM_ERR" ;; *) - echo $"Usage: $0 {codegen|modcheck|crd|build|gen-rbac}" + echo $"Usage: $0 {docs|codegen|modcheck|crd|build|gen-rbac}" exit 1 esac From d041be4bcf25d4e67829f9de308e406396cbf8e6 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Fri, 6 Sep 2024 16:07:11 +0200 Subject: [PATCH 2/2] csi: update to new cephcsi release we have 3.12.2 as the new cephcsi release updating the rook to use the same. Signed-off-by: Madhu Rajanna --- Documentation/Helm-Charts/operator-chart.md | 2 +- .../Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md | 6 +++--- .../Storage-Configuration/Ceph-CSI/custom-images.md | 2 +- deploy/charts/rook-ceph/values.yaml | 2 +- deploy/examples/images.txt | 2 +- deploy/examples/operator-openshift.yaml | 2 +- deploy/examples/operator.yaml | 2 +- pkg/operator/ceph/csi/spec.go | 2 +- pkg/operator/ceph/csi/util_test.go | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index f3816c76c320..7ff471e7df16 100644 --- a/Documentation/Helm-Charts/operator-chart.md +++ b/Documentation/Helm-Charts/operator-chart.md @@ -61,7 +61,7 @@ The following table lists the configurable parameters of the rook-operator chart | `csi.cephFSPluginUpdateStrategy` | CSI CephFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate | `RollingUpdate` | | `csi.cephFSPluginUpdateStrategyMaxUnavailable` | A maxUnavailable parameter of CSI cephFS plugin daemonset update strategy. | `1` | | `csi.cephcsi.repository` | Ceph CSI image repository | `"quay.io/cephcsi/cephcsi"` | -| `csi.cephcsi.tag` | Ceph CSI image tag | `"v3.12.0"` | +| `csi.cephcsi.tag` | Ceph CSI image tag | `"v3.12.2"` | | `csi.cephfsLivenessMetricsPort` | CSI CephFS driver metrics port | `9081` | | `csi.cephfsPodLabels` | Labels to add to the CSI CephFS Deployments and DaemonSets Pods | `nil` | | `csi.clusterName` | Cluster name identifier to set as metadata on the CephFS subvolume and RBD images. This will be useful in cases like for example, when two container orchestrator clusters (Kubernetes/OCP) are using a single ceph cluster | `nil` | diff --git a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md index b904d2da8ab5..d81f55ebf2c2 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md +++ b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md @@ -210,10 +210,10 @@ CSI-Addons supports the following operations: Ceph-CSI supports encrypting PersistentVolumeClaims (PVCs) for both RBD and CephFS. This can be achieved using LUKS for RBD and fscrypt for CephFS. More details on encrypting RBD PVCs can be found -[here](https://github.com/ceph/ceph-csi/blob/v3.12.0/docs/deploy-rbd.md#encryption-for-rbd-volumes), +[here](https://github.com/ceph/ceph-csi/blob/v3.12.2/docs/deploy-rbd.md#encryption-for-rbd-volumes), which includes a full list of supported encryption configurations. -More details on encrypting CephFS PVCs can be found [here](https://github.com/ceph/ceph-csi/blob/v3.12.0/docs/deploy-cephfs.md#cephfs-volume-encryption). -A sample KMS configmap can be found [here](https://github.com/ceph/ceph-csi/blob/v3.12.0/examples/kms/vault/kms-config.yaml). +More details on encrypting CephFS PVCs can be found [here](https://github.com/ceph/ceph-csi/blob/v3.12.2/docs/deploy-cephfs.md#cephfs-volume-encryption). +A sample KMS configmap can be found [here](https://github.com/ceph/ceph-csi/blob/v3.12.2/examples/kms/vault/kms-config.yaml). !!! note Not all KMS are compatible with fscrypt. Generally, KMS that either store secrets to use directly (like Vault) diff --git a/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md b/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md index e3dedf6351c6..8629bbcc1b55 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md +++ b/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md @@ -18,7 +18,7 @@ kubectl -n $ROOK_OPERATOR_NAMESPACE edit configmap rook-ceph-operator-config The default upstream images are included below, which you can change to your desired images. ```yaml -ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.12.0" +ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.12.2" ROOK_CSI_REGISTRAR_IMAGE: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.11.1" ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.io/sig-storage/csi-provisioner:v5.0.1" ROOK_CSI_ATTACHER_IMAGE: "registry.k8s.io/sig-storage/csi-attacher:v4.6.1" diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index 1b931a492693..387712a37e2f 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -487,7 +487,7 @@ csi: # -- Ceph CSI image repository repository: quay.io/cephcsi/cephcsi # -- Ceph CSI image tag - tag: v3.12.0 + tag: v3.12.2 registrar: # -- Kubernetes CSI registrar image repository diff --git a/deploy/examples/images.txt b/deploy/examples/images.txt index 12ccd7dfd6ee..faab1198c12c 100644 --- a/deploy/examples/images.txt +++ b/deploy/examples/images.txt @@ -2,7 +2,7 @@ gcr.io/k8s-staging-sig-storage/objectstorage-sidecar:v20240513-v0.1.0-35-gefb3255 quay.io/ceph/ceph:v18.2.4 quay.io/ceph/cosi:v0.1.2 - quay.io/cephcsi/cephcsi:v3.12.0 + quay.io/cephcsi/cephcsi:v3.12.2 quay.io/csiaddons/k8s-sidecar:v0.9.1 registry.k8s.io/sig-storage/csi-attacher:v4.6.1 registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.11.1 diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index 7d0c052d59e2..396f022dd420 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -197,7 +197,7 @@ data: # The default version of CSI supported by Rook will be started. To change the version # of the CSI driver to something other than what is officially supported, change # these images to the desired release of the CSI driver. - # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.12.0" + # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.12.2" # ROOK_CSI_REGISTRAR_IMAGE: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.11.1" # ROOK_CSI_RESIZER_IMAGE: "registry.k8s.io/sig-storage/csi-resizer:v1.11.1" # ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.io/sig-storage/csi-provisioner:v5.0.1" diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml index 7f86068f50d9..1d60f5638559 100644 --- a/deploy/examples/operator.yaml +++ b/deploy/examples/operator.yaml @@ -127,7 +127,7 @@ data: # The default version of CSI supported by Rook will be started. To change the version # of the CSI driver to something other than what is officially supported, change # these images to the desired release of the CSI driver. - # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.12.0" + # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:3.12.2" # ROOK_CSI_REGISTRAR_IMAGE: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.11.1" # ROOK_CSI_RESIZER_IMAGE: "registry.k8s.io/sig-storage/csi-resizer:v1.11.1" # ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.io/sig-storage/csi-provisioner:v5.0.1" diff --git a/pkg/operator/ceph/csi/spec.go b/pkg/operator/ceph/csi/spec.go index d63e7bc9da2b..b3033f15cdeb 100644 --- a/pkg/operator/ceph/csi/spec.go +++ b/pkg/operator/ceph/csi/spec.go @@ -151,7 +151,7 @@ var ( // manually challenging. var ( // image names - DefaultCSIPluginImage = "quay.io/cephcsi/cephcsi:v3.12.0" + DefaultCSIPluginImage = "quay.io/cephcsi/cephcsi:v3.12.2" DefaultRegistrarImage = "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.11.1" DefaultProvisionerImage = "registry.k8s.io/sig-storage/csi-provisioner:v5.0.1" DefaultAttacherImage = "registry.k8s.io/sig-storage/csi-attacher:v4.6.1" diff --git a/pkg/operator/ceph/csi/util_test.go b/pkg/operator/ceph/csi/util_test.go index 2308d426e14d..3c8afc0ba40d 100644 --- a/pkg/operator/ceph/csi/util_test.go +++ b/pkg/operator/ceph/csi/util_test.go @@ -284,7 +284,7 @@ func Test_getImage(t *testing.T) { args: args{ data: map[string]string{}, settingName: "ROOK_CSI_CEPH_IMAGE", - defaultImage: "quay.io/cephcsi/cephcsi:v3.12.0", + defaultImage: "quay.io/cephcsi/cephcsi:v3.12.2", }, want: DefaultCSIPluginImage, },