Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
container-manager
Commits
91851cc2
Commit
91851cc2
authored
Oct 02, 2018
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
getPods low level fix
parent
dcec72df
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/k8-data.js
View file @
91851cc2
const
config
=
require
(
'
config
'
)
const
k8
=
require
(
'
./kubernetes
'
);
// gets pods with the given labels
function
getPods
(
labels
,
next
)
{
exports
.
getPods
=
function
(
labels
,
next
)
{
let
selector
=
""
let
first
=
true
for
(
k
in
labels
)
{
...
...
@@ -11,5 +12,5 @@ function getPods(labels, next) {
selector
+=
'
,
'
selector
+=
`
${
k
}
=
${
labels
[
k
]}
`
}
k8
.
ns
(
config
.
k8component
.
namespace
).
pods
({
qs
:
{
labelSelector
:
selector
}
},
next
)
k8
.
ns
(
config
.
k8component
.
namespace
).
pods
.
get
({
qs
:
{
labelSelector
:
selector
}
},
next
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment