test_k8s_start_services.yml 3.3 KB

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