forked from dell/omnia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_k8s_start_services.yml
97 lines (87 loc) · 3.34 KB
/
test_k8s_start_services.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
# OMNIA_UKP_US_VFKP_TC_013
# Execute k8s_start_services role in manager nodes with os installed centos 7.9
- name: OMNIA_UKP_US_VFKP_TC_013
hosts: manager
gather_facts: false
vars_files:
- test_vars/test_k8s_start_services_vars.yml
tasks:
- block:
- name: Call k8s_start_services role
include_role:
name: ../roles/k8s_start_services
tags: TC_013
- name: Waiting for the pods deployment
pause:
minutes: 10
tags: TC_013
- name: Checking all running pods
command: kubectl get pods --all-namespaces --field-selector=status.phase=Running
register: running_pods
changed_when: false
ignore_errors: True
tags: TC_013, VERIFY_013
- name: Checking default storage class
command: kubectl get sc
register: default_storage_class
changed_when: false
ignore_errors: True
tags: TC_013, VERIFY_013
- name: Validating Metallb, Prometheus and MPI pods
assert:
that:
- "'metallb' in running_pods.stdout"
- "'prometheus' in running_pods.stdout"
- "'mpi-operator' in running_pods.stdout"
fail_msg: "{{ metallb_prometheus_mpi_pods_fail_msg }}"
success_msg: "{{ metallb_prometheus_mpi_pods_success_msg }}"
tags: TC_013, VERIFY_013
- name: Validating K8s dashboard
assert:
that:
- "'kubernetes-dashboard' in running_pods.stdout"
fail_msg: "{{ kubernetes_dashboard_fail_msg }}"
success_msg: "{{ kubernetes_dashboard_success_msg }}"
tags: TC_013, VERIFY_013
- name: Validating NFS Client Provisioner pods
assert:
that:
- "'nfs-client-provisioner' in running_pods.stdout"
fail_msg: "{{ nfs_client_provisioner_pods_fail_msg }}"
success_msg: "{{ nfs_client_provisioner_pods_success_msg }}"
tags: TC_013, VERIFY_013
- name: Validating default storage class
assert:
that:
- "'nfs-client' in default_storage_class.stdout"
fail_msg: "{{ default_storage_class_fail_msg }}"
success_msg: "{{ default_storage_class_success_msg }}"
tags: TC_013, VERIFY_013
- name: Validating Node Feature Discovery pods
assert:
that:
- "'node-feature-discovery' in running_pods.stdout"
fail_msg: "{{ node_feature_discovery_pods_fail_msg }}"
success_msg: "{{ node_feature_discovery_pods_success_msg }}"
tags: TC_013, VERIFY_013
- name: Validating Nvidia device plugin pods
assert:
that:
- "'nvidia-device-plugin' in running_pods.stdout"
fail_msg: "{{ nvidia_device_plugin_pods_fail_msg }}"
success_msg: "{{ nvidia_device_plugin_pods_success_msg }}"
tags: TC_013, VERIFY_013