export function getDeploymentMatchLabels()

in src/strategyHelpers/blueGreen/blueGreenHelper.ts [198:208]


export function getDeploymentMatchLabels(deploymentObject: any): any {
   if (
      deploymentObject?.kind?.toUpperCase() ==
         KubernetesWorkload.POD.toUpperCase() &&
      deploymentObject?.metadata?.labels
   ) {
      return deploymentObject.metadata.labels
   } else if (deploymentObject?.spec?.selector?.matchLabels) {
      return deploymentObject.spec.selector.matchLabels
   }
}