fix tests, types and cleanup

This commit is contained in:
Moustafa Baiou
2020-10-20 00:22:44 -04:00
committed by moustafab
parent e2085293a6
commit beaa0a82db
5 changed files with 62 additions and 12 deletions
@@ -54,8 +54,9 @@ export class KubernetesBackendClient implements KubernetesApi {
private parseLabelSelector(params: V1LabelSelector): string {
// 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)
return Object.keys(params.matchLabels)
.map(key => `${key}=${params[key]}`)
const { matchLabels } = params;
return Object.keys(matchLabels)
.map(key => `${key}=${matchLabels[key]}`)
.join(',');
}