diff --git a/Makefile b/Makefile index 09ca206..b0560ec 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,9 @@ .PHONY: test build container push clean PROJECT_DIR=/app -REGISTRY_NAME=ctrox +REGISTRY_NAME=uhub.service.ucloud.cn/registry.uic.io IMAGE_NAME=csi-s3 -VERSION ?= dev +VERSION ?= v1.2.0-rc.4 IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION) FULL_IMAGE_TAG=$(IMAGE_TAG)-full TEST_IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):test diff --git a/deploy/kubernetes/attacher.yaml b/deploy/kubernetes/attacher.yaml index e587d21..b7287e8 100644 --- a/deploy/kubernetes/attacher.yaml +++ b/deploy/kubernetes/attacher.yaml @@ -22,7 +22,7 @@ rules: resources: ["nodes"] verbs: ["get", "list", "watch"] - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] + resources: ["volumeattachments","volumeattachments/status","storageclass"] verbs: ["get", "list", "watch", "update", "patch"] --- kind: ClusterRoleBinding @@ -75,7 +75,7 @@ spec: operator: "Exists" containers: - name: csi-attacher - image: quay.io/k8scsi/csi-attacher:v2.2.0 + image: quay.io/k8scsi/csi-attacher:v3.1.0 args: - "--v=4" - "--csi-address=$(ADDRESS)" diff --git a/deploy/kubernetes/csi-s3.yaml b/deploy/kubernetes/csi-s3.yaml index 7eec63b..cefde7a 100644 --- a/deploy/kubernetes/csi-s3.yaml +++ b/deploy/kubernetes/csi-s3.yaml @@ -81,7 +81,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: ctrox/csi-s3:v1.2.0-rc.2 + image: uhub.service.ucloud.cn/registry.uic.io/csi-s3:v1.2.0-rc.4 imagePullPolicy: "Always" args: - "--endpoint=$(CSI_ENDPOINT)" diff --git a/deploy/kubernetes/provisioner.yaml b/deploy/kubernetes/provisioner.yaml index 3a3521d..17271d7 100644 --- a/deploy/kubernetes/provisioner.yaml +++ b/deploy/kubernetes/provisioner.yaml @@ -72,6 +72,7 @@ spec: tolerations: - key: node-role.kubernetes.io/master operator: "Exists" + hostNetwork: true containers: - name: csi-provisioner image: quay.io/k8scsi/csi-provisioner:v2.1.0 @@ -86,7 +87,7 @@ spec: - name: socket-dir mountPath: /var/lib/kubelet/plugins/ch.ctrox.csi.s3-driver - name: csi-s3 - image: ctrox/csi-s3:v1.2.0-rc.2 + image: uhub.service.ucloud.cn/registry.uic.io/csi-s3:v1.2.0-rc.4 args: - "--endpoint=$(CSI_ENDPOINT)" - "--nodeid=$(NODE_ID)" diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go index 1a2d8ac..9218ab0 100644 --- a/pkg/driver/controllerserver.go +++ b/pkg/driver/controllerserver.go @@ -110,7 +110,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol m, err := client.GetFSMeta(bucketName, prefix) if err == nil { // Check if volume capacity requested is bigger than the already existing capacity - if capacityBytes > m.CapacityBytes { + if capacityBytes > m.CapacityBytes && m.Mounter == "s3backer" { return nil, status.Error( codes.AlreadyExists, fmt.Sprintf("Volume with the same name: %s but with smaller size already exist", volumeID), )