@k8slens/extensions 5.3.0-git.7193231422.0 → 5.3.0-git.8072b44b3d.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/catalog-entities/kubernetes-cluster.d.ts +9 -1
- package/dist/src/common/catalog-entities/web-link.d.ts +2 -0
- package/dist/src/common/hotbar-store.d.ts +5 -0
- package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +24 -8
- package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +9 -12
- package/dist/src/common/kube-helpers.d.ts +9 -14
- package/dist/src/common/user-store/preferences-helpers.d.ts +6 -0
- package/dist/src/common/user-store/user-store.d.ts +2 -0
- package/dist/src/extensions/common-api/catalog.d.ts +2 -1
- package/dist/src/extensions/extension-api.js +1062 -1057
- package/dist/src/main/cluster.d.ts +0 -1
- package/dist/src/main/helm/helm-chart-manager.d.ts +4 -0
- package/dist/src/main/helm/helm-repo-manager.d.ts +1 -0
- package/dist/src/main/utils/update-channel.d.ts +6 -0
- package/dist/src/renderer/components/+apps-helm-charts/helm-chart-details.d.ts +1 -1
- package/dist/src/renderer/components/+apps-releases/release-details.d.ts +2 -1
- package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +0 -1
- package/dist/src/renderer/components/+catalog/catalog-entity-item.d.ts +1 -1
- package/dist/src/renderer/components/+catalog/catalog.d.ts +2 -0
- package/dist/src/renderer/components/+catalog/hotbar-toggle-menu-item.d.ts +27 -0
- package/dist/src/renderer/components/+config-maps/config-map-details.d.ts +1 -1
- package/dist/src/renderer/components/+config-pod-disruption-budgets/pod-disruption-budgets-details.d.ts +1 -1
- package/dist/src/renderer/components/+config-resource-quotas/resource-quota-details.d.ts +1 -1
- package/dist/src/renderer/components/+config-secrets/secret-details.d.ts +1 -1
- package/dist/src/renderer/components/+custom-resources/crd-details.d.ts +1 -1
- package/dist/src/renderer/components/+custom-resources/crd-resource-details.d.ts +2 -2
- package/dist/src/renderer/components/+entity-settings/entity-settings.d.ts +1 -2
- package/dist/src/renderer/components/+events/event-details.d.ts +1 -1
- package/dist/src/renderer/components/+events/kube-event-details.d.ts +1 -1
- package/dist/src/renderer/components/+network-endpoints/endpoint-details.d.ts +1 -1
- package/dist/src/renderer/components/+network-ingresses/ingress-details.d.ts +1 -1
- package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +1 -1
- package/dist/src/renderer/components/+network-services/service-details.d.ts +1 -1
- package/dist/src/renderer/components/+pod-security-policies/pod-security-policy-details.d.ts +9 -8
- package/dist/src/renderer/components/+storage-classes/storage-class-details.d.ts +1 -1
- package/dist/src/renderer/components/+workloads-cronjobs/cronjob-details.d.ts +1 -1
- package/dist/src/{common/custom-errors.d.ts → renderer/components/__tests__/nodes.api.test.d.ts} +1 -3
- package/dist/src/renderer/components/dock/dock.d.ts +4 -1
- package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +0 -1
- package/dist/src/renderer/components/kube-object-meta/kube-object-meta.d.ts +1 -1
- package/dist/src/renderer/components/layout/setting-layout.d.ts +0 -1
- package/package.json +1 -1
|
@@ -44,13 +44,21 @@ export interface KubernetesClusterSpec extends CatalogEntitySpec {
|
|
|
44
44
|
};
|
|
45
45
|
accessibleNamespaces?: string[];
|
|
46
46
|
}
|
|
47
|
+
export declare enum LensKubernetesClusterStatus {
|
|
48
|
+
DELETING = "deleting",
|
|
49
|
+
CONNECTING = "connecting",
|
|
50
|
+
CONNECTED = "connected",
|
|
51
|
+
DISCONNECTED = "disconnected"
|
|
52
|
+
}
|
|
47
53
|
export interface KubernetesClusterMetadata extends CatalogEntityMetadata {
|
|
48
54
|
distro?: string;
|
|
49
55
|
kubeVersion?: string;
|
|
50
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated This is no longer used as it is incorrect. Other sources can add more values
|
|
59
|
+
*/
|
|
51
60
|
export declare type KubernetesClusterStatusPhase = "connected" | "connecting" | "disconnected" | "deleting";
|
|
52
61
|
export interface KubernetesClusterStatus extends CatalogEntityStatus {
|
|
53
|
-
phase: KubernetesClusterStatusPhase;
|
|
54
62
|
}
|
|
55
63
|
export declare class KubernetesCluster extends CatalogEntity<KubernetesClusterMetadata, KubernetesClusterStatus, KubernetesClusterSpec> {
|
|
56
64
|
static readonly apiVersion = "entity.k8slens.dev/v1alpha1";
|
|
@@ -27,6 +27,8 @@ export declare type WebLinkSpec = {
|
|
|
27
27
|
url: string;
|
|
28
28
|
};
|
|
29
29
|
export declare class WebLink extends CatalogEntity<CatalogEntityMetadata, WebLinkStatus, WebLinkSpec> {
|
|
30
|
+
static readonly apiVersion = "entity.k8slens.dev/v1alpha1";
|
|
31
|
+
static readonly kind = "WebLink";
|
|
30
32
|
readonly apiVersion = "entity.k8slens.dev/v1alpha1";
|
|
31
33
|
readonly kind = "WebLink";
|
|
32
34
|
onRun(): Promise<void>;
|
|
@@ -55,4 +55,9 @@ export declare class HotbarStore extends BaseStore<HotbarStoreModel> {
|
|
|
55
55
|
restackItems(from: number, to: number): void;
|
|
56
56
|
switchToPrevious(): void;
|
|
57
57
|
switchToNext(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Checks if entity already pinned to hotbar
|
|
60
|
+
* @returns boolean
|
|
61
|
+
*/
|
|
62
|
+
isAddedToActive(entity: CatalogEntity): boolean;
|
|
58
63
|
}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { KubeObject } from "../kube-object";
|
|
22
22
|
import { KubeApi } from "../kube-api";
|
|
23
|
+
import type { KubeJsonApiData } from "../kube-json-api";
|
|
23
24
|
declare type AdditionalPrinterColumnsCommon = {
|
|
24
25
|
name: string;
|
|
25
26
|
type: "integer" | "number" | "string" | "boolean" | "date";
|
|
@@ -32,9 +33,19 @@ export declare type AdditionalPrinterColumnsV1 = AdditionalPrinterColumnsCommon
|
|
|
32
33
|
declare type AdditionalPrinterColumnsV1Beta = AdditionalPrinterColumnsCommon & {
|
|
33
34
|
JSONPath: string;
|
|
34
35
|
};
|
|
36
|
+
export interface CRDVersion {
|
|
37
|
+
name: string;
|
|
38
|
+
served: boolean;
|
|
39
|
+
storage: boolean;
|
|
40
|
+
schema?: object;
|
|
41
|
+
additionalPrinterColumns?: AdditionalPrinterColumnsV1[];
|
|
42
|
+
}
|
|
35
43
|
export interface CustomResourceDefinition {
|
|
36
44
|
spec: {
|
|
37
45
|
group: string;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated for apiextensions.k8s.io/v1 but used previously
|
|
48
|
+
*/
|
|
38
49
|
version?: string;
|
|
39
50
|
names: {
|
|
40
51
|
plural: string;
|
|
@@ -43,18 +54,18 @@ export interface CustomResourceDefinition {
|
|
|
43
54
|
listKind: string;
|
|
44
55
|
};
|
|
45
56
|
scope: "Namespaced" | "Cluster" | string;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
schema?: unknown;
|
|
52
|
-
additionalPrinterColumns?: AdditionalPrinterColumnsV1[];
|
|
53
|
-
}[];
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated for apiextensions.k8s.io/v1 but used previously
|
|
59
|
+
*/
|
|
60
|
+
validation?: object;
|
|
61
|
+
versions?: CRDVersion[];
|
|
54
62
|
conversion: {
|
|
55
63
|
strategy?: string;
|
|
56
64
|
webhook?: any;
|
|
57
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated for apiextensions.k8s.io/v1 but used previously
|
|
68
|
+
*/
|
|
58
69
|
additionalPrinterColumns?: AdditionalPrinterColumnsV1Beta[];
|
|
59
70
|
};
|
|
60
71
|
status: {
|
|
@@ -75,10 +86,14 @@ export interface CustomResourceDefinition {
|
|
|
75
86
|
storedVersions: string[];
|
|
76
87
|
};
|
|
77
88
|
}
|
|
89
|
+
export interface CRDApiData extends KubeJsonApiData {
|
|
90
|
+
spec: object;
|
|
91
|
+
}
|
|
78
92
|
export declare class CustomResourceDefinition extends KubeObject {
|
|
79
93
|
static kind: string;
|
|
80
94
|
static namespaced: boolean;
|
|
81
95
|
static apiBase: string;
|
|
96
|
+
constructor(data: CRDApiData);
|
|
82
97
|
getResourceUrl(): string;
|
|
83
98
|
getResourceApiBase(): string;
|
|
84
99
|
getPluralName(): string;
|
|
@@ -86,6 +101,7 @@ export declare class CustomResourceDefinition extends KubeObject {
|
|
|
86
101
|
getResourceTitle(): string;
|
|
87
102
|
getGroup(): string;
|
|
88
103
|
getScope(): string;
|
|
104
|
+
getPreferedVersion(): CRDVersion;
|
|
89
105
|
getVersion(): string;
|
|
90
106
|
isNamespaced(): boolean;
|
|
91
107
|
getStoredVersions(): string;
|
|
@@ -36,6 +36,13 @@ export interface INodeMetrics<T = IMetrics> {
|
|
|
36
36
|
fsUsage: T;
|
|
37
37
|
fsSize: T;
|
|
38
38
|
}
|
|
39
|
+
export interface NodeTaint {
|
|
40
|
+
key: string;
|
|
41
|
+
value?: string;
|
|
42
|
+
effect: string;
|
|
43
|
+
timeAdded: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function formatNodeTaint(taint: NodeTaint): string;
|
|
39
46
|
export interface Node {
|
|
40
47
|
spec: {
|
|
41
48
|
podCIDR?: string;
|
|
@@ -45,12 +52,7 @@ export interface Node {
|
|
|
45
52
|
* @deprecated see https://issues.k8s.io/61966
|
|
46
53
|
*/
|
|
47
54
|
externalID?: string;
|
|
48
|
-
taints?:
|
|
49
|
-
key: string;
|
|
50
|
-
value: string;
|
|
51
|
-
effect: string;
|
|
52
|
-
timeAdded: string;
|
|
53
|
-
}[];
|
|
55
|
+
taints?: NodeTaint[];
|
|
54
56
|
unschedulable?: boolean;
|
|
55
57
|
};
|
|
56
58
|
status: {
|
|
@@ -116,12 +118,7 @@ export declare class Node extends KubeObject {
|
|
|
116
118
|
static apiBase: string;
|
|
117
119
|
constructor(data: KubeJsonApiData);
|
|
118
120
|
getNodeConditionText(): string;
|
|
119
|
-
getTaints():
|
|
120
|
-
key: string;
|
|
121
|
-
value: string;
|
|
122
|
-
effect: string;
|
|
123
|
-
timeAdded: string;
|
|
124
|
-
}[];
|
|
121
|
+
getTaints(): NodeTaint[];
|
|
125
122
|
getRoleLabels(): string;
|
|
126
123
|
getCpuCapacity(): number;
|
|
127
124
|
getMemoryCapacity(): number;
|
|
@@ -18,27 +18,18 @@
|
|
|
18
18
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
-
import { KubeConfig
|
|
21
|
+
import { KubeConfig } from "@kubernetes/client-node";
|
|
22
22
|
import { Cluster, Context, User } from "@kubernetes/client-node/dist/config_types";
|
|
23
23
|
import Joi from "joi";
|
|
24
|
-
export declare type KubeConfigValidationOpts = {
|
|
25
|
-
validateCluster?: boolean;
|
|
26
|
-
validateUser?: boolean;
|
|
27
|
-
validateExec?: boolean;
|
|
28
|
-
};
|
|
29
24
|
export declare const kubeConfigDefaultPath: string;
|
|
30
25
|
export declare function loadConfigFromFileSync(filePath: string): ConfigResult;
|
|
31
26
|
export declare function loadConfigFromFile(filePath: string): Promise<ConfigResult>;
|
|
32
|
-
|
|
27
|
+
interface KubeConfigOptions {
|
|
33
28
|
clusters: Cluster[];
|
|
34
29
|
users: User[];
|
|
35
30
|
contexts: Context[];
|
|
36
31
|
currentContext?: string;
|
|
37
32
|
}
|
|
38
|
-
export interface OptionsResult {
|
|
39
|
-
options: KubeConfigOptions;
|
|
40
|
-
error: Joi.ValidationError;
|
|
41
|
-
}
|
|
42
33
|
export declare function loadFromOptions(options: KubeConfigOptions): KubeConfig;
|
|
43
34
|
export interface ConfigResult {
|
|
44
35
|
config: KubeConfig;
|
|
@@ -53,12 +44,16 @@ export interface SplitConfigEntry {
|
|
|
53
44
|
* Breaks kube config into several configs. Each context as it own KubeConfig object
|
|
54
45
|
*/
|
|
55
46
|
export declare function splitConfig(kubeConfig: KubeConfig): SplitConfigEntry[];
|
|
47
|
+
/**
|
|
48
|
+
* Pretty format the object as human readable yaml, such as would be on the filesystem
|
|
49
|
+
* @param kubeConfig The kubeconfig object to format as pretty yaml
|
|
50
|
+
* @returns The yaml representation of the kubeconfig object
|
|
51
|
+
*/
|
|
56
52
|
export declare function dumpConfigYaml(kubeConfig: Partial<KubeConfig>): string;
|
|
57
|
-
export declare function podHasIssues(pod: V1Pod): boolean;
|
|
58
|
-
export declare function getNodeWarningConditions(node: V1Node): import("@kubernetes/client-node").V1NodeCondition[];
|
|
59
53
|
/**
|
|
60
54
|
* Checks if `config` has valid `Context`, `User`, `Cluster`, and `exec` fields (if present when required)
|
|
61
55
|
*
|
|
62
56
|
* Note: This function returns an error instead of throwing it, returning `undefined` if the validation passes
|
|
63
57
|
*/
|
|
64
|
-
export declare function validateKubeConfig(config: KubeConfig, contextName: string
|
|
58
|
+
export declare function validateKubeConfig(config: KubeConfig, contextName: string): Error | undefined;
|
|
59
|
+
export {};
|
|
@@ -60,5 +60,11 @@ export declare const DESCRIPTORS: {
|
|
|
60
60
|
syncKubeconfigEntries: PreferenceDescription<KubeconfigSyncEntry[], Map<string, KubeconfigSyncValue>>;
|
|
61
61
|
editorConfiguration: PreferenceDescription<EditorConfiguration, EditorConfiguration>;
|
|
62
62
|
terminalCopyOnSelect: PreferenceDescription<boolean, boolean>;
|
|
63
|
+
updateChannel: PreferenceDescription<string, string>;
|
|
64
|
+
};
|
|
65
|
+
export declare const CONSTANTS: {
|
|
66
|
+
updateChannels: Map<string, {
|
|
67
|
+
label: string;
|
|
68
|
+
}>;
|
|
63
69
|
};
|
|
64
70
|
export {};
|
|
@@ -46,6 +46,7 @@ export declare class UserStore extends BaseStore<UserStoreModel> {
|
|
|
46
46
|
downloadBinariesPath?: string;
|
|
47
47
|
kubectlBinariesPath?: string;
|
|
48
48
|
terminalCopyOnSelect: boolean;
|
|
49
|
+
updateChannel?: string;
|
|
49
50
|
/**
|
|
50
51
|
* Download kubectl binaries matching cluster version
|
|
51
52
|
*/
|
|
@@ -66,6 +67,7 @@ export declare class UserStore extends BaseStore<UserStoreModel> {
|
|
|
66
67
|
syncKubeconfigEntries: import("mobx").ObservableMap<string, KubeconfigSyncValue>;
|
|
67
68
|
get isNewVersion(): boolean;
|
|
68
69
|
get resolvedShell(): string | undefined;
|
|
70
|
+
readonly isAllowedToDowngrade: boolean;
|
|
69
71
|
startMainReactions(): void;
|
|
70
72
|
getEditorOptions(): monaco.editor.IStandaloneEditorConstructionOptions;
|
|
71
73
|
setEditorLineNumbers(lineNumbers: monaco.editor.LineNumbersType): void;
|
|
@@ -18,5 +18,6 @@
|
|
|
18
18
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export { KubernetesCluster, kubernetesClusterCategory, GeneralEntity, WebLink, } from "../../common/catalog-entities";
|
|
22
|
+
export type { KubernetesClusterPrometheusMetrics, KubernetesClusterSpec, KubernetesClusterMetadata, WebLinkSpec, WebLinkStatus, WebLinkStatusPhase, KubernetesClusterStatusPhase, KubernetesClusterStatus, } from "../../common/catalog-entities";
|
|
22
23
|
export * from "../../common/catalog/catalog-entity";
|