kuttl icon indicating copy to clipboard operation
kuttl copied to clipboard

Assert labels / annotations exits or do NOT exist

Open kensipe opened this issue 4 years ago • 0 comments

What would you like to be added: Here is what the users are doing today:

---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
commands:
  - script: >
      test "$(kubectl get service min-app -n $NAMESPACE -o json
      | jq '.metadata.annotations // empty | with_entries(select(.key|match("prometheus.io")))'
      )" = ""

There is a desire to confirm that a label does not exist

https://kubernetes.slack.com/archives/CG3HTFCMV/p1618325009084900?thread_ts=1618239954.079300&cid=CG3HTFCMV

Why is this needed:

kensipe avatar Apr 16 '21 16:04 kensipe