Initial render: k3s-dev environment
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
name: csi-nfs-node
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: csi-nfs-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: csi-nfs-node
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- --csi-address=/csi/csi.sock
|
||||
- --probe-timeout=3s
|
||||
- --http-endpoint=localhost:29653
|
||||
- --v=2
|
||||
image: registry.k8s.io/sig-storage/livenessprobe:v2.13.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: liveness-probe
|
||||
resources:
|
||||
limits:
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
- args:
|
||||
- --v=2
|
||||
- --csi-address=/csi/csi.sock
|
||||
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
||||
env:
|
||||
- name: DRIVER_REG_SOCK_PATH
|
||||
value: /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.11.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /csi-node-driver-registrar
|
||||
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
||||
- --mode=kubelet-registration-probe
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 15
|
||||
name: node-driver-registrar
|
||||
resources:
|
||||
limits:
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
- mountPath: /registration
|
||||
name: registration-dir
|
||||
- args:
|
||||
- --v=5
|
||||
- --nodeid=$(NODE_ID)
|
||||
- --endpoint=$(CSI_ENDPOINT)
|
||||
- --drivername=nfs.csi.k8s.io
|
||||
- --mount-permissions=0
|
||||
env:
|
||||
- name: NODE_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
image: registry.k8s.io/sig-storage/nfsplugin:v4.9.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
host: localhost
|
||||
path: /healthz
|
||||
port: 29653
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
name: nfs
|
||||
resources:
|
||||
limits:
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
capabilities:
|
||||
add:
|
||||
- SYS_ADMIN
|
||||
drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
- mountPath: /var/lib/kubelet/pods
|
||||
mountPropagation: Bidirectional
|
||||
name: pods-mount-dir
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
priorityClassName: system-cluster-critical
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
serviceAccountName: csi-nfs-node-sa
|
||||
tolerations:
|
||||
- operator: Exists
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /var/lib/kubelet/plugins/csi-nfsplugin
|
||||
type: DirectoryOrCreate
|
||||
name: socket-dir
|
||||
- hostPath:
|
||||
path: /var/lib/kubelet/pods
|
||||
type: Directory
|
||||
name: pods-mount-dir
|
||||
- hostPath:
|
||||
path: /var/lib/kubelet/plugins_registry
|
||||
type: Directory
|
||||
name: registration-dir
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
||||
@@ -0,0 +1,177 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
name: csi-nfs-controller
|
||||
namespace: kube-system
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: csi-nfs-controller
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: csi-nfs-controller
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- -v=2
|
||||
- --csi-address=$(ADDRESS)
|
||||
- --leader-election
|
||||
- --leader-election-namespace=kube-system
|
||||
- --extra-create-metadata=true
|
||||
- --feature-gates=HonorPVReclaimPolicy=true
|
||||
- --timeout=1200s
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
image: registry.k8s.io/sig-storage/csi-provisioner:v5.0.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: csi-provisioner
|
||||
resources:
|
||||
limits:
|
||||
memory: 400Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
- args:
|
||||
- --v=2
|
||||
- --csi-address=$(ADDRESS)
|
||||
- --leader-election-namespace=kube-system
|
||||
- --leader-election
|
||||
- --timeout=1200s
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
image: registry.k8s.io/sig-storage/csi-snapshotter:v8.0.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: csi-snapshotter
|
||||
resources:
|
||||
limits:
|
||||
memory: 200Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
- args:
|
||||
- --csi-address=/csi/csi.sock
|
||||
- --probe-timeout=3s
|
||||
- --http-endpoint=localhost:29652
|
||||
- --v=2
|
||||
image: registry.k8s.io/sig-storage/livenessprobe:v2.13.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: liveness-probe
|
||||
resources:
|
||||
limits:
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
- args:
|
||||
- --v=5
|
||||
- --nodeid=$(NODE_ID)
|
||||
- --endpoint=$(CSI_ENDPOINT)
|
||||
- --drivername=nfs.csi.k8s.io
|
||||
- --mount-permissions=0
|
||||
- --working-mount-dir=/tmp
|
||||
- --default-ondelete-policy=delete
|
||||
env:
|
||||
- name: NODE_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
image: registry.k8s.io/sig-storage/nfsplugin:v4.9.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
host: localhost
|
||||
path: /healthz
|
||||
port: 29652
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
name: nfs
|
||||
resources:
|
||||
limits:
|
||||
memory: 200Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
capabilities:
|
||||
add:
|
||||
- SYS_ADMIN
|
||||
drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/kubelet/pods
|
||||
mountPropagation: Bidirectional
|
||||
name: pods-mount-dir
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
hostNetwork: true
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
priorityClassName: system-cluster-critical
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
serviceAccountName: csi-nfs-controller-sa
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/controlplane
|
||||
operator: Exists
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /var/lib/kubelet/pods
|
||||
type: Directory
|
||||
name: pods-mount-dir
|
||||
- emptyDir: {}
|
||||
name: socket-dir
|
||||
@@ -0,0 +1,110 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
name: nfs-external-provisioner-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- storageclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- snapshot.storage.k8s.io
|
||||
resources:
|
||||
- volumesnapshotclasses
|
||||
- volumesnapshots
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- snapshot.storage.k8s.io
|
||||
resources:
|
||||
- volumesnapshotcontents
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- snapshot.storage.k8s.io
|
||||
resources:
|
||||
- volumesnapshotcontents/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
- 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
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
name: nfs-csi-provisioner-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: nfs-external-provisioner-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-nfs-controller-sa
|
||||
namespace: kube-system
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: nfs.csi.k8s.io
|
||||
spec:
|
||||
attachRequired: false
|
||||
fsGroupPolicy: File
|
||||
volumeLifecycleModes:
|
||||
- Persistent
|
||||
@@ -0,0 +1,17 @@
|
||||
allowVolumeExpansion: false
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: local-nfs
|
||||
mountOptions:
|
||||
- nfsvers=4.1
|
||||
- hard
|
||||
- timeo=600
|
||||
- retrans=2
|
||||
parameters:
|
||||
server: 127.0.0.1
|
||||
share: /mnt/data/nfs
|
||||
subDir: ${pvc.metadata.namespace}-${pvc.metadata.name}
|
||||
provisioner: nfs.csi.k8s.io
|
||||
reclaimPolicy: Delete
|
||||
volumeBindingMode: Immediate
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
name: csi-nfs-controller-sa
|
||||
namespace: kube-system
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: csi-driver-nfs
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: csi-driver-nfs
|
||||
app.kubernetes.io/version: v4.9.0
|
||||
helm.sh/chart: csi-driver-nfs-v4.9.0
|
||||
name: csi-nfs-node-sa
|
||||
namespace: kube-system
|
||||
Reference in New Issue
Block a user