mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
storage e2e: use csi-driver-host-path v1.7.2 in single pod
The new default deployment in that release puts sidecars into the same pod as the driver. This is expected to reduce load during testing.
This commit is contained in:
parent
894803ab2e
commit
4acb6a865c
@ -161,12 +161,8 @@ func InitHostPathCSIDriver() storageframework.TestDriver {
|
|||||||
"test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml",
|
"test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml",
|
||||||
"test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml",
|
"test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml",
|
||||||
"test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml",
|
"test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml",
|
||||||
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-attacher.yaml",
|
|
||||||
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-driverinfo.yaml",
|
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-driverinfo.yaml",
|
||||||
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml",
|
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml",
|
||||||
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-provisioner.yaml",
|
|
||||||
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-resizer.yaml",
|
|
||||||
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-snapshotter.yaml",
|
|
||||||
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/e2e-test-rbac.yaml",
|
"test/e2e/testing-manifests/storage-csi/hostpath/hostpath/e2e-test-rbac.yaml",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v3.1.0/deploy/kubernetes//rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v3.2.1/deploy/kubernetes//rbac.yaml
|
||||||
# for csi-driver-host-path v1.6.2
|
# for csi-driver-host-path v1.7.2
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
||||||
#
|
#
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
# This YAML file contains all RBAC objects that are necessary to run external
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.2.0/deploy/kubernetes/external-health-monitor-agent/rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.2.0/deploy/kubernetes/external-health-monitor-agent/rbac.yaml
|
||||||
# for csi-driver-host-path v1.6.2
|
# for csi-driver-host-path v1.7.2
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
||||||
#
|
#
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
# This YAML file contains all RBAC objects that are necessary to run external
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.2.0/deploy/kubernetes/external-health-monitor-controller/rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.3.0/deploy/kubernetes/external-health-monitor-controller/rbac.yaml
|
||||||
# for csi-driver-host-path v1.6.2
|
# for csi-driver-host-path v1.7.2
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
||||||
#
|
#
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
# This YAML file contains all RBAC objects that are necessary to run external
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v2.1.1/deploy/kubernetes//rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v2.2.1/deploy/kubernetes//rbac.yaml
|
||||||
# for csi-driver-host-path v1.6.2
|
# for csi-driver-host-path v1.7.2
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
||||||
#
|
#
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
# This YAML file contains all RBAC objects that are necessary to run external
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.1.0/deploy/kubernetes//rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.2.0/deploy/kubernetes//rbac.yaml
|
||||||
# for csi-driver-host-path v1.6.2
|
# for csi-driver-host-path v1.7.2
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
||||||
#
|
#
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
# This YAML file contains all RBAC objects that are necessary to run external
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v4.0.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v4.1.1/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
|
||||||
# for csi-driver-host-path v1.6.2
|
# for csi-driver-host-path v1.7.2
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
||||||
#
|
#
|
||||||
# Together with the RBAC file for external-provisioner, this YAML file
|
# Together with the RBAC file for external-provisioner, this YAML file
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
The files in this directory are exact copys of "kubernetes-latest" in
|
The files in this directory are exact copys of "kubernetes-latest" in
|
||||||
https://github.com/kubernetes-csi/csi-driver-host-path/tree/v1.6.2/deploy/
|
https://github.com/kubernetes-csi/csi-driver-host-path/tree/v1.7.2/deploy/
|
||||||
|
|
||||||
Do not edit manually. Run test/e2e/testing-manifests/storage-csi/update-hostpath.sh to refresh the content.
|
Do not edit manually. Run test/e2e/testing-manifests/storage-csi/update-hostpath.sh to refresh the content.
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
kind: StatefulSet
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-hostpath-attacher
|
|
||||||
spec:
|
|
||||||
serviceName: "csi-hostpath-attacher"
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: csi-hostpath-attacher
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: csi-hostpath-attacher
|
|
||||||
spec:
|
|
||||||
affinity:
|
|
||||||
podAffinity:
|
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
|
||||||
- labelSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: app
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- csi-hostpathplugin
|
|
||||||
topologyKey: kubernetes.io/hostname
|
|
||||||
serviceAccountName: csi-attacher
|
|
||||||
containers:
|
|
||||||
- name: csi-attacher
|
|
||||||
image: k8s.gcr.io/sig-storage/csi-attacher:v3.1.0
|
|
||||||
args:
|
|
||||||
- --v=5
|
|
||||||
- --csi-address=/csi/csi.sock
|
|
||||||
securityContext:
|
|
||||||
# This is necessary only for systems with SELinux, where
|
|
||||||
# non-privileged sidecar containers cannot access unix domain socket
|
|
||||||
# created by privileged CSI driver container.
|
|
||||||
privileged: true
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /csi
|
|
||||||
name: socket-dir
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- hostPath:
|
|
||||||
path: /var/lib/kubelet/plugins/csi-hostpath
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
name: socket-dir
|
|
@ -2,6 +2,11 @@ apiVersion: storage.k8s.io/v1
|
|||||||
kind: CSIDriver
|
kind: CSIDriver
|
||||||
metadata:
|
metadata:
|
||||||
name: hostpath.csi.k8s.io
|
name: hostpath.csi.k8s.io
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/component: csi-driver
|
||||||
spec:
|
spec:
|
||||||
# Supports persistent and ephemeral inline volumes.
|
# Supports persistent and ephemeral inline volumes.
|
||||||
volumeLifecycleModes:
|
volumeLifecycleModes:
|
||||||
|
@ -1,100 +1,224 @@
|
|||||||
# Service defined here, plus serviceName below in StatefulSet,
|
# All of the individual sidecar RBAC roles get bound
|
||||||
# are needed only because of condition explained in
|
# to this account.
|
||||||
# https://github.com/kubernetes/kubernetes/issues/69608
|
kind: ServiceAccount
|
||||||
|
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: csi-hostpathplugin
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
labels:
|
labels:
|
||||||
app: csi-hostpathplugin
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
spec:
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
selector:
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
app: csi-hostpathplugin
|
app.kubernetes.io/component: serviceaccount
|
||||||
ports:
|
---
|
||||||
- name: dummy
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
port: 12345
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: attacher-cluster-role
|
||||||
|
name: csi-hostpathplugin-attacher-cluster-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: external-attacher-runner
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: health-monitor-controller-cluster-role
|
||||||
|
name: csi-hostpathplugin-health-monitor-controller-cluster-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: external-health-monitor-controller-runner
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: provisioner-cluster-role
|
||||||
|
name: csi-hostpathplugin-provisioner-cluster-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: external-provisioner-runner
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: resizer-cluster-role
|
||||||
|
name: csi-hostpathplugin-resizer-cluster-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: external-resizer-runner
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: snapshotter-cluster-role
|
||||||
|
name: csi-hostpathplugin-snapshotter-cluster-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: external-snapshotter-runner
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: attacher-role
|
||||||
|
name: csi-hostpathplugin-attacher-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: external-attacher-cfg
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: health-monitor-controller-role
|
||||||
|
name: csi-hostpathplugin-health-monitor-controller-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: external-health-monitor-controller-cfg
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: provisioner-role
|
||||||
|
name: csi-hostpathplugin-provisioner-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: external-provisioner-cfg
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: resizer-role
|
||||||
|
name: csi-hostpathplugin-resizer-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: external-resizer-cfg
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: snapshotter-role
|
||||||
|
name: csi-hostpathplugin-snapshotter-role
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: external-snapshotter-leaderelection
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
---
|
---
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: csi-hostpathplugin
|
name: csi-hostpathplugin
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: plugin
|
||||||
spec:
|
spec:
|
||||||
serviceName: "csi-hostpathplugin"
|
serviceName: "csi-hostpathplugin"
|
||||||
# One replica only:
|
# One replica only:
|
||||||
# Host path driver only works when everything runs
|
# Host path driver only works when everything runs
|
||||||
# on a single node. We achieve that by starting it once and then
|
# on a single node.
|
||||||
# co-locate all other pods via inter-pod affinity
|
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: csi-hostpathplugin
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: plugin
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: csi-hostpathplugin
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpathplugin
|
||||||
|
app.kubernetes.io/component: plugin
|
||||||
spec:
|
spec:
|
||||||
serviceAccount: csi-external-health-monitor-controller
|
serviceAccountName: csi-hostpathplugin-sa
|
||||||
containers:
|
containers:
|
||||||
- name: csi-external-health-monitor-agent
|
|
||||||
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-agent:v0.2.0
|
|
||||||
args:
|
|
||||||
- "--v=5"
|
|
||||||
- "--csi-address=$(ADDRESS)"
|
|
||||||
env:
|
|
||||||
- name: NODE_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: spec.nodeName
|
|
||||||
- name: ADDRESS
|
|
||||||
value: /csi/csi.sock
|
|
||||||
imagePullPolicy: "IfNotPresent"
|
|
||||||
volumeMounts:
|
|
||||||
- name: socket-dir
|
|
||||||
mountPath: /csi
|
|
||||||
- name: csi-external-health-monitor-controller
|
|
||||||
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.2.0
|
|
||||||
args:
|
|
||||||
- "--v=5"
|
|
||||||
- "--csi-address=$(ADDRESS)"
|
|
||||||
- "--leader-election"
|
|
||||||
env:
|
|
||||||
- name: ADDRESS
|
|
||||||
value: /csi/csi.sock
|
|
||||||
imagePullPolicy: "IfNotPresent"
|
|
||||||
volumeMounts:
|
|
||||||
- name: socket-dir
|
|
||||||
mountPath: /csi
|
|
||||||
- name: node-driver-registrar
|
|
||||||
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
|
|
||||||
args:
|
|
||||||
- --v=5
|
|
||||||
- --csi-address=/csi/csi.sock
|
|
||||||
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock
|
|
||||||
securityContext:
|
|
||||||
# This is necessary only for systems with SELinux, where
|
|
||||||
# non-privileged sidecar containers cannot access unix domain socket
|
|
||||||
# created by privileged CSI driver container.
|
|
||||||
privileged: true
|
|
||||||
env:
|
|
||||||
- name: KUBE_NODE_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: spec.nodeName
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /csi
|
|
||||||
name: socket-dir
|
|
||||||
- mountPath: /registration
|
|
||||||
name: registration-dir
|
|
||||||
- mountPath: /csi-data-dir
|
|
||||||
name: csi-data-dir
|
|
||||||
|
|
||||||
- name: hostpath
|
- name: hostpath
|
||||||
# WARNING: manually downgraded from 1.6.2 to 1.4.0 because 1.5.x and 1.6.x have
|
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.1
|
||||||
# a bug that causes E2E testing to fail (https://github.com/kubernetes-csi/csi-driver-host-path/pull/210#discussion_r605592438,
|
|
||||||
# https://github.com/kubernetes-csi/csi-driver-host-path/issues/251).
|
|
||||||
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.4.0
|
|
||||||
args:
|
args:
|
||||||
- "--drivername=hostpath.csi.k8s.io"
|
- "--drivername=hostpath.csi.k8s.io"
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
@ -135,15 +259,128 @@ spec:
|
|||||||
name: csi-data-dir
|
name: csi-data-dir
|
||||||
- mountPath: /dev
|
- mountPath: /dev
|
||||||
name: dev-dir
|
name: dev-dir
|
||||||
|
|
||||||
|
- name: csi-external-health-monitor-agent
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-agent:v0.2.0
|
||||||
|
args:
|
||||||
|
- "--v=5"
|
||||||
|
- "--csi-address=$(ADDRESS)"
|
||||||
|
env:
|
||||||
|
- name: NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
- name: csi-external-health-monitor-controller
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.3.0
|
||||||
|
args:
|
||||||
|
- "--v=5"
|
||||||
|
- "--csi-address=$(ADDRESS)"
|
||||||
|
- "--leader-election"
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
|
||||||
|
- name: node-driver-registrar
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.2.0
|
||||||
|
args:
|
||||||
|
- --v=5
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock
|
||||||
|
securityContext:
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
privileged: true
|
||||||
|
env:
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
- mountPath: /registration
|
||||||
|
name: registration-dir
|
||||||
|
- mountPath: /csi-data-dir
|
||||||
|
name: csi-data-dir
|
||||||
|
|
||||||
- name: liveness-probe
|
- name: liveness-probe
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /csi
|
- mountPath: /csi
|
||||||
name: socket-dir
|
name: socket-dir
|
||||||
image: k8s.gcr.io/sig-storage/livenessprobe:v2.2.0
|
image: k8s.gcr.io/sig-storage/livenessprobe:v2.3.0
|
||||||
args:
|
args:
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
- --health-port=9898
|
- --health-port=9898
|
||||||
|
|
||||||
|
- name: csi-attacher
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-attacher:v3.2.1
|
||||||
|
args:
|
||||||
|
- --v=5
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
securityContext:
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
|
||||||
|
- name: csi-provisioner
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.1
|
||||||
|
args:
|
||||||
|
- -v=5
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
- --feature-gates=Topology=true
|
||||||
|
securityContext:
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
|
||||||
|
- name: csi-resizer
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
|
||||||
|
args:
|
||||||
|
- -v=5
|
||||||
|
- -csi-address=/csi/csi.sock
|
||||||
|
securityContext:
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
|
||||||
|
- name: csi-snapshotter
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.1.1
|
||||||
|
args:
|
||||||
|
- -v=5
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
securityContext:
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- hostPath:
|
- hostPath:
|
||||||
path: /var/lib/kubelet/plugins/csi-hostpath
|
path: /var/lib/kubelet/plugins/csi-hostpath
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
kind: StatefulSet
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-hostpath-provisioner
|
|
||||||
spec:
|
|
||||||
serviceName: "csi-hostpath-provisioner"
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: csi-hostpath-provisioner
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: csi-hostpath-provisioner
|
|
||||||
spec:
|
|
||||||
affinity:
|
|
||||||
podAffinity:
|
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
|
||||||
- labelSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: app
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- csi-hostpathplugin
|
|
||||||
topologyKey: kubernetes.io/hostname
|
|
||||||
serviceAccountName: csi-provisioner
|
|
||||||
containers:
|
|
||||||
- name: csi-provisioner
|
|
||||||
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.1.1
|
|
||||||
args:
|
|
||||||
- -v=5
|
|
||||||
- --csi-address=/csi/csi.sock
|
|
||||||
- --feature-gates=Topology=true
|
|
||||||
securityContext:
|
|
||||||
# This is necessary only for systems with SELinux, where
|
|
||||||
# non-privileged sidecar containers cannot access unix domain socket
|
|
||||||
# created by privileged CSI driver container.
|
|
||||||
privileged: true
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /csi
|
|
||||||
name: socket-dir
|
|
||||||
volumes:
|
|
||||||
- hostPath:
|
|
||||||
path: /var/lib/kubelet/plugins/csi-hostpath
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
name: socket-dir
|
|
@ -1,45 +0,0 @@
|
|||||||
kind: StatefulSet
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-hostpath-resizer
|
|
||||||
spec:
|
|
||||||
serviceName: "csi-hostpath-resizer"
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: csi-hostpath-resizer
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: csi-hostpath-resizer
|
|
||||||
spec:
|
|
||||||
affinity:
|
|
||||||
podAffinity:
|
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
|
||||||
- labelSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: app
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- csi-hostpathplugin
|
|
||||||
topologyKey: kubernetes.io/hostname
|
|
||||||
serviceAccountName: csi-resizer
|
|
||||||
containers:
|
|
||||||
- name: csi-resizer
|
|
||||||
image: k8s.gcr.io/sig-storage/csi-resizer:v1.1.0
|
|
||||||
args:
|
|
||||||
- -v=5
|
|
||||||
- -csi-address=/csi/csi.sock
|
|
||||||
securityContext:
|
|
||||||
# This is necessary only for systems with SELinux, where
|
|
||||||
# non-privileged sidecar containers cannot access unix domain socket
|
|
||||||
# created by privileged CSI driver container.
|
|
||||||
privileged: true
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /csi
|
|
||||||
name: socket-dir
|
|
||||||
volumes:
|
|
||||||
- hostPath:
|
|
||||||
path: /var/lib/kubelet/plugins/csi-hostpath
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
name: socket-dir
|
|
@ -0,0 +1,13 @@
|
|||||||
|
# Usage of the v1 API implies that the cluster must have
|
||||||
|
# external-snapshotter v4.x installed.
|
||||||
|
apiVersion: snapshot.storage.k8s.io/v1
|
||||||
|
kind: VolumeSnapshotClass
|
||||||
|
metadata:
|
||||||
|
name: csi-hostpath-snapclass
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpath-snapclass
|
||||||
|
app.kubernetes.io/component: volumesnapshotclass
|
||||||
|
driver: hostpath.csi.k8s.io #csi-hostpath
|
||||||
|
deletionPolicy: Delete
|
@ -1,45 +0,0 @@
|
|||||||
kind: StatefulSet
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-hostpath-snapshotter
|
|
||||||
spec:
|
|
||||||
serviceName: "csi-hostpath-snapshotter"
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: csi-hostpath-snapshotter
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: csi-hostpath-snapshotter
|
|
||||||
spec:
|
|
||||||
affinity:
|
|
||||||
podAffinity:
|
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
|
||||||
- labelSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: app
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- csi-hostpathplugin
|
|
||||||
topologyKey: kubernetes.io/hostname
|
|
||||||
serviceAccount: csi-snapshotter
|
|
||||||
containers:
|
|
||||||
- name: csi-snapshotter
|
|
||||||
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.0.0
|
|
||||||
args:
|
|
||||||
- -v=5
|
|
||||||
- --csi-address=/csi/csi.sock
|
|
||||||
securityContext:
|
|
||||||
# This is necessary only for systems with SELinux, where
|
|
||||||
# non-privileged sidecar containers cannot access unix domain socket
|
|
||||||
# created by privileged CSI driver container.
|
|
||||||
privileged: true
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /csi
|
|
||||||
name: socket-dir
|
|
||||||
volumes:
|
|
||||||
- hostPath:
|
|
||||||
path: /var/lib/kubelet/plugins/csi-hostpath
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
name: socket-dir
|
|
@ -11,10 +11,18 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: hostpath-service
|
name: hostpath-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpath-socat
|
||||||
|
app.kubernetes.io/component: socat
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: NodePort
|
||||||
selector:
|
selector:
|
||||||
app: csi-hostpath-socat
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpath-socat
|
||||||
|
app.kubernetes.io/component: socat
|
||||||
ports:
|
ports:
|
||||||
- port: 10000 # fixed port inside the pod, dynamically allocated port outside
|
- port: 10000 # fixed port inside the pod, dynamically allocated port outside
|
||||||
---
|
---
|
||||||
@ -22,26 +30,37 @@ kind: StatefulSet
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: csi-hostpath-socat
|
name: csi-hostpath-socat
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpath-socat
|
||||||
|
app.kubernetes.io/component: socat
|
||||||
spec:
|
spec:
|
||||||
serviceName: "csi-hostpath-socat"
|
serviceName: "csi-hostpath-socat"
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: csi-hostpath-socat
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpath-socat
|
||||||
|
app.kubernetes.io/component: socat
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: csi-hostpath-socat
|
app.kubernetes.io/instance: hostpath.csi.k8s.io
|
||||||
|
app.kubernetes.io/part-of: csi-driver-host-path
|
||||||
|
app.kubernetes.io/name: csi-hostpath-socat
|
||||||
|
app.kubernetes.io/component: socat
|
||||||
spec:
|
spec:
|
||||||
affinity:
|
affinity:
|
||||||
podAffinity:
|
podAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
- labelSelector:
|
- labelSelector:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
- key: app
|
- key: app.kubernetes.io/instance
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- csi-hostpathplugin
|
- hostpath.csi.k8s.io
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
containers:
|
containers:
|
||||||
- name: socat
|
- name: socat
|
||||||
|
@ -4,6 +4,9 @@ apiVersion: rbac.authorization.k8s.io/v1
|
|||||||
metadata:
|
metadata:
|
||||||
name: psp-csi-hostpath-role
|
name: psp-csi-hostpath-role
|
||||||
subjects:
|
subjects:
|
||||||
|
# This list of ServiceAccount intentionally covers everything that might
|
||||||
|
# be needed. In practice, only some of these accounts are actually
|
||||||
|
# used.
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: csi-attacher
|
name: csi-attacher
|
||||||
namespace: default
|
namespace: default
|
||||||
@ -19,6 +22,9 @@ subjects:
|
|||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: csi-external-health-monitor-controller
|
name: csi-external-health-monitor-controller
|
||||||
namespace: default
|
namespace: default
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: e2e-test-privileged-psp
|
name: e2e-test-privileged-psp
|
||||||
|
@ -60,6 +60,9 @@ apiVersion: rbac.authorization.k8s.io/v1
|
|||||||
metadata:
|
metadata:
|
||||||
name: psp-csi-hostpath-role
|
name: psp-csi-hostpath-role
|
||||||
subjects:
|
subjects:
|
||||||
|
# This list of ServiceAccount intentionally covers everything that might
|
||||||
|
# be needed. In practice, only some of these accounts are actually
|
||||||
|
# used.
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: csi-attacher
|
name: csi-attacher
|
||||||
namespace: default
|
namespace: default
|
||||||
@ -75,6 +78,9 @@ subjects:
|
|||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: csi-external-health-monitor-controller
|
name: csi-external-health-monitor-controller
|
||||||
namespace: default
|
namespace: default
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-hostpathplugin-sa
|
||||||
|
namespace: default
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: e2e-test-privileged-psp
|
name: e2e-test-privileged-psp
|
||||||
|
Loading…
Reference in New Issue
Block a user