Skip to main content

Function: matchLabelsSimplifier()

function matchLabelsSimplifier(matchLabels: 
| {
[key: string]: string;
}
| undefined, isEqualSeperator?: boolean): "" | string[];

Defined in: lib/k8s/index.ts:247

Simplifies a matchLabels object into an array of string expressions.

Parameters

ParameterTypeDefault valueDescription
matchLabels| { [key: string]: string; } | undefinedundefinedthe matchLabels object from a LabelSelector.
isEqualSeperatorbooleanfalsewhether to use "=" as the separator instead of ":".

Returns

"" | string[]

an array of simplified label strings, or an empty string.