Files
terraform-talos/scaleway/deployments/scaleway-csi-node.yaml
Serge Logvinov 9e77102e15 update talos
Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2022-12-20 14:35:03 +02:00

135 lines
3.7 KiB
YAML

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: scaleway-csi-node
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: scaleway-csi-node-driver-registrar
namespace: kube-system
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: scaleway-csi-node-driver-registrar
subjects:
- kind: ServiceAccount
name: scaleway-csi-node
namespace: kube-system
roleRef:
kind: ClusterRole
name: scaleway-csi-node-driver-registrar
apiGroup: rbac.authorization.k8s.io
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: scaleway-csi-node
namespace: kube-system
labels:
spec:
selector:
matchLabels:
app: scaleway-csi-node
template:
metadata:
labels:
app: scaleway-csi-node
role: csi
spec:
hostNetwork: true
dnsPolicy: Default
serviceAccount: scaleway-csi-node
priorityClassName: system-node-critical
nodeSelector:
kubernetes.io/os: linux
node.cloudprovider.kubernetes.io/platform: scaleway
tolerations:
- effect: NoSchedule
operator: Exists
containers:
- name: scaleway-csi-plugin
image: scaleway/scaleway-csi:v0.1.7
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--v=4"
- "--mode=node"
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
securityContext:
privileged: true
ports:
- name: healthz
containerPort: 9808
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
failureThreshold: 5
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: kubelet-dir
mountPath: /var/lib/kubelet
mountPropagation: "Bidirectional"
- name: device-dir
mountPath: /dev
- name: csi-node-driver-registrar
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
args:
- "--v=2"
- "--csi-address=$(CSI_ADDRESS)"
- "--kubelet-registration-path=$(KUBELET_REGISTRATION_PATH)"
env:
- name: CSI_ADDRESS
value: /csi/csi.sock
- name: KUBELET_REGISTRATION_PATH
value: /var/lib/kubelet/plugins/csi.scaleway.com/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: plugin-dir
mountPath: /csi/
- name: registration-dir
mountPath: /registration/
- name: liveness-probe
image: k8s.gcr.io/sig-storage/livenessprobe:v2.2.0
args:
- "--csi-address=$(CSI_ADDRESS)"
env:
- name: CSI_ADDRESS
value: /csi/csi.sock
volumeMounts:
- name: plugin-dir
mountPath: /csi
volumes:
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
type: DirectoryOrCreate
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/csi.scaleway.com
type: DirectoryOrCreate
- name: kubelet-dir
hostPath:
path: /var/lib/kubelet
type: Directory
- name: device-dir
hostPath:
path: /dev