Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix(cosi): add get/list/watch on bucketclasses to enable static provi… (#11620)

jonasoo98199d78539a92
diff --git a/k8s/charts/seaweedfs/templates/cosi/cosi-cluster-role.yaml b/k8s/charts/seaweedfs/templates/cosi/cosi-cluster-role.yaml
index b5c1035757..bf4127992f 100644
--- a/k8s/charts/seaweedfs/templates/cosi/cosi-cluster-role.yaml
+++ b/k8s/charts/seaweedfs/templates/cosi/cosi-cluster-role.yaml
@@ -28,6 +28,13 @@ rules:
- "update"
- "create"
- "delete"
+- apiGroups: ["objectstorage.k8s.io"]
+ resources:
+ - "bucketclasses"
+ verbs:
+ - "get"
+ - "list"
+ - "watch"
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs:
@@ -61,7 +68,7 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
subjects:
- kind: ServiceAccount
- name: {{ .Values.global.seaweedfs.serviceAccountName }}-objectstorage-provisioner
+ name: {{ include "seaweedfs.serviceAccountName" . }}-objectstorage-provisioner
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
diff --git a/k8s/charts/seaweedfs/templates/cosi/cosi-deployment.yaml b/k8s/charts/seaweedfs/templates/cosi/cosi-deployment.yaml
index 09d79da0a0..a3cb650cef 100644
--- a/k8s/charts/seaweedfs/templates/cosi/cosi-deployment.yaml
+++ b/k8s/charts/seaweedfs/templates/cosi/cosi-deployment.yaml
@@ -61,7 +61,7 @@ spec:
schedulerName: {{ .Values.cosi.schedulerName | quote }}
{{- end }}
enableServiceLinks: false
- serviceAccountName: {{ include "seaweedfs.componentName" (list . "objectstorage-provisioner") }}
+ serviceAccountName: {{ include "seaweedfs.serviceAccountName" . }}-objectstorage-provisioner
{{- if .Values.cosi.initContainers }}
initContainers:
{{ tpl .Values.cosi.initContainers . | nindent 8 | trim }}
diff --git a/k8s/charts/seaweedfs/templates/cosi/cosi-service-account.yaml b/k8s/charts/seaweedfs/templates/cosi/cosi-service-account.yaml
index 6d0a4bc387..5df150469a 100644
--- a/k8s/charts/seaweedfs/templates/cosi/cosi-service-account.yaml
+++ b/k8s/charts/seaweedfs/templates/cosi/cosi-service-account.yaml
@@ -3,7 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ .Values.global.seaweedfs.serviceAccountName }}-objectstorage-provisioner
+ name: {{ include "seaweedfs.serviceAccountName" . }}-objectstorage-provisioner
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}