fix type checks

This commit is contained in:
Moustafa Baiou
2020-10-20 00:49:23 -04:00
committed by moustafab
parent beaa0a82db
commit 61a552fac6
2 changed files with 10 additions and 24 deletions
@@ -55,8 +55,11 @@ export class KubernetesBackendClient implements KubernetesApi {
// TODO: figure out how to convert the selector to the full query param from the yaml
// (as shown here https://github.com/kubernetes/apimachinery/blob/master/pkg/labels/selector.go)
const { matchLabels } = params;
if (!matchLabels) {
return '';
}
return Object.keys(matchLabels)
.map(key => `${key}=${matchLabels[key]}`)
.map(key => `${key}=${matchLabels[key.toString()]}`)
.join(',');
}