Skip to content

Commit

Permalink
Merge pull request #171 from redhatci/api_validation
Browse files Browse the repository at this point in the history
Add validation for API Services
  • Loading branch information
betoredhat authored Feb 16, 2024
2 parents 9c525bd + 3fee370 commit 221d479
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions roles/setup_netobserv_stack/tasks/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@
msg: "OCP version must be >= {{ ocp_supported }}"
when: ocp_version is version( ocp_supported , "<")

- name: "Check all API services are available"
community.kubernetes.k8s_info:
kind: APIService
api_version: apiregistration.k8s.io/v1
register: api_services
vars:
status_query: "resources[*].status.conditions[?type=='Available'].status"
api_services_status: "{{ api_services | json_query(status_query) | flatten | unique }}"
until: "'False' not in api_services_status"
retries: 6
delay: 10

- name: Check for the Loki CRD
community.kubernetes.k8s_info:
kind: CustomResourceDefinition
Expand Down

0 comments on commit 221d479

Please sign in to comment.