Skip to content

Commit

Permalink
feat(s3fs): 修改一个校验和部署权限及镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
yang.tong committed Aug 16, 2024
1 parent f198272 commit 4f52201
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions deploy/kubernetes/attacher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/csi-s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
3 changes: 2 additions & 1 deletion deploy/kubernetes/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down

0 comments on commit 4f52201

Please sign in to comment.