Skip to content

Commit

Permalink
Update v4.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cabbetlong committed Dec 20, 2024
1 parent 796c484 commit 0d01908
Show file tree
Hide file tree
Showing 328 changed files with 10,945 additions and 3,889 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

[Releases](https://github.com/Huawei/eSDK_K8S_Plugin/releases)

## v4.6.0

- Support Kubernetes 1.31.
- Support Openshift 4.16/4.17.
- Support OceanStor Dorado V700R001C00.
- Supports the PPC64LE CPU architecture of the IBM Power platform.
- Support for Red Hat Enterprise Linux 8.6/8.7/8.8/8.9/8.10/9.4 x86_64.
- Support NFS 4.2 on OceanStor Dorado storage 6.1.8 and later version.
- Support NFS over RDMA on OceanStor Pacific storage 8.2.0 and later version.
- Added `disableVerifyCapacity` parameter in StorageClass whether allow to disable volume capacity verification.
- Added the restriction which is 1~30 on the `maxClientThreads` parameter in the backend.
- Fixed an issue where raw volumes may be misplaced when they are powered off unexpectedly.

## v4.5.0

- The default synchronization speed of hyper metro pair is changed from the highest speed to the default speed determined by the storage.
Expand Down
38 changes: 10 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ PLATFORM=PLATFORM

# (Optional) [2.5.RC1 2.5.RC2 ...] eSDK Version
RELEASE_VER=RELEASE_VER
# (Optional) [TRUE FALSE] Compile Binary Only, Cancel Inline Optimization
ONLY_BIN=ONLY_BIN
# (Optional) [github] Specifies the platform which to build on
BUILD_ON=BUILD_ON

export GO111MODULE=on

Expand All @@ -20,32 +16,18 @@ else
export PACKAGE=eSDK_Huawei_Storage_${RELEASE_VER}_Kubernetes_CSI_Plugin_V${VER}_${PLATFORM}_64
endif

# Build process
ifeq (${ONLY_BIN}, TRUE)
all:PREPARE BUILD PACK
# Disable inline optimization
flag = -gcflags "all=-N -l"
binary_flag = -gcflags "all=-N -l"
# Platform [X86, ARM, PPC64LE], default value is [X86]
ifeq (${PLATFORM}, PPC64LE)
arch=ppc64le
else ifeq (${PLATFORM}, ARM)
arch=arm64
else
flag = -ldflags="-s -linkmode 'external' -extldflags '-Wl,-z,now'" -buildmode=pie
binary_flag = -ldflags="-s" -buildmode=pie
all:PREPARE BUILD COPY_FILE PACK
endif

# Platform [X86, ARM]
ifeq (${PLATFORM}, X86)
env = CGO_CFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2" GOOS=linux GOARCH=amd64
binary_env = CGO_ENABLED=0 GOOS=linux GOARCH=amd64
else
env = CGO_CFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2" GOOS=linux GOARCH=arm64
binary_env = CGO_ENABLED=0 GOOS=linux GOARCH=arm64
arch=amd64
endif

# Build_ON [github]
ifeq ($(BUILD_ON), github)
env = CGO_ENABLED=0 GOOS=linux GOARCH=${arch}
flag = -ldflags="-s -bindnow" -buildmode=pie
env = $(binary_env)
endif

all:PREPARE BUILD COPY_FILE PACK

PREPARE:
rm -rf ./${PACKAGE}
Expand All @@ -58,7 +40,7 @@ BUILD:
${env} go build -o ./${PACKAGE}/bin/storage-backend-controller ${flag} ./cmd/storage-backend-controller
${env} go build -o ./${PACKAGE}/bin/storage-backend-sidecar ${flag} ./cmd/storage-backend-sidecar
${env} go build -o ./${PACKAGE}/bin/huawei-csi-extender ${flag} ./cmd/huawei-csi-extender
${binary_env} go build -o ./${PACKAGE}/bin/oceanctl ${binary_flag} ./cli
${env} go build -o ./${PACKAGE}/bin/oceanctl ${flag} ./cli

COPY_FILE:
mkdir -p ./${PACKAGE}/examples
Expand Down
15 changes: 12 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,27 @@ PLATFORM=$2
package_name="eSDK_Huawei_Storage_Kubernetes_CSI_Plugin_V${VER}_${PLATFORM}_64"

echo "Start to make with Makefile"
make -f Makefile VER=$1 PLATFORM=$2 BUILD_ON=github
make -f Makefile VER=$1 PLATFORM=$2

echo "Platform confirmation"
if [[ "${PLATFORM}" == "ARM" ]];then
PULL_FLAG="--platform=arm64"
BUILD_FLAG="--platform linux/arm64"
GO_PLATFORM="arm64"
elif [[ "${PLATFORM}" == "X86" ]];then
PULL_FLAG="--platform=amd64"
BUILD_FLAG="--platform linux/amd64"
GO_PLATFORM="amd64"
elif [[ "${PLATFORM}" == "PPC64LE" ]];then
PULL_FLAG="--platform=ppc64le"
BUILD_FLAG="--platform linux/ppc64le"
GO_PLATFORM="ppc64le"
else
echo "Wrong PLATFORM, support [X86, ARM]"
echo "Wrong PLATFORM, support [X86, ARM, PPC64LE]"
exit
fi

echo "Start to pull busybox image with architecture"
echo "Start to pull busybox image with architecture ${PULL_FLAG}"
docker pull ${PULL_FLAG} busybox:stable-glibc
docker pull ${PULL_FLAG} gcr.io/distroless/base:latest

Expand Down Expand Up @@ -82,6 +88,9 @@ cd ..

echo "Start to clear temporary files"
rm -f ./huawei-csi
rm -f ./huawei-csi-extender
rm -f ./storage-backend-controller
rm -f ./storage-backend-sidecar
rm -rf ./build_dir

echo "Build finish"
2 changes: 1 addition & 1 deletion cli/client/client_discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os/exec"
"strings"

"huawei-csi-driver/utils/log"
"github.com/Huawei/eSDK_K8S_Plugin/v4/utils/log"
)

// DiscoverKubernetesCLI used to discover kubernetes CLI.
Expand Down
6 changes: 3 additions & 3 deletions cli/client/client_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (

corev1 "k8s.io/api/core/v1"

"huawei-csi-driver/cli/helper"
xuanwuV1 "huawei-csi-driver/client/apis/xuanwu/v1"
"huawei-csi-driver/utils/log"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
xuanwuV1 "github.com/Huawei/eSDK_K8S_Plugin/v4/client/apis/xuanwu/v1"
"github.com/Huawei/eSDK_K8S_Plugin/v4/utils/log"
)

// CommonCallHandler common call handler
Expand Down
2 changes: 1 addition & 1 deletion cli/client/kube_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"k8s.io/api/core/v1"

"huawei-csi-driver/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cli/client/kubectl_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"gopkg.in/yaml.v3"

"huawei-csi-driver/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
)

type Filter struct {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
)

func registerCollectCmd() {
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/collect_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerCollectLogsCmd() {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
)

func registerCreateCmd() {
Expand Down
10 changes: 5 additions & 5 deletions cli/cmd/create_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/client"
"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/client"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerCreateBackendCmd() {
Expand Down
10 changes: 5 additions & 5 deletions cli/cmd/create_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/client"
"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/client"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerCreateCertCmd() {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
)

func registerDeleteCmd() {
Expand Down
10 changes: 5 additions & 5 deletions cli/cmd/delete_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/client"
"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/client"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerDeleteBackendCmd() {
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/delete_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerDeleteCertCmd() {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
)

func registerGetCmd() {
Expand Down
10 changes: 5 additions & 5 deletions cli/cmd/get_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/client"
"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/client"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerGetBackendCmd() {
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/get_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerGetCertCmd() {
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/options/flag_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package options
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/config"
"huawei-csi-driver/utils/log"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/utils/log"
)

// FlagsOptions is used for processing flags which user input
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (

"github.com/spf13/cobra"

"huawei-csi-driver/cli/client"
"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/utils/log"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/client"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/utils/log"
)

// RootCmd is a root command of oceanctl.
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
)

func registerUpdateCmd() {
Expand Down
10 changes: 5 additions & 5 deletions cli/cmd/update_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/client"
"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/client"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerUpdateBackendCmd() {
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/update_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package cmd
import (
"github.com/spf13/cobra"

"huawei-csi-driver/cli/cmd/options"
"huawei-csi-driver/cli/config"
"huawei-csi-driver/cli/helper"
"huawei-csi-driver/cli/resources"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/cmd/options"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/helper"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/resources"
)

func registerUpdateCertCmd() {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/spf13/cobra"

"huawei-csi-driver/cli/config"
"github.com/Huawei/eSDK_K8S_Plugin/v4/cli/config"
)

func registerVersionCmd() {
Expand Down
Loading

0 comments on commit 0d01908

Please sign in to comment.