mirror of
https://github.com/cristicalin/synology-csi.git
synced 2026-07-30 17:24:27 +00:00
update snapshotter
* fix snapshotter port * update snapshotter rbac
This commit is contained in:
@@ -13,6 +13,9 @@ rules:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["events"]
|
resources: ["events"]
|
||||||
verbs: ["list", "watch", "create", "update", "patch"]
|
verbs: ["list", "watch", "create", "update", "patch"]
|
||||||
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||||
|
resources: ["volumesnapshots"]
|
||||||
|
verbs: ["get", "list"]
|
||||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||||
resources: ["volumesnapshotclasses"]
|
resources: ["volumesnapshotclasses"]
|
||||||
verbs: ["get", "list", "watch"]
|
verbs: ["get", "list", "watch"]
|
||||||
@@ -22,6 +25,9 @@ rules:
|
|||||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||||
resources: ["volumesnapshotcontents/status"]
|
resources: ["volumesnapshotcontents/status"]
|
||||||
verbs: ["update"]
|
verbs: ["update"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["secrets"]
|
||||||
|
verbs: ["get", "list"]
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
@@ -38,6 +44,32 @@ roleRef:
|
|||||||
name: synology-csi-snapshotter-role
|
name: synology-csi-snapshotter-role
|
||||||
apiGroup: rbac.authorization.k8s.io
|
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
|
kind: StatefulSet
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
@@ -64,10 +96,12 @@ spec:
|
|||||||
capabilities:
|
capabilities:
|
||||||
add: ["SYS_ADMIN"]
|
add: ["SYS_ADMIN"]
|
||||||
allowPrivilegeEscalation: true
|
allowPrivilegeEscalation: true
|
||||||
image: quay.io/k8scsi/csi-snapshotter:v3.0.3
|
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1
|
||||||
args:
|
args:
|
||||||
- --v=5
|
- --v=1
|
||||||
- --csi-address=$(ADDRESS)
|
- --csi-address=$(ADDRESS)
|
||||||
|
- --leader-election
|
||||||
|
- --http-endpoint=:8083
|
||||||
env:
|
env:
|
||||||
- name: ADDRESS
|
- name: ADDRESS
|
||||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||||
@@ -75,6 +109,18 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
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
|
- name: csi-plugin
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
@@ -83,7 +129,7 @@ spec:
|
|||||||
allowPrivilegeEscalation: true
|
allowPrivilegeEscalation: true
|
||||||
image: cristicalin/synology-csi:v1.0.0
|
image: cristicalin/synology-csi:v1.0.0
|
||||||
args:
|
args:
|
||||||
- --nodeid=NotUsed
|
- --nodeid=$(KUBE_NODE_NAME)
|
||||||
- --endpoint=$(CSI_ENDPOINT)
|
- --endpoint=$(CSI_ENDPOINT)
|
||||||
- --client-info
|
- --client-info
|
||||||
- /etc/synology/client-info.yml
|
- /etc/synology/client-info.yml
|
||||||
@@ -91,6 +137,11 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
|
|||||||
Reference in New Issue
Block a user