k8s.io/kubernetes@v1.31.0-alpha.0.0.20240520171757-56147500dadc/test/e2e/testing-manifests/dra/dra-test-driver-proxy.yaml (about) 1 # This YAML file deploys the csi-driver-host-path on a number of nodes such 2 # that it proxies all connections from kubelet (plugin registration and dynamic 3 # resource allocation). The actual handling of those connections then happens 4 # inside the e2e.test binary via test/e2e/storage/drivers/proxy. This approach 5 # has the advantage that no separate container image with the test driver is 6 # needed and that tests have full control over the driver, for example for 7 # error injection. 8 # 9 # The csi-driver-host-path image is used because: 10 # - it has the necessary proxy mode (https://github.com/kubernetes-csi/csi-driver-host-path/commit/65480fc74d550a9a5aa81e850955cc20403857b1) 11 # - its base image contains a shell (useful for creating files) 12 # - the image is already a dependency of e2e.test 13 14 kind: ReplicaSet 15 apiVersion: apps/v1 16 metadata: 17 name: dra-test-driver 18 labels: 19 app.kubernetes.io/instance: test-driver.dra.k8s.io 20 app.kubernetes.io/part-of: dra-test-driver 21 app.kubernetes.io/name: dra-test-driver-kubelet-plugin 22 app.kubernetes.io/component: kubelet-plugin 23 spec: 24 selector: 25 matchLabels: 26 app.kubernetes.io/instance: test-driver.dra.k8s.io 27 app.kubernetes.io/part-of: dra-test-driver 28 app.kubernetes.io/name: dra-test-driver-kubelet-plugin 29 app.kubernetes.io/component: kubelet-plugin 30 replicas: 1 31 template: 32 metadata: 33 labels: 34 app.kubernetes.io/instance: test-driver.dra.k8s.io 35 app.kubernetes.io/part-of: dra-test-driver 36 app.kubernetes.io/name: dra-test-driver-kubelet-plugin 37 app.kubernetes.io/component: kubelet-plugin 38 spec: 39 # Ensure that all pods run on distinct nodes. 40 affinity: 41 podAntiAffinity: 42 requiredDuringSchedulingIgnoredDuringExecution: 43 - labelSelector: 44 matchLabels: 45 app.kubernetes.io/instance: test-driver.dra.k8s.io 46 topologyKey: kubernetes.io/hostname 47 48 containers: 49 - name: registrar 50 image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3 51 args: 52 - "--v=5" 53 - "--endpoint=/plugins_registry/dra-test-driver-reg.sock" 54 - "--proxy-endpoint=tcp://:9000" 55 volumeMounts: 56 - mountPath: /plugins_registry 57 name: registration-dir 58 59 - name: plugin 60 image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3 61 args: 62 - "--v=5" 63 - "--endpoint=/dra/dra-test-driver.sock" 64 - "--proxy-endpoint=tcp://:9001" 65 securityContext: 66 privileged: true 67 volumeMounts: 68 - mountPath: /dra 69 name: socket-dir 70 - mountPath: /cdi 71 name: cdi-dir 72 73 volumes: 74 - hostPath: 75 path: /var/lib/kubelet/plugins 76 type: DirectoryOrCreate 77 name: socket-dir 78 - hostPath: 79 path: /var/run/cdi 80 type: DirectoryOrCreate 81 name: cdi-dir 82 - hostPath: 83 path: /var/lib/kubelet/plugins_registry 84 type: DirectoryOrCreate 85 name: registration-dir