chore: change deployment config
chore: update doc fix doc issue
This commit is contained in:
parent
3abf09de5b
commit
01afbb46f9
|
|
@ -1,50 +0,0 @@
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: csi-azurefile-attacher
|
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
|
||||||
app: csi-azurefile-attacher
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: csi-azurefile-attacher
|
|
||||||
ports:
|
|
||||||
- name: dummy
|
|
||||||
port: 12345
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: StatefulSet
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-azurefile-attacher
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
serviceName: "csi-azurefile-attacher"
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: csi-azurefile-attacher
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: csi-azurefile-attacher
|
|
||||||
spec:
|
|
||||||
serviceAccountName: csi-attacher
|
|
||||||
containers:
|
|
||||||
- name: csi-attacher
|
|
||||||
image: quay.io/k8scsi/csi-attacher:v1.0.1
|
|
||||||
args:
|
|
||||||
- --v=5
|
|
||||||
- --csi-address=$(ADDRESS)
|
|
||||||
env:
|
|
||||||
- name: ADDRESS
|
|
||||||
value: /csi/csi.sock
|
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /csi
|
|
||||||
name: socket-dir
|
|
||||||
volumes:
|
|
||||||
- hostPath:
|
|
||||||
path: /var/lib/kubelet/plugins/file.csi.azure.com
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
name: socket-dir
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
---
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: csi-azurefile-controller
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: csi-azurefile-controller
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: csi-azurefile-controller
|
||||||
|
spec:
|
||||||
|
serviceAccountName: csi-azurefile-controller-sa
|
||||||
|
nodeSelector:
|
||||||
|
beta.kubernetes.io/os: linux
|
||||||
|
containers:
|
||||||
|
- name: csi-provisioner
|
||||||
|
image: quay.io/k8scsi/csi-provisioner:v1.0.1
|
||||||
|
args:
|
||||||
|
- "--provisioner=file.csi.azure.com"
|
||||||
|
- "--csi-address=$(ADDRESS)"
|
||||||
|
- "--connection-timeout=15s"
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
imagePullPolicy: Always
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
- name: csi-attacher
|
||||||
|
image: quay.io/k8scsi/csi-attacher:v1.0.1
|
||||||
|
args:
|
||||||
|
- --v=5
|
||||||
|
- --csi-address=$(ADDRESS)
|
||||||
|
- --timeout=120s
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
imagePullPolicy: Always
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
- name: cluster-driver-registrar
|
||||||
|
image: quay.io/k8scsi/csi-cluster-driver-registrar:v1.0.1
|
||||||
|
args:
|
||||||
|
- --csi-address=$(ADDRESS)
|
||||||
|
- --driver-requires-attachment=true
|
||||||
|
- --v=5
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
- name: liveness-probe
|
||||||
|
image: quay.io/k8scsi/livenessprobe:v1.1.0
|
||||||
|
args:
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
- --connection-timeout=3s
|
||||||
|
- --health-port=9702
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
- name: azurefile
|
||||||
|
image: mcr.microsoft.com/k8s/csi/azurefile-csi:v0.3.0
|
||||||
|
args:
|
||||||
|
- "--v=5"
|
||||||
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
||||||
|
ports:
|
||||||
|
- containerPort: 9702
|
||||||
|
name: healthz
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: healthz
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
env:
|
||||||
|
- name: AZURE_CREDENTIAL_FILE
|
||||||
|
value: "/etc/kubernetes/azure.json"
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix:///csi/csi.sock
|
||||||
|
imagePullPolicy: Always
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
- mountPath: /etc/kubernetes/
|
||||||
|
name: azure-cred
|
||||||
|
- mountPath: /var/lib/waagent/ManagedIdentity-Settings
|
||||||
|
readOnly: true
|
||||||
|
name: msi
|
||||||
|
volumes:
|
||||||
|
- name: socket-dir
|
||||||
|
emptyDir: {}
|
||||||
|
- name: azure-cred
|
||||||
|
hostPath:
|
||||||
|
path: /etc/kubernetes/
|
||||||
|
type: Directory
|
||||||
|
- name: msi
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/waagent/ManagedIdentity-Settings
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: csi-azurefile
|
name: csi-azurefile-node
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: csi-azurefile
|
app: csi-azurefile-node
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: csi-azurefile
|
app: csi-azurefile-node
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: csi-driver-registrar
|
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
|
nodeSelector:
|
||||||
|
beta.kubernetes.io/os: linux
|
||||||
containers:
|
containers:
|
||||||
- name: liveness-probe
|
- name: liveness-probe
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
|
@ -25,35 +26,28 @@ spec:
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
- --connection-timeout=3s
|
- --connection-timeout=3s
|
||||||
- --health-port=9702
|
- --health-port=9702
|
||||||
- name: driver-registrar
|
- name: node-driver-registrar
|
||||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.1.0
|
||||||
args:
|
args:
|
||||||
|
- --csi-address=$(ADDRESS)
|
||||||
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
||||||
- --v=5
|
- --v=5
|
||||||
- --csi-address=/csi/csi.sock
|
|
||||||
- --kubelet-registration-path=/var/lib/kubelet/plugins/file.csi.azure.com/csi.sock
|
|
||||||
lifecycle:
|
lifecycle:
|
||||||
preStop:
|
preStop:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command: ["/bin/sh", "-c", "rm -rf /registration/file.csi.azure.com-reg.sock /csi/csi.sock"]
|
||||||
[
|
|
||||||
"/bin/sh",
|
|
||||||
"-c",
|
|
||||||
"rm -rf /registration/disk.csi.azure.com /registration/disk.csi.azure.com-reg.sock",
|
|
||||||
]
|
|
||||||
env:
|
env:
|
||||||
- name: KUBE_NODE_NAME
|
- name: ADDRESS
|
||||||
valueFrom:
|
value: /csi/csi.sock
|
||||||
fieldRef:
|
- name: DRIVER_REG_SOCK_PATH
|
||||||
apiVersion: v1
|
value: /var/lib/kubelet/plugins/file.csi.azure.com/csi.sock
|
||||||
fieldPath: spec.nodeName
|
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /csi
|
- name: socket-dir
|
||||||
name: socket-dir
|
mountPath: /csi
|
||||||
- mountPath: /registration
|
- name: registration-dir
|
||||||
name: registration-dir
|
mountPath: /registration
|
||||||
- name: azurefile
|
- name: azurefile
|
||||||
image: mcr.microsoft.com/k8s/csi/azurefile-csi:v0.2.0-alpha
|
image: mcr.microsoft.com/k8s/csi/azurefile-csi:v0.3.0
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
|
@ -86,7 +80,7 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /csi
|
- mountPath: /csi
|
||||||
name: socket-dir
|
name: socket-dir
|
||||||
- mountPath: /var/lib/kubelet/pods
|
- mountPath: /var/lib/kubelet/
|
||||||
mountPropagation: Bidirectional
|
mountPropagation: Bidirectional
|
||||||
name: mountpoint-dir
|
name: mountpoint-dir
|
||||||
- mountPath: /etc/kubernetes/
|
- mountPath: /etc/kubernetes/
|
||||||
|
|
@ -100,7 +94,7 @@ spec:
|
||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
name: socket-dir
|
name: socket-dir
|
||||||
- hostPath:
|
- hostPath:
|
||||||
path: /var/lib/kubelet/pods
|
path: /var/lib/kubelet/
|
||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
name: mountpoint-dir
|
name: mountpoint-dir
|
||||||
- hostPath:
|
- hostPath:
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: csi-azurefile-provisioner
|
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
|
||||||
app: csi-azurefile-provisioner
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: csi-azurefile-provisioner
|
|
||||||
ports:
|
|
||||||
- name: dummy
|
|
||||||
port: 12345
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: StatefulSet
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-azurefile-provisioner
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
serviceName: "csi-azurefile-provisioner"
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: csi-azurefile-provisioner
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: csi-azurefile-provisioner
|
|
||||||
spec:
|
|
||||||
serviceAccountName: csi-provisioner
|
|
||||||
containers:
|
|
||||||
- name: csi-provisioner
|
|
||||||
image: quay.io/k8scsi/csi-provisioner:v1.0.1
|
|
||||||
args:
|
|
||||||
- "--provisioner=file.csi.azure.com"
|
|
||||||
- "--csi-address=$(ADDRESS)"
|
|
||||||
- "--connection-timeout=15s"
|
|
||||||
env:
|
|
||||||
- name: ADDRESS
|
|
||||||
value: /csi/csi.sock
|
|
||||||
imagePullPolicy: Always
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /csi
|
|
||||||
name: socket-dir
|
|
||||||
volumes:
|
|
||||||
- hostPath:
|
|
||||||
path: /var/lib/kubelet/plugins/file.csi.azure.com
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
name: socket-dir
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
|
||||||
# CSI attacher.
|
|
||||||
#
|
|
||||||
# In production, each CSI driver deployment has to be customized:
|
|
||||||
# - to avoid conflicts, use non-default namespace and different names
|
|
||||||
# for non-namespaced entities like the ClusterRole
|
|
||||||
# - decide whether the deployment replicates the external CSI
|
|
||||||
# attacher, in which case leadership election must be enabled;
|
|
||||||
# this influences the RBAC setup, see below
|
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: csi-attacher
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
|
|
||||||
---
|
|
||||||
# Attacher must be able to work with PVs, nodes and VolumeAttachments
|
|
||||||
kind: ClusterRole
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: external-attacher-runner
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["persistentvolumes"]
|
|
||||||
verbs: ["get", "list", "watch", "update"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
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"]
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-attacher-role
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: csi-attacher
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
kind: ClusterRole
|
|
||||||
name: external-attacher-runner
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
|
|
||||||
---
|
|
||||||
# Attacher must be able to work with config map in current namespace
|
|
||||||
# if (and only if) leadership election is enabled
|
|
||||||
kind: Role
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
name: external-attacher-cfg
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["configmaps"]
|
|
||||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: RoleBinding
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-attacher-role-cfg
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: csi-attacher
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
kind: Role
|
|
||||||
name: external-attacher-cfg
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
|
|
@ -0,0 +1,160 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: csi-azurefile-controller-sa
|
||||||
|
namespace: kube-system
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: azurefile-external-provisioner-role
|
||||||
|
rules:
|
||||||
|
- 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: ["get", "list", "watch", "create", "update", "patch"]
|
||||||
|
- apiGroups: ["storage.k8s.io"]
|
||||||
|
resources: ["csinodes"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: azurefile-csi-provisioner-binding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-azurefile-controller-sa
|
||||||
|
namespace: kube-system
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: azurefile-external-provisioner-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: azurefile-external-attacher-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumes"]
|
||||||
|
verbs: ["get", "list", "watch", "update"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
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"]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: azurefile-csi-attacher-binding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-azurefile-controller-sa
|
||||||
|
namespace: kube-system
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: azurefile-external-attacher-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: azurefile-cluster-driver-registrar-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["apiextensions.k8s.io"]
|
||||||
|
resources: ["customresourcedefinitions"]
|
||||||
|
verbs: ["create", "list", "watch", "delete"]
|
||||||
|
- apiGroups: ["csi.storage.k8s.io"]
|
||||||
|
resources: ["csidrivers"]
|
||||||
|
verbs: ["create", "delete"]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: azurefile-csi-driver-registrar-binding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-azurefile-controller-sa
|
||||||
|
namespace: kube-system
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: azurefile-cluster-driver-registrar-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: azurefile-external-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: azurefile-csi-snapshotter-binding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-azurefile-controller-sa
|
||||||
|
namespace: kube-system
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: azurefile-external-snapshotter-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
|
||||||
# CSI provisioner.
|
|
||||||
#
|
|
||||||
# In production, each CSI driver deployment has to be customized:
|
|
||||||
# - to avoid conflicts, use non-default namespace and different names
|
|
||||||
# for non-namespaced entities like the ClusterRole
|
|
||||||
# - decide whether the deployment replicates the external CSI
|
|
||||||
# provisioner, in which case leadership election must be enabled;
|
|
||||||
# this influences the RBAC setup, see below
|
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: csi-driver-registrar
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: ClusterRole
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: driver-registrar-runner
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["events"]
|
|
||||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
|
||||||
# The following permissions are only needed when running
|
|
||||||
# driver-registrar without the --kubelet-registration-path
|
|
||||||
# parameter, i.e. when using driver-registrar instead of
|
|
||||||
# kubelet to update the csi.volume.kubernetes.io/nodeid
|
|
||||||
# annotation. That mode of operation is going to be deprecated
|
|
||||||
# and should not be used anymore, but is needed on older
|
|
||||||
# Kubernetes versions.
|
|
||||||
# - apiGroups: [""]
|
|
||||||
# resources: ["nodes"]
|
|
||||||
# verbs: ["get", "update", "patch"]
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-driver-registrar-role
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: csi-driver-registrar
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
kind: ClusterRole
|
|
||||||
name: driver-registrar-runner
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
|
||||||
# CSI provisioner.
|
|
||||||
#
|
|
||||||
# In production, each CSI driver deployment has to be customized:
|
|
||||||
# - to avoid conflicts, use non-default namespace and different names
|
|
||||||
# for non-namespaced entities like the ClusterRole
|
|
||||||
# - decide whether the deployment replicates the external CSI
|
|
||||||
# provisioner, in which case leadership election must be enabled;
|
|
||||||
# this influences the RBAC setup, see below
|
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: csi-provisioner
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: ClusterRole
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: external-provisioner-runner
|
|
||||||
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-provisioner-role
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: csi-provisioner
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
kind: ClusterRole
|
|
||||||
name: external-provisioner-runner
|
|
||||||
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:
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
name: external-provisioner-cfg
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["endpoints"]
|
|
||||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: RoleBinding
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-provisioner-role-cfg
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: csi-provisioner
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
kind: Role
|
|
||||||
name: external-provisioner-cfg
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
# Together with the RBAC file for external-provisioner, this YAML file
|
|
||||||
# contains all RBAC objects that are necessary to run external CSI
|
|
||||||
# snapshotter.
|
|
||||||
#
|
|
||||||
# In production, each CSI driver deployment has to be customized:
|
|
||||||
# - to avoid conflicts, use non-default namespace and different names
|
|
||||||
# for non-namespaced entities like the ClusterRole
|
|
||||||
# - optionally rename the non-namespaced ClusterRole if there
|
|
||||||
# are conflicts with other deployments
|
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: csi-snapshotter
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: ClusterRole
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
# rename if there are conflicts
|
|
||||||
name: external-snapshotter-runner
|
|
||||||
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-snapshotter-role
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: csi-snapshotter
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
kind: ClusterRole
|
|
||||||
# change the name also here if the ClusterRole gets renamed
|
|
||||||
name: external-snapshotter-runner
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
|
|
@ -7,13 +7,8 @@ If you have already installed Helm, you can also use it to install azurefile CSI
|
||||||
```
|
```
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/crd-csi-driver-registry.yaml
|
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/crd-csi-driver-registry.yaml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/crd-csi-node-info.yaml
|
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/crd-csi-node-info.yaml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/rbac-csi-attacher.yaml
|
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/csi-azurefile-controller.yaml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/rbac-csi-driver-registrar.yaml
|
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/csi-azurefile-node.yaml
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/rbac-csi-provisioner.yaml
|
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/rbac-csi-snapshotter.yaml
|
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/csi-azurefile-provisioner.yaml
|
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/csi-azurefile-attacher.yaml
|
|
||||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/azurefile-csi-driver.yaml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- check pods status:
|
- check pods status:
|
||||||
|
|
@ -25,17 +20,17 @@ watch kubectl get po -o wide -n kube-system | grep csi-azurefile
|
||||||
example output:
|
example output:
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME READY STATUS RESTARTS AGE IP NODE
|
NAME READY STATUS RESTARTS AGE IP NODE
|
||||||
csi-azurefile-attacher-0 1/1 Running 0 22h 10.240.0.61 k8s-agentpool-17181929-1
|
csi-azurefile-controller-56bfddd689-dh5tk 6/6 Running 0 35s 10.240.0.19 k8s-agentpool-22533604-0
|
||||||
csi-azurefile-g2ksx 2/2 Running 0 21h 10.240.0.4 k8s-agentpool-17181929-0
|
csi-azurefile-node-cvgbs 3/3 Running 0 7m4s 10.240.0.35 k8s-agentpool-22533604-1
|
||||||
csi-azurefile-nqxn9 2/2 Running 0 21h 10.240.0.35 k8s-agentpool-17181929-1
|
csi-azurefile-node-dr4s4 3/3 Running 0 7m4s 10.240.0.4 k8s-agentpool-22533604-0
|
||||||
csi-azurefile-provisioner-0 1/1 Running 0 22h 10.240.0.39 k8s-agentpool-17181929-1
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- clean up azure file CSI driver
|
- clean up azure file CSI driver
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl delete ds csi-azurefile -n kube-system
|
kubectl delete -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/crd-csi-driver-registry.yaml
|
||||||
kubectl delete sts csi-azurefile-provisioner -n kube-system
|
kubectl delete -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/crd-csi-node-info.yaml
|
||||||
kubectl delete sts csi-azurefile-attacher -n kube-system
|
kubectl delete -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/csi-azurefile-controller.yaml
|
||||||
|
kubectl delete -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/csi-azurefile-node.yaml
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue