Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 4f52201

Browse files
author
yang.tong
committed
feat(s3fs): 修改一个校验和部署权限及镜像
1 parent f198272 commit 4f52201

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
.PHONY: test build container push clean
1515

1616
PROJECT_DIR=/app
17-
REGISTRY_NAME=ctrox
17+
REGISTRY_NAME=uhub.service.ucloud.cn/registry.uic.io
1818
IMAGE_NAME=csi-s3
19-
VERSION ?= dev
19+
VERSION ?= v1.2.0-rc.4
2020
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION)
2121
FULL_IMAGE_TAG=$(IMAGE_TAG)-full
2222
TEST_IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):test

deploy/kubernetes/attacher.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rules:
2222
resources: ["nodes"]
2323
verbs: ["get", "list", "watch"]
2424
- apiGroups: ["storage.k8s.io"]
25-
resources: ["volumeattachments"]
25+
resources: ["volumeattachments","volumeattachments/status","storageclass"]
2626
verbs: ["get", "list", "watch", "update", "patch"]
2727
---
2828
kind: ClusterRoleBinding
@@ -75,7 +75,7 @@ spec:
7575
operator: "Exists"
7676
containers:
7777
- name: csi-attacher
78-
image: quay.io/k8scsi/csi-attacher:v2.2.0
78+
image: quay.io/k8scsi/csi-attacher:v3.1.0
7979
args:
8080
- "--v=4"
8181
- "--csi-address=$(ADDRESS)"

deploy/kubernetes/csi-s3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ spec:
8181
capabilities:
8282
add: ["SYS_ADMIN"]
8383
allowPrivilegeEscalation: true
84-
image: ctrox/csi-s3:v1.2.0-rc.2
84+
image: uhub.service.ucloud.cn/registry.uic.io/csi-s3:v1.2.0-rc.4
8585
imagePullPolicy: "Always"
8686
args:
8787
- "--endpoint=$(CSI_ENDPOINT)"

deploy/kubernetes/provisioner.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ spec:
7272
tolerations:
7373
- key: node-role.kubernetes.io/master
7474
operator: "Exists"
75+
hostNetwork: true
7576
containers:
7677
- name: csi-provisioner
7778
image: quay.io/k8scsi/csi-provisioner:v2.1.0
@@ -86,7 +87,7 @@ spec:
8687
- name: socket-dir
8788
mountPath: /var/lib/kubelet/plugins/ch.ctrox.csi.s3-driver
8889
- name: csi-s3
89-
image: ctrox/csi-s3:v1.2.0-rc.2
90+
image: uhub.service.ucloud.cn/registry.uic.io/csi-s3:v1.2.0-rc.4
9091
args:
9192
- "--endpoint=$(CSI_ENDPOINT)"
9293
- "--nodeid=$(NODE_ID)"

pkg/driver/controllerserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
110110
m, err := client.GetFSMeta(bucketName, prefix)
111111
if err == nil {
112112
// Check if volume capacity requested is bigger than the already existing capacity
113-
if capacityBytes > m.CapacityBytes {
113+
if capacityBytes > m.CapacityBytes && m.Mounter == "s3backer" {
114114
return nil, status.Error(
115115
codes.AlreadyExists, fmt.Sprintf("Volume with the same name: %s but with smaller size already exist", volumeID),
116116
)

0 commit comments

Comments
 (0)