organic-stem-k8s-get-pods
v2.2.3
Published
a helper for organic-stem-skeleton 2.1 based cells for listing matching pods
Readme
organic-stem-k8s-get-pods
a helper for organic-stem-skeleton 2.1 based cells for listing matching pods:
- per cell
prerequirements
kubectlwith aligned context or.kubeconfigfile within stem repo root.
usage
$ npm i organic-stem-k8s-get-podsapi
function ({cellName: String, namespace = 'default', log = false, waitPods = false, labelName = app, labels = []})
const getPods = require('organic-stem-k8s-get-pods')
let pods = await getPods({cellName: 'my-cell'})
console.log(pods) // [ 'my-cell-deployment-123sxyx', 'my-cell-deployment-124xayz' ]waitPodswhentruewill long poll remote kube cluster in interval of 1 second for maximum of 10 retries for matching pods- label selector used for match is a transformation of
[labelName=cellName].concat(labels)
