mirror of
https://github.com/hanzoai/s3-csi.git
synced 2026-09-30 23:52:32 +00:00
The seaweedfs->s3 sweep rewrote third-party names it had no business
touching, turning working references into ones that resolve to nothing:
- deploy manifests and helm values asked for chrislusf/s3-csi and
chrislusf/s3-mount. Neither exists (Docker Hub 404s; upstream's real name
is chrislusf/seaweedfs-csi-driver). Pointed them at the images our own CI
publishes instead — ghcr.io/hanzoai/s3-{csi,mount} — which is what #1
moved us to and what the static manifest should have said all along.
- README linked github.com/s3/s3, s3.github.io/s3-csi-driver/helm and
chrislusf/s3-csi-driver badges. Restored the genuine upstream where we
cite upstream, and pointed our own links at hanzoai/s3-csi. Also fixed a
path that named a file we do not have.
- sync-s3.yaml grepped go.mod for github.com/s3/s3 and would `go get -u`
that module. Our module is github.com/hanzoai/s3, so the grep matched
nothing and the fetch could only fail. Deleted rather than repaired: it
syncs from an upstream this fork has deliberately left behind, and
pulling it forward would put gRPC back under a ZAP driver.
Also pins github.com/hanzoai/s3 v1.0.2 in place of the pseudo-version, now
that s3 tags its own v1 line (its 4.34.x/v2026.x tags were never resolvable
— the module has no major suffix, so only v1.x.x can be required), and moves
the integration test onto v1.0.2. That pin matters: 4.34.6 predates the ZAP
filer entirely, so the test was pointing a ZAP driver at a gRPC filer, and
v1.0.2 is the first build without the promise-ID deadlock on concurrent
filer calls.
Co-authored-by: Hanzo Dev <[email protected]>
433 lines
12 KiB
YAML
433 lines
12 KiB
YAML
---
|
|
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: csinodeinfos.csi.storage.k8s.io
|
|
annotations:
|
|
"api-approved.kubernetes.io": "https://github.com/kubernetes/enhancements/pull/1111 - though obvi it's not approved, but that's why"
|
|
spec:
|
|
group: csi.storage.k8s.io
|
|
names:
|
|
kind: CSINodeInfo
|
|
plural: csinodeinfos
|
|
scope: Cluster
|
|
versions:
|
|
- name: v1alpha1
|
|
served: true
|
|
storage: true
|
|
schema:
|
|
openAPIV3Schema:
|
|
type: object
|
|
properties:
|
|
csiDrivers:
|
|
description: List of CSI drivers running on the node and their properties.
|
|
items:
|
|
type: object
|
|
properties:
|
|
driver:
|
|
description: The CSI driver that this object refers to.
|
|
type: string
|
|
nodeID:
|
|
description: The node from the driver point of view.
|
|
type: string
|
|
topologyKeys:
|
|
description: List of keys supported by the driver.
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: array
|
|
status:
|
|
acceptedNames:
|
|
kind: ""
|
|
plural: ""
|
|
conditions: []
|
|
storedVersions: []
|
|
---
|
|
kind: StorageClass
|
|
apiVersion: storage.k8s.io/v1
|
|
metadata:
|
|
name: s3-storage
|
|
namespace: kube-system
|
|
annotations:
|
|
storageclass.kubernetes.io/is-default-class: "true"
|
|
provisioner: s3-csi
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: csi-s3-controller-sa
|
|
namespace: kube-system
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: csi-s3-node-sa
|
|
namespace: kube-system
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-provisioner-role
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["secrets"]
|
|
verbs: ["get", "list"]
|
|
- apiGroups: [""]
|
|
resources: ["persistentvolumes"]
|
|
verbs: ["get", "list", "watch", "create", "delete"]
|
|
- apiGroups: [""]
|
|
resources: ["persistentvolumeclaims"]
|
|
verbs: ["get", "list", "watch", "update"]
|
|
- apiGroups: ["storage.k8s.io"]
|
|
resources: ["storageclasses"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["list", "watch", "create", "update", "patch"]
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
resources: ["volumesnapshots"]
|
|
verbs: ["get", "list"]
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
resources: ["volumesnapshotcontents"]
|
|
verbs: ["get", "list"]
|
|
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-provisioner-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: csi-s3-controller-sa
|
|
namespace: kube-system
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: csi-s3-provisioner-role
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-attacher-role
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["persistentvolumes"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
- apiGroups: [""]
|
|
resources: ["nodes"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
- apiGroups: ["storage.k8s.io"]
|
|
resources: ["csinodes"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
- apiGroups: ["storage.k8s.io"]
|
|
resources: ["volumeattachments"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
- apiGroups: ["storage.k8s.io"]
|
|
resources: ["volumeattachments/status"]
|
|
verbs: ["patch"]
|
|
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-attacher-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: csi-s3-controller-sa
|
|
namespace: kube-system
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: csi-s3-attacher-role
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-snapshotter-role
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["persistentvolumes"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["persistentvolumeclaims"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: ["storage.k8s.io"]
|
|
resources: ["storageclasses"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["list", "watch", "create", "update", "patch"]
|
|
- apiGroups: [""]
|
|
resources: ["secrets"]
|
|
verbs: ["get", "list"]
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
resources: ["volumesnapshotclasses"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
resources: ["volumesnapshotcontents"]
|
|
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
resources: ["volumesnapshots"]
|
|
verbs: ["get", "list", "watch", "update"]
|
|
- apiGroups: ["apiextensions.k8s.io"]
|
|
resources: ["customresourcedefinitions"]
|
|
verbs: ["create", "list", "watch", "delete"]
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-snapshotter-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: csi-s3-controller-sa
|
|
namespace: kube-system
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: csi-s3-snapshotter-role
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-driver-registrar-controller-role
|
|
rules:
|
|
- apiGroups: ["csi.storage.k8s.io"]
|
|
resources: ["csidrivers"]
|
|
verbs: ["create", "delete"]
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-driver-registrar-controller-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: csi-s3-controller-sa
|
|
namespace: kube-system
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: csi-s3-driver-registrar-controller-role
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-driver-registrar-node-role
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
|
- apiGroups: ["apiextensions.k8s.io"]
|
|
resources: ["customresourcedefinitions"]
|
|
verbs: ["create", "list", "watch", "delete"]
|
|
- apiGroups: [""]
|
|
resources: ["nodes"]
|
|
verbs: ["get", "list", "watch"]
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: csi-s3-driver-registrar-node-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: csi-s3-node-sa
|
|
namespace: kube-system
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: csi-s3-driver-registrar-node-role
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
kind: StatefulSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-s3-controller
|
|
namespace: kube-system
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-s3-controller
|
|
serviceName: "csi-s3"
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-s3-controller
|
|
role: csi-s3
|
|
spec:
|
|
priorityClassName: system-cluster-critical
|
|
serviceAccount: csi-s3-controller-sa
|
|
containers:
|
|
# provisioner
|
|
- name: csi-provisioner
|
|
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.0.4
|
|
args:
|
|
- "--csi-address=$(ADDRESS)"
|
|
- "--v=5"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
|
imagePullPolicy: "Always"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
# attacher
|
|
- name: csi-attacher
|
|
image: k8s.gcr.io/sig-storage/csi-attacher:v3.0.2
|
|
args:
|
|
- "--v=5"
|
|
- "--csi-address=$(ADDRESS)"
|
|
- "--timeout=120s"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
|
imagePullPolicy: "Always"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
# Driver registrar
|
|
- name: csi-driver-registrar
|
|
image: quay.io/k8scsi/csi-cluster-driver-registrar:v1.0.1
|
|
args:
|
|
- "--v=5"
|
|
- "--pod-info-mount-version=\"v1\""
|
|
- "--csi-address=$(ADDRESS)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
# S3 Plugin
|
|
- name: s3-csi-plugin
|
|
image: ghcr.io/hanzoai/s3-csi:latest
|
|
args :
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--filer=$(S3_FILER)"
|
|
- "--nodeid=$(NODE_ID)"
|
|
- "--cacheCapacityMB=$(S3_CACHE_CAPACITY_MB)"
|
|
- "--cacheDir=$(S3_CACHE_DIR)"
|
|
- "--map.uid=$(S3_MAP_UID)"
|
|
- "--map.gid=$(S3_MAP_GID)"
|
|
env:
|
|
- name: CSI_ENDPOINT
|
|
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
|
- name: S3_FILER
|
|
value: "192.168.2.7:8888" # host and port of your S3 filer
|
|
- name: NODE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: S3_CACHE_CAPACITY_MB
|
|
value: "1000"
|
|
- name: S3_CACHE_DIR
|
|
value: /tmp
|
|
- name: S3_MAP_UID
|
|
value: ""
|
|
- name: S3_MAP_GID
|
|
value: ""
|
|
imagePullPolicy: "Always"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
volumes:
|
|
- name: socket-dir
|
|
emptyDir: {}
|
|
---
|
|
kind: DaemonSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-s3-node
|
|
namespace: kube-system
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-s3-node
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-s3-node
|
|
role: csi-s3
|
|
spec:
|
|
priorityClassName: system-node-critical
|
|
serviceAccount: csi-s3-node-sa
|
|
hostNetwork: true
|
|
dnsPolicy: ClusterFirstWithHostNet
|
|
containers:
|
|
- name: driver-registrar
|
|
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
|
|
args:
|
|
- "--v=5"
|
|
- "--csi-address=$(ADDRESS)"
|
|
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /csi/csi.sock
|
|
- name: DRIVER_REG_SOCK_PATH
|
|
value: /var/lib/kubelet/plugins/s3-csi/csi.sock
|
|
- name: KUBE_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
volumeMounts:
|
|
- name: plugin-dir
|
|
mountPath: /csi/
|
|
- name: registration-dir
|
|
mountPath: /registration/
|
|
- name: csi-s3-plugin
|
|
securityContext:
|
|
privileged: true
|
|
capabilities:
|
|
add: ["SYS_ADMIN"]
|
|
allowPrivilegeEscalation: true
|
|
image: ghcr.io/hanzoai/s3-csi:latest
|
|
args :
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--filer=$(S3_FILER)"
|
|
- "--nodeid=$(NODE_ID)"
|
|
- "--cacheCapacityMB=$(S3_CACHE_CAPACITY_MB)"
|
|
- "--cacheDir=$(S3_CACHE_DIR)"
|
|
- "--map.uid=$(S3_MAP_UID)"
|
|
- "--map.gid=$(S3_MAP_GID)"
|
|
env:
|
|
- name: CSI_ENDPOINT
|
|
value: unix:///csi/csi.sock
|
|
- name: S3_FILER
|
|
value: "192.168.2.7:8888" # host and port of your S3 filer, could also be K8S DNS entry like s3-filer.s3-namespace.svc:8888
|
|
- name: NODE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: S3_CACHE_CAPACITY_MB
|
|
value: "1000"
|
|
- name: S3_CACHE_DIR
|
|
value: /tmp
|
|
- name: S3_MAP_UID
|
|
value: ""
|
|
- name: S3_MAP_GID
|
|
value: ""
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: plugin-dir
|
|
mountPath: /csi
|
|
- name: pods-mount-dir
|
|
mountPath: /var/lib/kubelet
|
|
mountPropagation: "Bidirectional"
|
|
- mountPath: /dev
|
|
name: device-dir
|
|
volumes:
|
|
- name: registration-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins_registry/
|
|
type: DirectoryOrCreate
|
|
- name: plugin-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins/s3-csi
|
|
type: DirectoryOrCreate
|
|
- name: pods-mount-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet
|
|
type: Directory
|
|
- name: device-dir
|
|
hostPath:
|
|
path: /dev
|