Prepare scripts and scenarios to use in MOSK testing of Kubernetes
Related-PROD: PROD-36128
Change-Id: I0d9145045c2a95e34966519157e9c7200bea4e3e
diff --git a/k8s/k8s-mos-scenarios.yaml b/k8s/k8s-mos-scenarios.yaml
new file mode 100644
index 0000000..eaf62dd
--- /dev/null
+++ b/k8s/k8s-mos-scenarios.yaml
@@ -0,0 +1,120 @@
+{% set image_box = "busybox" %}
+{% set image_pause = "mirantis.azurecr.io/general/external/pause:3.1" %}
+{% set image_cirros = "virtlet/download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img" %}
+{% set concurrency = 1 %}
+{% set times = 1 %}
+{% set replicas = 1 %}
+{% set replicas_scaled = 2 %}
+{% set namespaces = 1 %}
+
+
+---
+version: 2
+title: MOS Kubenetes performance checks
+subtasks:
+- title: Run a single workload with listing existing kubernetes namespaces
+ scenario:
+ Kubernetes.list_namespaces: {}
+ runner:
+ constant:
+ concurrency: {{concurrency}}
+ times: {{times}}
+- title: Run a single workload with create/read/delete namespace
+ scenario:
+ Kubernetes.create_and_delete_namespace: {}
+ runner:
+ constant:
+ concurrency: {{concurrency}}
+ times: {{times}}
+- title: Run a single workload with create/read/delete job
+ scenario:
+ Kubernetes.create_and_delete_job:
+ image: {{image_cirros}}
+ command:
+ - echo
+ - "SUCCESS"
+ runner:
+ constant:
+ concurrency: {{concurrency}}
+ times: {{times}}
+ contexts:
+ namespaces:
+ count: {{namespaces}}
+ with_serviceaccount: true
+- title: Run a single workload with create/read/delete pod with configMap volume
+ scenario:
+ Kubernetes.create_and_delete_pod_with_configmap_volume:
+ image: {{image_pause}}
+ mount_path: /var/log/check.txt
+ subpath: check.txt
+ configmap_data:
+ check.txt: |
+ test
+ runner:
+ constant:
+ concurrency: {{concurrency}}
+ times: {{times}}
+ contexts:
+ namespaces:
+ count: {{namespaces}}
+ with_serviceaccount: true
+- title: Run a single workload with create/read/delete pod with local PVC
+ scenario:
+ Kubernetes.create_and_delete_pod_with_local_persistent_volume:
+ persistent_volume:
+ size: 1Gi
+ volume_mode: Block
+ local_path: /var/tmp
+ access_modes:
+ - ReadWriteOnce
+ node_affinity:
+ required:
+ nodeSelectorTerms:
+ - matchExpressions:
+ - key: kubernetes.io/os
+ operator: In
+ values:
+ - linux
+ persistent_volume_claim:
+ size: 250Mi
+ access_modes:
+ - ReadWriteOnce
+ image: {{image_box}}
+ mount_path: /opt/check
+ runner:
+ constant:
+ concurrency: {{concurrency}}
+ times: {{times}}
+ contexts:
+ namespaces:
+ count: {{namespaces}}
+ with_serviceaccount: true
+ local_storageclass: {}
+- title: Run a single workload with create/delete NodePort service
+ scenario:
+ Kubernetes.create_and_delete_pod_with_node_port_service:
+ image: {{image_pause}}
+ port: 80
+ protocol: TCP
+ runner:
+ constant:
+ concurrency: {{concurrency}}
+ times: {{times}}
+ contexts:
+ namespaces:
+ count: {{namespaces}}
+ with_serviceaccount: true
+ kubernetes.cfg:
+ prepoll_delay: 1
+- title: Run a single workload with create/read/delete pod
+ scenario:
+ Kubernetes.create_and_delete_pod:
+ image: {{image_pause}}
+ runner:
+ constant:
+ concurrency: {{concurrency}}
+ times: {{times}}
+ contexts:
+ namespaces:
+ count: {{namespaces}}
+ with_serviceaccount: true