mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Merge pull request #106791 from pohly/replace-mock-driver
storage e2e: replace mock driver, update images
This commit is contained in:
commit
7f24f8c1a2
@ -618,10 +618,10 @@ func (m *mockCSIDriver) PrepareTest(f *framework.Framework) (*storageframework.P
|
|||||||
} else {
|
} else {
|
||||||
// When using the mock driver inside the cluster it has to be reconfigured
|
// When using the mock driver inside the cluster it has to be reconfigured
|
||||||
// via command line parameters.
|
// via command line parameters.
|
||||||
containerArgs = append(containerArgs, "--name=csi-mock-"+f.UniqueName)
|
containerArgs = append(containerArgs, "--drivername=csi-mock-"+f.UniqueName)
|
||||||
|
|
||||||
if !m.attachable {
|
if m.attachable {
|
||||||
containerArgs = append(containerArgs, "--disable-attach")
|
containerArgs = append(containerArgs, "--enable-attach")
|
||||||
}
|
}
|
||||||
|
|
||||||
if m.enableTopology {
|
if m.enableTopology {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v3.2.1/deploy/kubernetes//rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v3.3.0/deploy/kubernetes//rbac.yaml
|
||||||
# for csi-driver-host-path v1.7.2
|
# for csi-driver-host-path v1.7.3
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by ./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
|
||||||
# CSI attacher.
|
# CSI attacher.
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
# 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.7.2
|
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
|
||||||
#
|
|
||||||
# This YAML file contains all RBAC objects that are necessary to run external
|
|
||||||
# CSI health monitor agent.
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# health monitor agent, in which case leadership election must be enabled;
|
|
||||||
# this influences the RBAC setup, see below
|
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: csi-external-health-monitor-agent
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: default
|
|
||||||
|
|
||||||
---
|
|
||||||
# Health monitor agent must be able to work with PVs, PVCs, Nodes and Pods
|
|
||||||
kind: ClusterRole
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: external-health-monitor-agent-runner
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["persistentvolumes"]
|
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["persistentvolumeclaims"]
|
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["pods"]
|
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["events"]
|
|
||||||
verbs: ["get", "list", "watch", "create", "patch"]
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: csi-external-health-monitor-agent-role
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: csi-external-health-monitor-agent
|
|
||||||
# replace with non-default namespace name
|
|
||||||
namespace: default
|
|
||||||
roleRef:
|
|
||||||
kind: ClusterRole
|
|
||||||
name: external-health-monitor-agent-runner
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
# 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
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.4.0/deploy/kubernetes/external-health-monitor-controller/rbac.yaml
|
||||||
# for csi-driver-host-path v1.7.2
|
# for csi-driver-host-path v1.7.3
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by ./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
|
||||||
# CSI health monitor controller.
|
# CSI health monitor controller.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v2.2.1/deploy/kubernetes//rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v3.0.0/deploy/kubernetes//rbac.yaml
|
||||||
# for csi-driver-host-path v1.7.2
|
# for csi-driver-host-path v1.7.3
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by ./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
|
||||||
# CSI provisioner.
|
# CSI provisioner.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.2.0/deploy/kubernetes//rbac.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.3.0/deploy/kubernetes//rbac.yaml
|
||||||
# for csi-driver-host-path v1.7.2
|
# for csi-driver-host-path v1.7.3
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by ./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
|
||||||
# CSI resizer.
|
# CSI resizer.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v4.1.1/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
|
# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v5.0.0-rc1/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
|
||||||
# for csi-driver-host-path v1.7.2
|
# for csi-driver-host-path master
|
||||||
# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh
|
# by ./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
|
||||||
# contains all RBAC objects that are necessary to run external CSI
|
# contains all RBAC objects that are necessary to run external CSI
|
||||||
@ -39,10 +39,10 @@ rules:
|
|||||||
verbs: ["get", "list", "watch"]
|
verbs: ["get", "list", "watch"]
|
||||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||||
resources: ["volumesnapshotcontents"]
|
resources: ["volumesnapshotcontents"]
|
||||||
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
verbs: ["create", "get", "list", "watch", "update", "delete", "patch"]
|
||||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||||
resources: ["volumesnapshotcontents/status"]
|
resources: ["volumesnapshotcontents/status"]
|
||||||
verbs: ["update"]
|
verbs: ["update", "patch"]
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
|
@ -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.7.2/deploy/
|
https://github.com/kubernetes-csi/csi-driver-host-path/tree/v1.7.3/deploy/
|
||||||
|
|
||||||
Do not edit manually. Run test/e2e/testing-manifests/storage-csi/update-hostpath.sh to refresh the content.
|
Do not edit manually. Run ./update-hostpath.sh to refresh the content.
|
||||||
|
@ -218,7 +218,7 @@ spec:
|
|||||||
serviceAccountName: csi-hostpathplugin-sa
|
serviceAccountName: csi-hostpathplugin-sa
|
||||||
containers:
|
containers:
|
||||||
- name: hostpath
|
- name: hostpath
|
||||||
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.1
|
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3
|
||||||
args:
|
args:
|
||||||
- "--drivername=hostpath.csi.k8s.io"
|
- "--drivername=hostpath.csi.k8s.io"
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
@ -260,24 +260,8 @@ spec:
|
|||||||
- 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
|
- name: csi-external-health-monitor-controller
|
||||||
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.3.0
|
image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.4.0
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
@ -291,7 +275,7 @@ spec:
|
|||||||
mountPath: /csi
|
mountPath: /csi
|
||||||
|
|
||||||
- name: node-driver-registrar
|
- name: node-driver-registrar
|
||||||
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.2.0
|
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0
|
||||||
args:
|
args:
|
||||||
- --v=5
|
- --v=5
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
@ -325,7 +309,7 @@ spec:
|
|||||||
- --health-port=9898
|
- --health-port=9898
|
||||||
|
|
||||||
- name: csi-attacher
|
- name: csi-attacher
|
||||||
image: k8s.gcr.io/sig-storage/csi-attacher:v3.2.1
|
image: k8s.gcr.io/sig-storage/csi-attacher:v3.3.0
|
||||||
args:
|
args:
|
||||||
- --v=5
|
- --v=5
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
@ -339,7 +323,7 @@ spec:
|
|||||||
name: socket-dir
|
name: socket-dir
|
||||||
|
|
||||||
- name: csi-provisioner
|
- name: csi-provisioner
|
||||||
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.1
|
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0
|
||||||
args:
|
args:
|
||||||
- -v=5
|
- -v=5
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
@ -354,7 +338,7 @@ spec:
|
|||||||
name: socket-dir
|
name: socket-dir
|
||||||
|
|
||||||
- name: csi-resizer
|
- name: csi-resizer
|
||||||
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
|
image: k8s.gcr.io/sig-storage/csi-resizer:v1.3.0
|
||||||
args:
|
args:
|
||||||
- -v=5
|
- -v=5
|
||||||
- -csi-address=/csi/csi.sock
|
- -csi-address=/csi/csi.sock
|
||||||
@ -368,7 +352,7 @@ spec:
|
|||||||
name: socket-dir
|
name: socket-dir
|
||||||
|
|
||||||
- name: csi-snapshotter
|
- name: csi-snapshotter
|
||||||
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.1.1
|
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1
|
||||||
args:
|
args:
|
||||||
- -v=5
|
- -v=5
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
|
@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: csi-mock
|
serviceAccountName: csi-mock
|
||||||
containers:
|
containers:
|
||||||
- name: csi-attacher
|
- name: csi-attacher
|
||||||
image: k8s.gcr.io/sig-storage/csi-attacher:v3.2.0
|
image: k8s.gcr.io/sig-storage/csi-attacher:v3.3.0
|
||||||
args:
|
args:
|
||||||
- --v=5
|
- --v=5
|
||||||
- --csi-address=$(ADDRESS)
|
- --csi-address=$(ADDRESS)
|
||||||
|
@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: csi-mock
|
serviceAccountName: csi-mock
|
||||||
containers:
|
containers:
|
||||||
- name: csi-resizer
|
- name: csi-resizer
|
||||||
image: k8s.gcr.io/sig-storage/csi-resizer:v1.1.0
|
image: k8s.gcr.io/sig-storage/csi-resizer:v1.3.0
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
|
@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: csi-mock
|
serviceAccountName: csi-mock
|
||||||
containers:
|
containers:
|
||||||
- name: csi-snapshotter
|
- name: csi-snapshotter
|
||||||
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.0.0
|
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
|
@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: csi-mock
|
serviceAccountName: csi-mock
|
||||||
containers:
|
containers:
|
||||||
- name: csi-provisioner
|
- name: csi-provisioner
|
||||||
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.0
|
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
# Topology support is needed for the pod rescheduling test
|
# Topology support is needed for the pod rescheduling test
|
||||||
@ -34,7 +34,7 @@ spec:
|
|||||||
- mountPath: /csi
|
- mountPath: /csi
|
||||||
name: socket-dir
|
name: socket-dir
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0
|
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0
|
||||||
args:
|
args:
|
||||||
- --v=5
|
- --v=5
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
@ -53,10 +53,13 @@ spec:
|
|||||||
- mountPath: /registration
|
- mountPath: /registration
|
||||||
name: registration-dir
|
name: registration-dir
|
||||||
- name: mock
|
- name: mock
|
||||||
image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0
|
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3
|
||||||
args:
|
args:
|
||||||
- "--name=mock.storage.k8s.io"
|
- "--drivername=mock.storage.k8s.io"
|
||||||
- "-v=3" # enabled the gRPC call logging
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
||||||
|
- "--endpoint=/csi/csi.sock"
|
||||||
|
- "--statedir=/tmp/csi-hotpath-data"
|
||||||
|
- "-v=5" # enabled the gRPC call logging
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: /csi/csi.sock
|
value: /csi/csi.sock
|
||||||
@ -74,6 +77,8 @@ spec:
|
|||||||
name: kubelet-pods-dir
|
name: kubelet-pods-dir
|
||||||
- mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
|
- mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
|
||||||
name: kubelet-csi-dir
|
name: kubelet-csi-dir
|
||||||
|
- mountPath: /dev
|
||||||
|
name: dev-dir
|
||||||
volumes:
|
volumes:
|
||||||
- hostPath:
|
- hostPath:
|
||||||
path: /var/lib/kubelet/plugins/csi-mock
|
path: /var/lib/kubelet/plugins/csi-mock
|
||||||
@ -93,3 +98,7 @@ spec:
|
|||||||
path: /var/lib/kubelet/plugins_registry
|
path: /var/lib/kubelet/plugins_registry
|
||||||
type: Directory
|
type: Directory
|
||||||
name: registration-dir
|
name: registration-dir
|
||||||
|
- hostPath:
|
||||||
|
path: /dev
|
||||||
|
type: Directory
|
||||||
|
name: dev-dir
|
||||||
|
@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: csi-mock
|
serviceAccountName: csi-mock
|
||||||
containers:
|
containers:
|
||||||
- name: csi-provisioner
|
- name: csi-provisioner
|
||||||
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.0
|
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
# Topology support is needed for the pod rescheduling test
|
# Topology support is needed for the pod rescheduling test
|
||||||
@ -35,7 +35,7 @@ spec:
|
|||||||
- mountPath: /csi
|
- mountPath: /csi
|
||||||
name: socket-dir
|
name: socket-dir
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0
|
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0
|
||||||
args:
|
args:
|
||||||
- --v=5
|
- --v=5
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
@ -53,16 +53,20 @@ spec:
|
|||||||
- mountPath: /registration
|
- mountPath: /registration
|
||||||
name: registration-dir
|
name: registration-dir
|
||||||
- name: mock
|
- name: mock
|
||||||
image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0
|
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3
|
||||||
args:
|
args:
|
||||||
# -v3 shows when connections get established. Higher log levels print information about
|
- -v=5
|
||||||
# transferred bytes, but cannot print message content (no gRPC parsing), so this is usually
|
- -nodeid=$(KUBE_NODE_NAME)
|
||||||
# not interesting.
|
- -endpoint=/csi/csi.sock
|
||||||
- -v=3
|
|
||||||
- -proxy-endpoint=tcp://:9000
|
- -proxy-endpoint=tcp://:9000
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: /csi/csi.sock
|
value: /csi/csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 9000
|
- containerPort: 9000
|
||||||
name: socat
|
name: socat
|
||||||
|
@ -132,3 +132,10 @@ for image in $images; do
|
|||||||
esac
|
esac
|
||||||
download "$project" "$path" "$tag" "$rbac"
|
download "$project" "$path" "$tag" "$rbac"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Update the mock driver manifests, too.
|
||||||
|
grep -r image: hostpath/hostpath/csi-hostpath-plugin.yaml | while read -r image; do
|
||||||
|
version=$(echo "$image" | sed -e 's/.*:\(.*\)/\1/')
|
||||||
|
image=$(echo "$image" | sed -e 's/.*image: \([^:]*\).*/\1/')
|
||||||
|
sed -i -e "s;$image:.*;$image:$version;" mock/*.yaml
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user