Fix NetworkPolicy engresses not having node/pod selectors displayed (#4467)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-12-01 08:08:26 -05:00
1 parent cd2f5094dc
commit 4257fce2f0
12 files changed
+274 -158

No files matched your search

+28
View File
@@ -104,6 +104,34 @@ export class KubeCreationError extends Error {
}
}
export type LabelMatchExpression = {
/**
* The label key that the selector applies to.
*/
key: string;
} & (
{
/**
* This represents the key's relationship to a set of values.
*/
operator: "Exists" | "DoesNotExist";
values?: undefined;
}
|
{
operator: "In" | "NotIn";
/**
* The set of values for to match according to the operator for the label.
*/
values: string[];
}
);
export interface LabelSelector {
matchLabels?: Record<string, string | undefined>;
matchExpressions?: LabelMatchExpression[];
}
export class KubeObject<Metadata extends KubeObjectMetadata = KubeObjectMetadata, Status = any, Spec = any> implements ItemObject {
static readonly kind?: string;
static readonly namespaced?: boolean;