mirror of
https://github.com/cristicalin/synology-csi.git
synced 2026-03-27 11:23:05 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fff500b55c | ||
|
|
4ac8cdf165 | ||
|
|
a2421816c4 | ||
|
|
a322282212 | ||
|
|
54d77536c9 | ||
|
|
3bcc0368ac | ||
|
|
d4a151fbe3 | ||
|
|
b04a1d9347 | ||
|
|
6c34a541f8 | ||
|
|
c054d58d42 | ||
|
|
de6345708a | ||
|
|
95ee0fa92a | ||
|
|
14d21c2c96 | ||
|
|
1fbc604a0c | ||
|
|
092448e125 | ||
|
|
ecf94e6e7c | ||
|
|
4b74dcb007 | ||
|
|
47fd234ef4 | ||
|
|
edbb640d7b |
279
deploy/kubernetes/v1.22/controller.yml
Normal file
279
deploy/kubernetes/v1.22/controller.yml
Normal file
@@ -0,0 +1,279 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: csi-controller-sa
|
||||
namespace: synology-csi
|
||||
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: synology-csi-controller-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims/status"]
|
||||
verbs: ["get", "list", "watch", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["csinodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["csi.storage.k8s.io"]
|
||||
resources: ["csinodeinfos"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments"]
|
||||
verbs: ["get", "list", "watch", "update", "patch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments/status"]
|
||||
verbs: ["patch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshots"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshotcontents"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
# The following rule should be uncommented for plugins that require secrets
|
||||
# for provisioning.
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: synology-csi-controller-role
|
||||
namespace: synology-csi
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-controller-sa
|
||||
namespace: synology-csi
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: synology-csi-controller-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
# Provisioner must be able to work with endpoints in current namespace
|
||||
# if (and only if) leadership election is enabled
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
namespace: synology-csi
|
||||
name: synology-provisioner-cfg
|
||||
rules:
|
||||
# Only one of the following rules for endpoints or leases is required based on
|
||||
# what is set for `--leader-election-type`. Endpoints are deprecated in favor of Leases.
|
||||
- apiGroups: [""]
|
||||
resources: ["endpoints"]
|
||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
||||
# Permissions for CSIStorageCapacity are only needed enabling the publishing
|
||||
# of storage capacity information.
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["csistoragecapacities"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
# The GET permissions below are needed for walking up the ownership chain
|
||||
# for CSIStorageCapacity. They are sufficient for deployment via
|
||||
# StatefulSet (only needs to get Pod) and Deployment (needs to get
|
||||
# Pod and then ReplicaSet to find the Deployment).
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["replicasets"]
|
||||
verbs: ["get"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["statefulsets"]
|
||||
verbs: ["get"]
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: synology-csi-provisioner-role-cfg
|
||||
namespace: synology-csi
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-controller-sa
|
||||
namespace: synology-csi
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: synology-provisioner-cfg
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: StatefulSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: synology-csi-controller
|
||||
namespace: synology-csi
|
||||
spec:
|
||||
serviceName: "synology-csi-controller"
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: synology-csi-controller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: synology-csi-controller
|
||||
spec:
|
||||
serviceAccountName: csi-controller-sa
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: csi-provisioner
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: gcr.io/k8s-staging-sig-storage/csi-provisioner:v3.0.0
|
||||
args:
|
||||
- --timeout=60s
|
||||
- --csi-address=$(ADDRESS)
|
||||
- --leader-election
|
||||
# - --enable-capacity
|
||||
- --http-endpoint=:8080
|
||||
- --v=1
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: prov-port
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
failureThreshold: 1
|
||||
httpGet:
|
||||
path: /healthz/leader-election
|
||||
port: prov-port
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 10
|
||||
periodSeconds: 20
|
||||
- name: csi-attacher
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: gcr.io/k8s-staging-sig-storage/csi-attacher:v3.4.0
|
||||
args:
|
||||
- --v=1
|
||||
- --csi-address=$(ADDRESS)
|
||||
- --leader-election
|
||||
- --http-endpoint=:8081
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
- name: MY_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
name: attach-port
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
failureThreshold: 1
|
||||
httpGet:
|
||||
path: /healthz/leader-election
|
||||
port: attach-port
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 10
|
||||
periodSeconds: 20
|
||||
- name: csi-resizer
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: gcr.io/k8s-staging-sig-storage/csi-resizer:v1.3.0
|
||||
args:
|
||||
- --v=1
|
||||
- --csi-address=$(ADDRESS)
|
||||
- --leader-election
|
||||
- --http-endpoint=:8082
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
ports:
|
||||
- containerPort: 8082
|
||||
name: resizer-port
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
failureThreshold: 1
|
||||
httpGet:
|
||||
path: /healthz/leader-election
|
||||
port: resizer-port
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 10
|
||||
periodSeconds: 20
|
||||
- name: csi-plugin
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: cristicalin/synology-csi:v1.0.0
|
||||
args:
|
||||
- --nodeid=NotUsed
|
||||
- --endpoint=$(CSI_ENDPOINT)
|
||||
- --client-info
|
||||
- /etc/synology/client-info.yml
|
||||
- --log-level=info
|
||||
env:
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
- name: client-info
|
||||
mountPath: /etc/synology
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: socket-dir
|
||||
emptyDir: {}
|
||||
- name: client-info
|
||||
secret:
|
||||
secretName: client-info-secret
|
||||
9
deploy/kubernetes/v1.22/csi-driver.yml
Normal file
9
deploy/kubernetes/v1.22/csi-driver.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: csi.san.synology.com
|
||||
spec:
|
||||
attachRequired: true # Indicates the driver requires an attach operation (TODO: ControllerPublishVolume should be implemented)
|
||||
podInfoOnMount: true
|
||||
volumeLifecycleModes:
|
||||
- Persistent
|
||||
4
deploy/kubernetes/v1.22/namespace.yml
Normal file
4
deploy/kubernetes/v1.22/namespace.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: synology-csi
|
||||
139
deploy/kubernetes/v1.22/node.yml
Normal file
139
deploy/kubernetes/v1.22/node.yml
Normal file
@@ -0,0 +1,139 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: csi-node-sa
|
||||
namespace: synology-csi
|
||||
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: synology-csi-node-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "update"]
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: synology-csi-node-role
|
||||
namespace: synology-csi
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-node-sa
|
||||
namespace: synology-csi
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: synology-csi-node-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: synology-csi-node
|
||||
namespace: synology-csi
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: synology-csi-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: synology-csi-node
|
||||
spec:
|
||||
serviceAccount: csi-node-sa
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: csi-driver-registrar
|
||||
securityContext:
|
||||
privileged: true
|
||||
imagePullPolicy: Always
|
||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
||||
args:
|
||||
- --v=5
|
||||
- --csi-address=$(ADDRESS) # the csi socket path inside the pod
|
||||
- --kubelet-registration-path=$(REGISTRATION_PATH) # the csi socket path on the host node
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
- name: REGISTRATION_PATH
|
||||
value: /var/lib/kubelet/plugins/csi.san.synology.com/csi.sock
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
- name: registration-dir
|
||||
mountPath: /registration
|
||||
- name: csi-plugin
|
||||
securityContext:
|
||||
privileged: true
|
||||
imagePullPolicy: IfNotPresent
|
||||
image: cristicalin/synology-csi:v1.0.0
|
||||
args:
|
||||
- --nodeid=$(KUBE_NODE_NAME)
|
||||
- --endpoint=$(CSI_ENDPOINT)
|
||||
- --client-info
|
||||
- /etc/synology/client-info.yml
|
||||
- --log-level=info
|
||||
env:
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix://csi/csi.sock
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
volumeMounts:
|
||||
- name: kubelet-dir
|
||||
mountPath: /var/lib/kubelet
|
||||
mountPropagation: "Bidirectional"
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
- name: client-info
|
||||
mountPath: /etc/synology
|
||||
readOnly: true
|
||||
- name: host-root
|
||||
mountPath: /host
|
||||
- name: device-dir
|
||||
mountPath: /dev
|
||||
volumes:
|
||||
- name: kubelet-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet
|
||||
type: Directory
|
||||
- name: plugin-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins/csi.san.synology.com/
|
||||
type: DirectoryOrCreate
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins_registry
|
||||
type: Directory
|
||||
- name: client-info
|
||||
secret:
|
||||
secretName: client-info-secret
|
||||
- name: host-root
|
||||
hostPath:
|
||||
path: /
|
||||
type: Directory
|
||||
- name: device-dir
|
||||
hostPath:
|
||||
path: /dev
|
||||
type: Directory
|
||||
157
deploy/kubernetes/v1.22/snapshotter/snapshotter.yaml
Normal file
157
deploy/kubernetes/v1.22/snapshotter/snapshotter.yaml
Normal file
@@ -0,0 +1,157 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: csi-snapshotter-sa
|
||||
namespace: synology-csi
|
||||
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: synology-csi-snapshotter-role
|
||||
rules:
|
||||
- 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: ["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: ["volumesnapshotcontents/status"]
|
||||
verbs: ["update"]
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list"]
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: synology-csi-snapshotter-role
|
||||
namespace: synology-csi
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-snapshotter-sa
|
||||
namespace: synology-csi
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: synology-csi-snapshotter-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
namespace: synology-csi
|
||||
name: synology-csi-snapshotter-cfg
|
||||
rules:
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
namespace: synology-csi
|
||||
name: synology-csi-snapshotter-role-cfg
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-snapshotter-sa
|
||||
namespace: synology-csi
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: synology-csi-snapshotter-cfg
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: StatefulSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: synology-csi-snapshotter
|
||||
namespace: synology-csi
|
||||
spec:
|
||||
serviceName: "synology-csi-snapshotter"
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: synology-csi-snapshotter
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: synology-csi-snapshotter
|
||||
spec:
|
||||
serviceAccountName: csi-snapshotter-sa
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: csi-snapshotter
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1
|
||||
args:
|
||||
- --v=1
|
||||
- --csi-address=$(ADDRESS)
|
||||
- --leader-election
|
||||
- --http-endpoint=:8083
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
ports:
|
||||
- containerPort: 8083
|
||||
name: snap-port
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
failureThreshold: 1
|
||||
httpGet:
|
||||
path: /healthz/leader-election
|
||||
port: snap-port
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 10
|
||||
periodSeconds: 20
|
||||
- name: csi-plugin
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: cristicalin/synology-csi:v1.0.0
|
||||
args:
|
||||
- --nodeid=$(KUBE_NODE_NAME)
|
||||
- --endpoint=$(CSI_ENDPOINT)
|
||||
- --client-info
|
||||
- /etc/synology/client-info.yml
|
||||
- --log-level=info
|
||||
env:
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
- name: client-info
|
||||
mountPath: /etc/synology
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: socket-dir
|
||||
emptyDir: {}
|
||||
- name: client-info
|
||||
secret:
|
||||
secretName: client-info-secret
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: snapshot.storage.k8s.io/v1beta1
|
||||
kind: VolumeSnapshotClass
|
||||
metadata:
|
||||
name: synology-snapshotclass
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
labels:
|
||||
velero.io/csi-volumesnapshot-class: "true"
|
||||
driver: csi.san.synology.com
|
||||
deletionPolicy: Retain
|
||||
# parameters:
|
||||
# description: 'Kubernetes CSI'
|
||||
# is_locked: 'false'
|
||||
14
deploy/kubernetes/v1.22/storage-class.yml
Normal file
14
deploy/kubernetes/v1.22/storage-class.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: synology-iscsi-storage
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "true"
|
||||
provisioner: csi.san.synology.com
|
||||
# if all params are empty, synology CSI will choose an available location to create volume
|
||||
# parameters:
|
||||
# dsm: '1.1.1.1'
|
||||
# location: '/volume1'
|
||||
# fsType: 'ext4'
|
||||
reclaimPolicy: Retain
|
||||
allowVolumeExpansion: true
|
||||
Reference in New Issue
Block a user