Find kubernetes artifacts by labels or an expression that evaluates it


#1

Hi,

In my pipeline, I want to make an action only if there exist deployments with a certain set of labels. How can I model such expression, decision in Spinnaker?

  1. Is it possible to find artifacts from kubernetes by labels?
  2. Is it possible to craft an expression that gets selects deploymnets by label?

It is going to be used to tear down a namespace if there are deployments of only production app version and no deployments of feature versions. How would one model this task in Spinnaker? The Find Resource stage UI is very very limited. Perhaps JSON accepts larger set of attributes.

Best,
Thomas