From 7d3f6c6591d8824c163ae897c6431b9806a95cf7 Mon Sep 17 00:00:00 2001 From: Bala FA Date: Thu, 8 Aug 2024 13:01:32 +0530 Subject: [PATCH] Upgrade sidecar images (#922) * csi-node-driver-registrar:v2.11.1, openshift4/ose-csi-node-driver-registrar-rhel8:v4.12.0-202407151105.p0.gc316b89.assembly.stream.el8 * csi-provisioner:v5.0.1, openshift4/ose-csi-external-provisioner-rhel8:v4.12.0-202407151105.p0.g3aa7c52.assembly.stream.el8 * livenessprobe:v2.13.1, openshift4/ose-csi-livenessprobe-rhel8:v4.12.0-202407151105.p0.ge6545e7.assembly.stream.el8 * csi-resizer:v1.11.2, openshift4/ose-csi-external-resizer-rhel8:v4.12.0-202407151105.p0.g5b066ba.assembly.stream.el8 Signed-off-by: Bala.FA --- .github/workflows/build.yml | 4 ++-- .github/workflows/functests.yml | 4 ++-- .github/workflows/linters.yml | 4 ++-- .github/workflows/vulncheck.yml | 4 ++-- cmd/kubectl-directpv/list_volumes.go | 3 +-- docs/installation.md | 8 +++---- docs/tools/push-images.sh | 8 +++---- functests/multi-node-tests.sh | 2 +- pkg/admin/installer/args.go | 33 ++++++++++++++-------------- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b3e1d9a..ae0f0fbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,10 @@ name: Build on: push: - branches: [ master, devel ] + branches: [ master, v4.0 ] pull_request: - branches: [ master, devel ] + branches: [ master, v4.0 ] # This ensures that previous jobs for the PR are canceled when the PR is # updated. diff --git a/.github/workflows/functests.yml b/.github/workflows/functests.yml index 8ec09707..57bba698 100644 --- a/.github/workflows/functests.yml +++ b/.github/workflows/functests.yml @@ -2,10 +2,10 @@ name: Functional Tests on: push: - branches: [ master, devel ] + branches: [ master, v4.0 ] pull_request: - branches: [ master, devel ] + branches: [ master, v4.0 ] # This ensures that previous jobs for the PR are canceled when the PR is # updated. diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 0cf087d1..6ed98ddd 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -2,10 +2,10 @@ name: Linters on: push: - branches: [ master, devel ] + branches: [ master, v4.0 ] pull_request: - branches: [ master, devel ] + branches: [ master, v4.0 ] # This ensures that previous jobs for the PR are canceled when the PR is # updated. diff --git a/.github/workflows/vulncheck.yml b/.github/workflows/vulncheck.yml index f86c931b..5bef12ca 100644 --- a/.github/workflows/vulncheck.yml +++ b/.github/workflows/vulncheck.yml @@ -2,10 +2,10 @@ name: VulnCheck on: push: - branches: [ master, devel ] + branches: [ master, v4.0 ] pull_request: - branches: [ master, devel ] + branches: [ master, v4.0 ] # This ensures that previous jobs for the PR are canceled when the PR is # updated. diff --git a/cmd/kubectl-directpv/list_volumes.go b/cmd/kubectl-directpv/list_volumes.go index 870e4fb8..8ab6a2a3 100644 --- a/cmd/kubectl-directpv/list_volumes.go +++ b/cmd/kubectl-directpv/list_volumes.go @@ -24,7 +24,6 @@ import ( "github.com/jedib0t/go-pretty/v6/table" directpvtypes "github.com/minio/directpv/pkg/apis/directpv.min.io/types" "github.com/minio/directpv/pkg/consts" - "github.com/minio/directpv/pkg/k8s" "github.com/minio/directpv/pkg/types" "github.com/minio/directpv/pkg/utils" "github.com/spf13/cobra" @@ -146,7 +145,7 @@ func validateListVolumesArgs() error { } func getPVCName(ctx context.Context, volume types.Volume) string { - pv, err := k8s.KubeClient().CoreV1().PersistentVolumes().Get(ctx, volume.Name, metav1.GetOptions{}) + pv, err := adminClient.Kube().CoreV1().PersistentVolumes().Get(ctx, volume.Name, metav1.GetOptions{}) if err == nil && pv != nil && pv.Spec.ClaimRef != nil { return pv.Spec.ClaimRef.Name } diff --git a/docs/installation.md b/docs/installation.md index 57ba8229..42bde631 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -37,11 +37,11 @@ Before starting the installation, it is required to have DirectPV plugin install ### Prerequisites * Kubernetes >= v1.20 on GNU/Linux on amd64. * If you use private registry, below images must be pushed into your registry. You could use [this helper script](tools/push-images.sh) to do that. - - quay.io/minio/csi-node-driver-registrar:v2.8.0 - - quay.io/minio/csi-provisioner:v3.5.0 _(for Kubernetes >= v1.20)_ + - quay.io/minio/csi-node-driver-registrar:v2.11.1 + - quay.io/minio/csi-provisioner:v5.0.1 _(for Kubernetes >= v1.20)_ - quay.io/minio/csi-provisioner:v2.2.0-go1.18 _(for kubernetes < v1.20)_ - - quay.io/minio/livenessprobe:v2.10.0 - - quay.io/minio/csi-resizer:v1.8.0 + - quay.io/minio/livenessprobe:v2.13.1 + - quay.io/minio/csi-resizer:v1.11.2 - quay.io/minio/directpv:latest * If `seccomp` is enabled, load [DirectPV seccomp profile](../seccomp.json) on nodes where you want to install DirectPV and use `--seccomp-profile` flag to `kubectl directpv install` command. For more information, refer Kubernetes documentation [here](https://kubernetes.io/docs/tutorials/clusters/seccomp/) * If `apparmor` is enabled, load [DirectPV apparmor profile](../apparmor.profile) on nodes where you want to install DirectPV and use `--apparmor-profile` flag to `kubectl directpv install` command. For more information, refer to the [Kubernetes documentation](https://kubernetes.io/docs/tutorials/clusters/apparmor/). diff --git a/docs/tools/push-images.sh b/docs/tools/push-images.sh index 706affac..09b225a4 100755 --- a/docs/tools/push-images.sh +++ b/docs/tools/push-images.sh @@ -63,11 +63,11 @@ function push_image() { } function main() { - push_image "quay.io/minio/csi-node-driver-registrar:v2.8.0" - push_image "quay.io/minio/csi-provisioner:v3.5.0" + push_image "quay.io/minio/csi-node-driver-registrar:v2.11.1" + push_image "quay.io/minio/csi-provisioner:v5.0.1" push_image "quay.io/minio/csi-provisioner:v2.2.0-go1.18" - push_image "quay.io/minio/livenessprobe:v2.10.0" - push_image "quay.io/minio/csi-resizer:v1.8.0" + push_image "quay.io/minio/livenessprobe:v2.13.1" + push_image "quay.io/minio/csi-resizer:v1.11.2" release=$(curl -sfL "https://api.github.com/repos/minio/directpv/releases/latest" | awk '/tag_name/ { print substr($2, 3, length($2)-4) }') push_image "quay.io/minio/directpv:v${release}" } diff --git a/functests/multi-node-tests.sh b/functests/multi-node-tests.sh index 00caedf8..edd8bb8e 100644 --- a/functests/multi-node-tests.sh +++ b/functests/multi-node-tests.sh @@ -295,7 +295,7 @@ if ! main >/tmp/.output 2>&1; then fi EOF chmod a+x "${setup_sh}" - scp_cmd "${DIRECTPV_DIR}/CREDITS" "${DIRECTPV_DIR}/LICENSE" "${DIRECTPV_DIR}/centos.repo" "${DIRECTPV_DIR}/directpv" "${DIRECTPV_DIR}/kubectl-directpv" "${DIRECTPV_DIR}/Dockerfile" "${sleep_dockerfile}" "${setup_sh}" "root@${MASTER_VM_IP}:" + scp_cmd "${DIRECTPV_DIR}/CREDITS" "${DIRECTPV_DIR}/LICENSE" "${DIRECTPV_DIR}/AlmaLinux.repo" "${DIRECTPV_DIR}/directpv" "${DIRECTPV_DIR}/kubectl-directpv" "${DIRECTPV_DIR}/Dockerfile" "${sleep_dockerfile}" "${setup_sh}" "root@${MASTER_VM_IP}:" ssh_cmd "${MASTER_VM_IP}" "./${setup_sh}" if [ "${NODE_COUNT}" -eq 0 ]; then diff --git a/pkg/admin/installer/args.go b/pkg/admin/installer/args.go index 10f4867d..0392d501 100644 --- a/pkg/admin/installer/args.go +++ b/pkg/admin/installer/args.go @@ -30,24 +30,25 @@ import ( ) const ( - // csiProvisionerImage = csi-provisioner:v3.5.0 - csiProvisionerImage = "csi-provisioner@sha256:7b5c070ec70d30b0895d91b10c39a0e6cc81c18e0d1566c77aeff2a3587fa316" - openshiftCSIProvisionerImage = "registry.redhat.io/openshift4/ose-csi-external-provisioner@sha256:778aa6e5ea046bfcd865e665679c30362dc8c00cfb33a0cdcc56b2395e8ab504" - + // csiProvisionerImage = csi-provisioner:v5.0.1 + csiProvisionerImage = "csi-provisioner@sha256:acf6e876a3fc5f367ea3ad5aeb2ce16c47b051cb853d8b2c5fb498c51166726e" // csiProvisionerImageV2_2_0 = "csi-provisioner:v2.2.0-go1.18" csiProvisionerImageV2_2_0 = "csi-provisioner@sha256:c185db49ba02c384633165894147f8d7041b34b173e82a49d7145e50e809b8d6" - - // nodeDriverRegistrarImage = csi-node-driver-registrar:v2.8.0 - nodeDriverRegistrarImage = "csi-node-driver-registrar@sha256:c805fdc166761218dc9478e7ac8e0ad0e42ad442269e75608823da3eb761e67e" - openshiftNodeDriverRegistrarImage = "registry.redhat.io/openshift4/ose-csi-node-driver-registrar@sha256:0db5ea72a708503516f33f221848f0adaee71901769699ef5322a79e2da4f6d1" - - // livenessProbeImage = livenessprobe:v2.10.0 - livenessProbeImage = "livenessprobe@sha256:f3bc9a84f149cd7362e4bd0ae8cd90b26ad020c2591bfe19e63ff97aacf806c3" - openshiftLivenessProbeImage = "registry.redhat.io/openshift4/ose-csi-livenessprobe@sha256:81f9f06a7de9a79013a4690ad616c1aff9638ab64284626491f44645a07051ec" - - // csiResizerImage = csi-resizer:v1.8.0 - csiResizerImage = "csi-resizer@sha256:819f68a4daf75acec336302843f303cf360d4941249f9f5019ffbb690c8ac7c0" - openshiftCSIResizerImage = "registry.redhat.io/openshift4/ose-csi-external-resizer-rhel8@sha256:837b32a0c432123e2605ad6d029e7f3b4489d9c52a9d272c7a133d41ad10db87" + // nodeDriverRegistrarImage = csi-node-driver-registrar:v2.11.1 + nodeDriverRegistrarImage = "csi-node-driver-registrar@sha256:7cd4053e52c0028bd9c711ca6de667a7c459a024679ae967c7f800e81baec0bf" + // livenessProbeImage = livenessprobe:v2.13.1 + livenessProbeImage = "livenessprobe@sha256:4106724032620c7679bf065e6e11c7d841cf1d9db69c5e33514a6139681d0689" + // csiResizerImage = csi-resizer:v1.11.2 + csiResizerImage = "csi-resizer@sha256:33f6fd174f2dc121c0e87176856cc36b25374737c5441bccb5b3679905df7ab9" + + // openshiftCSIProvisionerImage = openshift4/ose-csi-external-provisioner-rhel8:v4.12.0-202407151105.p0.g3aa7c52.assembly.stream.el8 + openshiftCSIProvisionerImage = "registry.redhat.io/openshift4/ose-csi-external-provisioner-rhel8@sha256:8bf8aa8975790e19ba107fd58699f98389e3fb692d192f4df3078fff7f0a4bba" + // openshiftNodeDriverRegistrarImage = openshift4/ose-csi-node-driver-registrar-rhel8:v4.12.0-202407151105.p0.gc316b89.assembly.stream.el8 + openshiftNodeDriverRegistrarImage = "registry.redhat.io/openshift4/ose-csi-node-driver-registrar-rhel8@sha256:ab54e6a2e8a6a1ca2da5aaf25f784c09f5bf22ea32224ec1bdb6c564f88695a9" + // openshiftLivenessProbeImage = openshift4/ose-csi-livenessprobe-rhel8:v4.12.0-202407151105.p0.ge6545e7.assembly.stream.el8 + openshiftLivenessProbeImage = "registry.redhat.io/openshift4/ose-csi-livenessprobe-rhel8@sha256:b28029f929fe2a28e666910d1acc57c3474fabdb2f9129688ef1ca56c7231d90" + // openshiftCSIResizerImage = openshift4/ose-csi-external-resizer-rhel8:v4.12.0-202407151105.p0.g5b066ba.assembly.stream.el8 + openshiftCSIResizerImage = "registry.redhat.io/openshift4/ose-csi-external-resizer-rhel8@sha256:bed8de36bac80108909205342b2d92e4de5adbfa33bf13f9346236fca52a0d3e" ) // Args represents DirectPV installation arguments.