mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-21 16:57:08 +00:00
tests: Add k8s-volume test
This imports the k8s-volume test from the tests repo and modifies it slightly to set up the host volume on the AKS host. Fixes: #6566 Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
kind: Pod
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pv-pod
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
runtimeClassName: kata
|
||||
volumes:
|
||||
- name: pv-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: pv-claim
|
||||
containers:
|
||||
- name: pv-container
|
||||
image: quay.io/prometheus/busybox:latest
|
||||
ports:
|
||||
command:
|
||||
- sleep
|
||||
- "120"
|
||||
volumeMounts:
|
||||
- mountPath: "/mnt/"
|
||||
name: pv-storage
|
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
kind: PersistentVolume
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pv-volume
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "tmp_data"
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pv-claim
|
||||
spec:
|
||||
storageClassName: manual
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 3Gi
|
Reference in New Issue
Block a user