mayadata-io / mayadata-io/d-operators

yaml based assertion

Open
#6 1 comment 0 reactions 2 assignees View on GitHub

@ksatchit is already working on this.

Since Feb 26, 2020.

recipe
Dominant language
Go
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

As a developer I want to use better assertion logic than the following:

- name: Fetch OpenEBS control plane pods ready status
  shell: kubectl get pods -n openebs | grep {{ item }} | awk '{print $2}' | awk -F'/' '{print $1}' && kubectl get pods -n openebs | grep {{ item }} | awk '{print $2}' | awk -F'/' '{print $2}'
  register: ready_status
  with_items:
    - '{{ openebs_components }}'
  until: '{{ ready_status.stdout_lines | unique | length == 1 }}'
  retries: 20
  delay: 5

It will be great to assert list of values in a declarative manner.

For example below yaml should be enough to assert any Pods with the given label to be in Running state. It should return error if there are any Pods that are not Running.

kind: Pod
metadata:
  labels:
    name: app
status:
  phase: Running

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.