@k8slens/extensions 5.3.0-git.b7ff8c37cb.0 → 5.3.0-git.bc34045a4f.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/__mocks__/electron.ts +2 -2
- package/dist/src/{renderer/components/+user-management/select-options.d.ts → common/__tests__/base-store.test.d.ts} +1 -7
- package/dist/src/common/__tests__/system-ca.test.d.ts +1 -0
- package/dist/src/common/base-store.d.ts +3 -2
- package/dist/src/common/cluster-store.d.ts +2 -3
- package/dist/src/common/cluster-types.d.ts +7 -1
- package/dist/src/common/hotbar-store.d.ts +1 -0
- package/dist/src/common/k8s-api/endpoints/cluster-role-binding.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/cluster-role.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/cluster.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/configmap.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/cron-job.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/endpoint.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/events.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/hpa.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/ingress.api.d.ts +11 -8
- package/dist/src/common/k8s-api/endpoints/job.api.d.ts +1 -2
- package/dist/src/common/k8s-api/endpoints/limit-range.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/namespaces.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/persistent-volume.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/pod-metrics.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +29 -33
- package/dist/src/common/k8s-api/endpoints/podsecuritypolicy.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/resource-quota.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/role-binding.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/role.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/secret.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/selfsubjectrulesreviews.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/service-accounts.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/service.api.d.ts +2 -2
- package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/storage-class.api.d.ts +1 -1
- package/dist/src/common/k8s-api/index.d.ts +1 -1
- package/dist/src/common/k8s-api/kube-api.d.ts +12 -3
- package/dist/src/common/k8s-api/kube-json-api.d.ts +2 -0
- package/dist/src/common/k8s-api/kube-object.d.ts +9 -1
- package/dist/src/common/k8s-api/kube-object.store.d.ts +25 -7
- package/dist/src/common/k8s-api/kube-watch-api.d.ts +29 -8
- package/dist/src/common/system-ca.d.ts +20 -1
- package/dist/src/common/user-store/preferences-helpers.d.ts +2 -6
- package/dist/src/common/user-store/user-store.d.ts +3 -7
- package/dist/src/common/utils/base64.d.ts +12 -4
- package/dist/src/common/utils/index.d.ts +2 -2
- package/dist/src/common/utils/paths.d.ts +1 -0
- package/dist/src/{main → common/utils}/promise-exec.d.ts +0 -0
- package/dist/src/common/weblink-store.d.ts +1 -0
- package/dist/src/extensions/0.extension-api.js +15 -0
- package/dist/src/extensions/1.extension-api.js +15 -0
- package/dist/src/extensions/10.extension-api.js +15 -0
- package/dist/src/extensions/11.extension-api.js +15 -0
- package/dist/src/extensions/12.extension-api.js +15 -0
- package/dist/src/extensions/13.extension-api.js +15 -0
- package/dist/src/extensions/14.extension-api.js +15 -0
- package/dist/src/extensions/15.extension-api.js +15 -0
- package/dist/src/extensions/16.extension-api.js +15 -0
- package/dist/src/extensions/17.extension-api.js +15 -0
- package/dist/src/extensions/18.extension-api.js +15 -0
- package/dist/src/extensions/19.extension-api.js +15 -0
- package/dist/src/extensions/2.extension-api.js +543 -0
- package/dist/src/extensions/20.extension-api.js +15 -0
- package/dist/src/extensions/21.extension-api.js +15 -0
- package/dist/src/extensions/22.extension-api.js +15 -0
- package/dist/src/extensions/23.extension-api.js +15 -0
- package/dist/src/extensions/24.extension-api.js +15 -0
- package/dist/src/extensions/25.extension-api.js +15 -0
- package/dist/src/extensions/26.extension-api.js +15 -0
- package/dist/src/extensions/27.extension-api.js +15 -0
- package/dist/src/extensions/28.extension-api.js +15 -0
- package/dist/src/extensions/29.extension-api.js +15 -0
- package/dist/src/extensions/3.extension-api.js +423 -0
- package/dist/src/extensions/30.extension-api.js +15 -0
- package/dist/src/extensions/31.extension-api.js +15 -0
- package/dist/src/extensions/32.extension-api.js +15 -0
- package/dist/src/extensions/33.extension-api.js +15 -0
- package/dist/src/extensions/34.extension-api.js +15 -0
- package/dist/src/extensions/35.extension-api.js +15 -0
- package/dist/src/extensions/36.extension-api.js +15 -0
- package/dist/src/extensions/37.extension-api.js +15 -0
- package/dist/src/extensions/38.extension-api.js +15 -0
- package/dist/src/extensions/39.extension-api.js +15 -0
- package/dist/src/extensions/4.extension-api.js +363 -0
- package/dist/src/extensions/40.extension-api.js +15 -0
- package/dist/src/extensions/41.extension-api.js +15 -0
- package/dist/src/extensions/42.extension-api.js +15 -0
- package/dist/src/extensions/43.extension-api.js +15 -0
- package/dist/src/extensions/44.extension-api.js +15 -0
- package/dist/src/extensions/45.extension-api.js +15 -0
- package/dist/src/extensions/46.extension-api.js +15 -0
- package/dist/src/extensions/47.extension-api.js +15 -0
- package/dist/src/extensions/48.extension-api.js +15 -0
- package/dist/src/extensions/49.extension-api.js +15 -0
- package/dist/src/extensions/5.extension-api.js +51 -0
- package/dist/src/extensions/50.extension-api.js +15 -0
- package/dist/src/extensions/51.extension-api.js +15 -0
- package/dist/src/extensions/52.extension-api.js +15 -0
- package/dist/src/extensions/53.extension-api.js +15 -0
- package/dist/src/extensions/54.extension-api.js +15 -0
- package/dist/src/extensions/55.extension-api.js +15 -0
- package/dist/src/extensions/56.extension-api.js +15 -0
- package/dist/src/extensions/57.extension-api.js +15 -0
- package/dist/src/extensions/58.extension-api.js +15 -0
- package/dist/src/extensions/59.extension-api.js +15 -0
- package/dist/src/extensions/6.extension-api.js +27 -0
- package/dist/src/extensions/60.extension-api.js +15 -0
- package/dist/src/extensions/61.extension-api.js +15 -0
- package/dist/src/extensions/62.extension-api.js +15 -0
- package/dist/src/extensions/63.extension-api.js +15 -0
- package/dist/src/extensions/64.extension-api.js +15 -0
- package/dist/src/extensions/65.extension-api.js +15 -0
- package/dist/src/extensions/66.extension-api.js +15 -0
- package/dist/src/extensions/67.extension-api.js +15 -0
- package/dist/src/extensions/68.extension-api.js +15 -0
- package/dist/src/extensions/69.extension-api.js +15 -0
- package/dist/src/extensions/7.extension-api.js +15 -0
- package/dist/src/extensions/70.extension-api.js +15 -0
- package/dist/src/extensions/71.extension-api.js +15 -0
- package/dist/src/extensions/72.extension-api.js +15 -0
- package/dist/src/extensions/73.extension-api.js +15 -0
- package/dist/src/extensions/74.extension-api.js +15 -0
- package/dist/src/extensions/75.extension-api.js +15 -0
- package/dist/src/extensions/76.extension-api.js +15 -0
- package/dist/src/extensions/77.extension-api.js +15 -0
- package/dist/src/extensions/78.extension-api.js +15 -0
- package/dist/src/extensions/79.extension-api.js +15 -0
- package/dist/src/extensions/8.extension-api.js +15 -0
- package/dist/src/extensions/9.extension-api.js +15 -0
- package/dist/src/extensions/common-api/app.d.ts +2 -0
- package/dist/src/extensions/common-api/index.d.ts +1 -1
- package/dist/src/{common/utils/makeCss.d.ts → extensions/common-api/user-preferences.d.ts} +2 -7
- package/dist/src/extensions/extension-api.js +5872 -1680
- package/dist/src/extensions/extension-store.d.ts +1 -0
- package/dist/src/extensions/extensions-store.d.ts +1 -0
- package/dist/src/extensions/main-api/k8s-api.d.ts +1 -1
- package/dist/src/extensions/registries/workloads-overview-detail-registry.d.ts +6 -3
- package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -1
- package/dist/src/main/catalog/catalog-entity-registry.d.ts +2 -2
- package/dist/src/main/cluster-manager.d.ts +2 -0
- package/dist/src/main/cluster.d.ts +5 -10
- package/dist/src/main/context-handler.d.ts +8 -5
- package/dist/src/main/extension-filesystem.d.ts +1 -0
- package/dist/src/main/index.d.ts +0 -1
- package/dist/src/main/kube-auth-proxy.d.ts +1 -8
- package/dist/src/main/kubectl.d.ts +1 -1
- package/dist/src/main/lens-proxy.d.ts +1 -1
- package/dist/src/main/prometheus/helm.d.ts +1 -1
- package/dist/src/main/prometheus/lens.d.ts +1 -1
- package/dist/src/main/prometheus/operator.d.ts +1 -1
- package/dist/src/main/prometheus/provider-registry.d.ts +2 -1
- package/dist/src/main/prometheus/stacklight.d.ts +1 -1
- package/dist/src/main/proxy-functions/kube-api-request.d.ts +1 -1
- package/dist/src/main/proxy-functions/shell-api-request.d.ts +14 -0
- package/dist/src/main/proxy-functions/types.d.ts +2 -0
- package/dist/src/main/shell-session/node-shell-session.d.ts +4 -4
- package/dist/src/main/shell-session/shell-session.d.ts +95 -8
- package/dist/src/main/utils/shell-env.d.ts +1 -3
- package/dist/src/migrations/user-store/index.d.ts +1 -1
- package/dist/src/preload.d.ts +1 -1
- package/dist/src/renderer/api/terminal-api.d.ts +33 -20
- package/dist/src/renderer/api/websocket-api.d.ts +55 -32
- package/dist/src/renderer/bootstrap.d.ts +1 -1
- package/dist/src/renderer/{components/app.d.ts → cluster-frame.d.ts} +6 -4
- package/dist/src/renderer/components/+add-cluster/add-cluster.d.ts +0 -1
- package/dist/src/renderer/components/+apps-helm-charts/helm-chart-details.d.ts +3 -3
- package/dist/src/renderer/components/+apps-releases/release-menu.d.ts +3 -3
- package/dist/src/renderer/components/+catalog/catalog-add-button.d.ts +7 -1
- package/dist/src/renderer/components/+catalog/catalog.d.ts +0 -1
- package/dist/src/renderer/components/+namespaces/namespace-select-filter.d.ts +3 -0
- package/dist/src/renderer/components/+namespaces/namespace.store.d.ts +55 -2
- package/dist/src/renderer/components/+user-management/+cluster-role-bindings/__tests__/dialog.test.d.ts +21 -0
- package/dist/src/renderer/components/+user-management/+cluster-role-bindings/dialog.d.ts +2 -3
- package/dist/src/renderer/components/+user-management/+role-bindings/__tests__/dialog.test.d.ts +21 -0
- package/dist/src/renderer/components/+user-management/+role-bindings/dialog.d.ts +2 -3
- package/dist/src/renderer/components/+workloads-daemonsets/daemonsets.d.ts +0 -1
- package/dist/src/renderer/components/+workloads-deployments/deployment-scale-dialog.d.ts +1 -0
- package/dist/src/renderer/components/+workloads-overview/overview.d.ts +3 -0
- package/dist/src/renderer/components/+workloads-pods/pod-details-affinities.d.ts +1 -2
- package/dist/src/renderer/components/+workloads-replicasets/replicaset-scale-dialog.d.ts +1 -0
- package/dist/src/renderer/components/+workloads-statefulsets/statefulset-scale-dialog.d.ts +1 -0
- package/dist/src/renderer/components/animate/animate.d.ts +3 -2
- package/dist/src/renderer/components/badge/badge.d.ts +1 -0
- package/dist/src/renderer/components/cluster-manager/cluster-status.d.ts +6 -7
- package/dist/src/renderer/components/cluster-manager/lens-views.d.ts +12 -8
- package/dist/src/renderer/components/cluster-settings/components/__tests__/cluster-local-terminal-settings.test.d.ts +21 -0
- package/dist/src/renderer/components/cluster-settings/components/{cluster-home-dir-setting.d.ts → cluster-local-terminal-settings.d.ts} +1 -12
- package/dist/src/renderer/components/cluster-settings/components/index.d.ts +1 -1
- package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
- package/dist/src/renderer/components/dock/create-resource.d.ts +2 -2
- package/dist/src/renderer/components/dock/dock.store.d.ts +20 -2
- package/dist/src/renderer/components/dock/edit-resource.d.ts +3 -3
- package/dist/src/renderer/components/dock/editor-panel.d.ts +11 -17
- package/dist/src/renderer/components/dock/install-chart.d.ts +6 -5
- package/dist/src/renderer/components/dock/terminal-window.d.ts +2 -3
- package/dist/src/renderer/components/dock/terminal.d.ts +7 -11
- package/dist/src/renderer/components/dock/upgrade-chart.d.ts +2 -1
- package/dist/src/renderer/components/drawer/drawer.d.ts +1 -0
- package/dist/src/renderer/components/item-object-list/item-list-layout.d.ts +6 -0
- package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +4 -0
- package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
- package/dist/src/renderer/components/layout/__tests__/sidebar-cluster.test.d.ts +21 -0
- package/dist/src/renderer/components/layout/sidebar-cluster.d.ts +24 -0
- package/dist/src/renderer/components/layout/sidebar.d.ts +2 -5
- package/dist/src/renderer/components/list/list.d.ts +1 -1
- package/dist/src/renderer/components/menu/menu.d.ts +1 -0
- package/dist/src/renderer/components/monaco-editor/index.d.ts +23 -0
- package/dist/src/renderer/components/monaco-editor/monaco-editor.d.ts +93 -0
- package/dist/src/renderer/components/monaco-editor/monaco-themes.d.ts +29 -0
- package/dist/src/renderer/components/monaco-editor/monaco-validators.d.ts +9 -0
- package/dist/src/renderer/components/table/table-cell.d.ts +1 -0
- package/dist/src/renderer/initializers/kube-object-detail-registry.d.ts +1 -1
- package/dist/src/renderer/port-forward/index.d.ts +1 -0
- package/dist/src/renderer/port-forward/port-forward-notify.d.ts +21 -0
- package/dist/src/renderer/{lens-app.d.ts → root-frame.d.ts} +4 -2
- package/dist/src/renderer/theme.store.d.ts +4 -15
- package/package.json +1 -1
- package/dist/src/renderer/components/dock/monaco-model-manager.d.ts +0 -42
package/__mocks__/electron.ts
CHANGED
|
@@ -18,10 +18,4 @@
|
|
|
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
|
-
|
|
22
|
-
import type { KubeObject } from "../../../common/k8s-api/kube-object";
|
|
23
|
-
import type { SelectOption } from "../select";
|
|
24
|
-
export declare type ServiceAccountOption = SelectOption<string> & {
|
|
25
|
-
account: ServiceAccount;
|
|
26
|
-
};
|
|
27
|
-
export declare function getRoleRefSelectOption<T extends KubeObject>(item: T): SelectOption<T>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -32,6 +32,7 @@ export declare abstract class BaseStore<T> extends Singleton {
|
|
|
32
32
|
protected params: BaseStoreParams<T>;
|
|
33
33
|
protected storeConfig?: Config<T>;
|
|
34
34
|
protected syncDisposers: Disposer[];
|
|
35
|
+
readonly displayName: string;
|
|
35
36
|
protected constructor(params: BaseStoreParams<T>);
|
|
36
37
|
/**
|
|
37
38
|
* This must be called after the last child's constructor is finished (or just before it finishes)
|
|
@@ -42,14 +43,14 @@ export declare abstract class BaseStore<T> extends Singleton {
|
|
|
42
43
|
protected get syncMainChannel(): string;
|
|
43
44
|
get path(): string;
|
|
44
45
|
protected cwd(): string;
|
|
45
|
-
protected saveToFile(model: T):
|
|
46
|
+
protected saveToFile(model: T): void;
|
|
46
47
|
enableSync(): void;
|
|
47
48
|
protected onSyncFromMain(model: T): void;
|
|
48
49
|
unregisterIpcListener(): void;
|
|
49
50
|
disableSync(): void;
|
|
50
51
|
protected applyWithoutSync(callback: () => void): void;
|
|
51
52
|
protected onSync(model: T): void;
|
|
52
|
-
protected onModelChange(model: T):
|
|
53
|
+
protected onModelChange(model: T): void;
|
|
53
54
|
/**
|
|
54
55
|
* fromStore is called internally when a child class syncs with the file
|
|
55
56
|
* system.
|
|
@@ -20,19 +20,18 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { BaseStore } from "./base-store";
|
|
22
22
|
import { Cluster } from "../main/cluster";
|
|
23
|
-
import type { ClusterModel, ClusterId
|
|
23
|
+
import type { ClusterModel, ClusterId } from "./cluster-types";
|
|
24
24
|
export interface ClusterStoreModel {
|
|
25
25
|
clusters?: ClusterModel[];
|
|
26
26
|
}
|
|
27
27
|
export declare class ClusterStore extends BaseStore<ClusterStoreModel> {
|
|
28
|
-
|
|
28
|
+
readonly displayName = "ClusterStore";
|
|
29
29
|
clusters: import("mobx").ObservableMap<string, Cluster>;
|
|
30
30
|
protected disposer: import("./utils").ExtendableDisposer;
|
|
31
31
|
constructor();
|
|
32
32
|
loadInitialOnRenderer(): Promise<void>;
|
|
33
33
|
provideInitialFromMain(): void;
|
|
34
34
|
protected pushStateToViewsAutomatically(): void;
|
|
35
|
-
handleStateChange: (event: any, clusterId: string, state: ClusterState) => void;
|
|
36
35
|
registerIpcListener(): void;
|
|
37
36
|
unregisterIpcListener(): void;
|
|
38
37
|
pushState(): void;
|
|
@@ -105,6 +105,13 @@ export declare enum ClusterStatus {
|
|
|
105
105
|
AccessDenied = 1,
|
|
106
106
|
Offline = 0
|
|
107
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* The message format for the "cluster:<cluster-id>:connection-update" channels
|
|
110
|
+
*/
|
|
111
|
+
export interface KubeAuthUpdate {
|
|
112
|
+
message: string;
|
|
113
|
+
isError: boolean;
|
|
114
|
+
}
|
|
108
115
|
/**
|
|
109
116
|
* The OpenLens known static metadata keys
|
|
110
117
|
*/
|
|
@@ -152,7 +159,6 @@ export interface ClusterState {
|
|
|
152
159
|
disconnected: boolean;
|
|
153
160
|
accessible: boolean;
|
|
154
161
|
ready: boolean;
|
|
155
|
-
failureReason: string;
|
|
156
162
|
isAdmin: boolean;
|
|
157
163
|
allowedNamespaces: string[];
|
|
158
164
|
allowedResources: string[];
|
|
@@ -22,6 +22,7 @@ import { KubeObject } from "../kube-object";
|
|
|
22
22
|
import { IMetrics } from "./metrics.api";
|
|
23
23
|
import { KubeApi } from "../kube-api";
|
|
24
24
|
import type { KubeJsonApiData } from "../kube-json-api";
|
|
25
|
+
import type { RequireExactlyOne } from "type-fest";
|
|
25
26
|
export declare class IngressApi extends KubeApi<Ingress> {
|
|
26
27
|
}
|
|
27
28
|
export declare function getMetricsForIngress(ingress: string, namespace: string): Promise<IIngressMetrics>;
|
|
@@ -38,7 +39,7 @@ export interface ILoadBalancerIngress {
|
|
|
38
39
|
}
|
|
39
40
|
interface IExtensionsBackend {
|
|
40
41
|
serviceName: string;
|
|
41
|
-
servicePort: number;
|
|
42
|
+
servicePort: number | string;
|
|
42
43
|
}
|
|
43
44
|
interface INetworkingBackend {
|
|
44
45
|
service: IIngressService;
|
|
@@ -70,13 +71,18 @@ export interface Ingress {
|
|
|
70
71
|
};
|
|
71
72
|
}[];
|
|
72
73
|
backend?: IExtensionsBackend;
|
|
73
|
-
|
|
74
|
+
/**
|
|
75
|
+
* The default backend which is exactly on of:
|
|
76
|
+
* - service
|
|
77
|
+
* - resource
|
|
78
|
+
*/
|
|
79
|
+
defaultBackend?: RequireExactlyOne<INetworkingBackend & {
|
|
74
80
|
resource: {
|
|
75
81
|
apiGroup: string;
|
|
76
82
|
kind: string;
|
|
77
83
|
name: string;
|
|
78
84
|
};
|
|
79
|
-
}
|
|
85
|
+
}>;
|
|
80
86
|
};
|
|
81
87
|
status: {
|
|
82
88
|
loadBalancer: {
|
|
@@ -90,13 +96,10 @@ export declare class Ingress extends KubeObject {
|
|
|
90
96
|
static apiBase: string;
|
|
91
97
|
constructor(data: KubeJsonApiData);
|
|
92
98
|
getRoutes(): string[];
|
|
93
|
-
getServiceNamePort():
|
|
94
|
-
serviceName: string;
|
|
95
|
-
servicePort: string | number;
|
|
96
|
-
};
|
|
99
|
+
getServiceNamePort(): IExtensionsBackend;
|
|
97
100
|
getHosts(): string[];
|
|
98
101
|
getPorts(): string;
|
|
99
102
|
getLoadBalancers(): string[];
|
|
100
103
|
}
|
|
101
104
|
declare let ingressApi: IngressApi;
|
|
102
|
-
export { ingressApi };
|
|
105
|
+
export { ingressApi, };
|
|
@@ -96,10 +96,9 @@ export declare class Job extends WorkloadKubeObject {
|
|
|
96
96
|
message?: string;
|
|
97
97
|
};
|
|
98
98
|
getImages(): string[];
|
|
99
|
-
delete(): Promise<KubeJsonApiData>;
|
|
100
99
|
}
|
|
101
100
|
export declare class JobApi extends KubeApi<Job> {
|
|
102
101
|
}
|
|
103
102
|
export declare function getMetricsForJobs(jobs: Job[], namespace: string, selector?: string): Promise<IPodMetrics>;
|
|
104
103
|
declare let jobApi: JobApi;
|
|
105
|
-
export { jobApi };
|
|
104
|
+
export { jobApi, };
|
|
@@ -42,4 +42,4 @@ export declare class NamespaceApi extends KubeApi<Namespace> {
|
|
|
42
42
|
}
|
|
43
43
|
export declare function getMetricsForNamespace(namespace: string, selector?: string): Promise<IPodMetrics>;
|
|
44
44
|
declare let namespacesApi: NamespaceApi;
|
|
45
|
-
export { namespacesApi };
|
|
45
|
+
export { namespacesApi, };
|
|
@@ -133,40 +133,36 @@ interface IContainerProbe {
|
|
|
133
133
|
successThreshold?: number;
|
|
134
134
|
failureThreshold?: number;
|
|
135
135
|
}
|
|
136
|
+
export interface ContainerStateRunning {
|
|
137
|
+
startedAt: string;
|
|
138
|
+
}
|
|
139
|
+
export interface ContainerStateWaiting {
|
|
140
|
+
reason: string;
|
|
141
|
+
message: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ContainerStateTerminated {
|
|
144
|
+
startedAt: string;
|
|
145
|
+
finishedAt: string;
|
|
146
|
+
exitCode: number;
|
|
147
|
+
reason: string;
|
|
148
|
+
containerID?: string;
|
|
149
|
+
message?: string;
|
|
150
|
+
signal?: number;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* ContainerState holds a possible state of container. Only one of its members
|
|
154
|
+
* may be specified. If none of them is specified, the default one is
|
|
155
|
+
* `ContainerStateWaiting`.
|
|
156
|
+
*/
|
|
157
|
+
export interface ContainerState {
|
|
158
|
+
running?: ContainerStateRunning;
|
|
159
|
+
waiting?: ContainerStateWaiting;
|
|
160
|
+
terminated?: ContainerStateTerminated;
|
|
161
|
+
}
|
|
136
162
|
export interface IPodContainerStatus {
|
|
137
163
|
name: string;
|
|
138
|
-
state?:
|
|
139
|
-
|
|
140
|
-
running?: {
|
|
141
|
-
startedAt: string;
|
|
142
|
-
};
|
|
143
|
-
waiting?: {
|
|
144
|
-
reason: string;
|
|
145
|
-
message: string;
|
|
146
|
-
};
|
|
147
|
-
terminated?: {
|
|
148
|
-
startedAt: string;
|
|
149
|
-
finishedAt: string;
|
|
150
|
-
exitCode: number;
|
|
151
|
-
reason: string;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
lastState?: {
|
|
155
|
-
[index: string]: object;
|
|
156
|
-
running?: {
|
|
157
|
-
startedAt: string;
|
|
158
|
-
};
|
|
159
|
-
waiting?: {
|
|
160
|
-
reason: string;
|
|
161
|
-
message: string;
|
|
162
|
-
};
|
|
163
|
-
terminated?: {
|
|
164
|
-
startedAt: string;
|
|
165
|
-
finishedAt: string;
|
|
166
|
-
exitCode: number;
|
|
167
|
-
reason: string;
|
|
168
|
-
};
|
|
169
|
-
};
|
|
164
|
+
state?: ContainerState;
|
|
165
|
+
lastState?: ContainerState;
|
|
170
166
|
ready: boolean;
|
|
171
167
|
restartCount: number;
|
|
172
168
|
image: string;
|
|
@@ -310,4 +306,4 @@ export declare class Pod extends WorkloadKubeObject {
|
|
|
310
306
|
getIPs(): string[];
|
|
311
307
|
}
|
|
312
308
|
declare let podsApi: PodsApi;
|
|
313
|
-
export { podsApi };
|
|
309
|
+
export { podsApi, };
|
|
@@ -51,4 +51,4 @@ export declare class SelfSubjectRulesReview extends KubeObject {
|
|
|
51
51
|
protected normalize(rule: ISelfSubjectReviewRule): ISelfSubjectReviewRule;
|
|
52
52
|
}
|
|
53
53
|
declare let selfSubjectRulesReviewApi: SelfSubjectRulesReviewApi;
|
|
54
|
-
export { selfSubjectRulesReviewApi };
|
|
54
|
+
export { selfSubjectRulesReviewApi, };
|
|
@@ -38,7 +38,7 @@ export interface Service {
|
|
|
38
38
|
clusterIP: string;
|
|
39
39
|
clusterIPs?: string[];
|
|
40
40
|
externalTrafficPolicy?: string;
|
|
41
|
-
externalName
|
|
41
|
+
externalName?: string;
|
|
42
42
|
loadBalancerIP?: string;
|
|
43
43
|
loadBalancerSourceRanges?: string[];
|
|
44
44
|
sessionAffinity: string;
|
|
@@ -87,4 +87,4 @@ export declare class Service extends KubeObject {
|
|
|
87
87
|
getIpFamilyPolicy(): string;
|
|
88
88
|
}
|
|
89
89
|
declare let serviceApi: KubeApi<Service>;
|
|
90
|
-
export { serviceApi };
|
|
90
|
+
export { serviceApi, };
|
|
@@ -23,6 +23,7 @@ import type { IKubeWatchEvent } from "./kube-watch-api";
|
|
|
23
23
|
import { KubeJsonApi, KubeJsonApiData } from "./kube-json-api";
|
|
24
24
|
import type { RequestInit } from "node-fetch";
|
|
25
25
|
import AbortController from "abort-controller";
|
|
26
|
+
import type { Patch } from "rfc6902";
|
|
26
27
|
export interface IKubeApiOptions<T extends KubeObject> {
|
|
27
28
|
/**
|
|
28
29
|
* base api-path for listing all resources, e.g. "/api/v1/pods"
|
|
@@ -74,6 +75,7 @@ export interface ILocalKubeApiConfig {
|
|
|
74
75
|
uid: string;
|
|
75
76
|
};
|
|
76
77
|
}
|
|
78
|
+
export declare type PropagationPolicy = undefined | "Orphan" | "Foreground" | "Background";
|
|
77
79
|
/**
|
|
78
80
|
* @deprecated
|
|
79
81
|
*/
|
|
@@ -91,8 +93,8 @@ export interface IRemoteKubeApiConfig {
|
|
|
91
93
|
clientKeyData?: string;
|
|
92
94
|
};
|
|
93
95
|
}
|
|
94
|
-
export declare function forCluster<T extends KubeObject>(cluster: ILocalKubeApiConfig, kubeClass: KubeObjectConstructor<T>): KubeApi<T>;
|
|
95
|
-
export declare function forRemoteCluster<T extends KubeObject>(config: IRemoteKubeApiConfig, kubeClass: KubeObjectConstructor<T>):
|
|
96
|
+
export declare function forCluster<T extends KubeObject, Y extends KubeApi<T> = KubeApi<T>>(cluster: ILocalKubeApiConfig, kubeClass: KubeObjectConstructor<T>, apiClass?: new (apiOpts: IKubeApiOptions<T>) => Y): KubeApi<T>;
|
|
97
|
+
export declare function forRemoteCluster<T extends KubeObject, Y extends KubeApi<T> = KubeApi<T>>(config: IRemoteKubeApiConfig, kubeClass: KubeObjectConstructor<T>, apiClass?: new (apiOpts: IKubeApiOptions<T>) => Y): Y;
|
|
96
98
|
export declare function ensureObjectSelfLink(api: KubeApi<KubeObject>, object: KubeJsonApiData): void;
|
|
97
99
|
export declare type KubeApiWatchCallback = (data: IKubeWatchEvent<KubeJsonApiData>, error: any) => void;
|
|
98
100
|
export declare type KubeApiWatchOptions = {
|
|
@@ -101,7 +103,9 @@ export declare type KubeApiWatchOptions = {
|
|
|
101
103
|
abortController?: AbortController;
|
|
102
104
|
watchId?: string;
|
|
103
105
|
retry?: boolean;
|
|
106
|
+
timeout?: number;
|
|
104
107
|
};
|
|
108
|
+
export declare type KubeApiPatchType = "merge" | "json" | "strategic";
|
|
105
109
|
export declare class KubeApi<T extends KubeObject> {
|
|
106
110
|
protected options: IKubeApiOptions<T>;
|
|
107
111
|
readonly kind: string;
|
|
@@ -151,9 +155,14 @@ export declare class KubeApi<T extends KubeObject> {
|
|
|
151
155
|
name?: string;
|
|
152
156
|
namespace?: string;
|
|
153
157
|
}, data?: Partial<T>): Promise<T | null>;
|
|
154
|
-
|
|
158
|
+
patch({ name, namespace }?: {
|
|
155
159
|
name?: string;
|
|
156
160
|
namespace?: string;
|
|
161
|
+
}, data?: Partial<T> | Patch, strategy?: KubeApiPatchType): Promise<T | null>;
|
|
162
|
+
delete({ name, namespace, propagationPolicy }: {
|
|
163
|
+
name: string;
|
|
164
|
+
namespace?: string;
|
|
165
|
+
propagationPolicy?: PropagationPolicy;
|
|
157
166
|
}): Promise<KubeJsonApiData>;
|
|
158
167
|
getWatchUrl(namespace?: string, query?: IKubeApiQueryParams): string;
|
|
159
168
|
watch(opts?: KubeApiWatchOptions): () => void;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { JsonApi, JsonApiData, JsonApiError } from "./json-api";
|
|
22
22
|
import type { Response } from "node-fetch";
|
|
23
|
+
import type { Cluster } from "../../main/cluster";
|
|
23
24
|
export interface KubeJsonApiListMetadata {
|
|
24
25
|
resourceVersion: string;
|
|
25
26
|
selfLink?: string;
|
|
@@ -63,5 +64,6 @@ export interface KubeJsonApiError extends JsonApiError {
|
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
export declare class KubeJsonApi extends JsonApi<KubeJsonApiData> {
|
|
67
|
+
static forCluster(cluster: Cluster): KubeJsonApi;
|
|
66
68
|
protected parseError(error: KubeJsonApiError | any, res: Response): string[];
|
|
67
69
|
}
|
|
@@ -104,7 +104,7 @@ export declare class KubeObject<Metadata extends KubeObjectMetadata = KubeObject
|
|
|
104
104
|
/**
|
|
105
105
|
* These must be RFC6902 compliant paths
|
|
106
106
|
*/
|
|
107
|
-
private static readonly
|
|
107
|
+
private static readonly nonEditablePathPrefixes;
|
|
108
108
|
private static readonly nonEditablePaths;
|
|
109
109
|
constructor(data: KubeJsonApiData);
|
|
110
110
|
get selfLink(): string;
|
|
@@ -128,6 +128,9 @@ export declare class KubeObject<Metadata extends KubeObjectMetadata = KubeObject
|
|
|
128
128
|
}[];
|
|
129
129
|
getSearchFields(): string[];
|
|
130
130
|
toPlainObject(): object;
|
|
131
|
+
/**
|
|
132
|
+
* @deprecated use KubeApi.patch instead
|
|
133
|
+
*/
|
|
131
134
|
patch(patch: Patch): Promise<KubeJsonApiData | null>;
|
|
132
135
|
/**
|
|
133
136
|
* Perform a full update (or more specifically a replace)
|
|
@@ -135,7 +138,12 @@ export declare class KubeObject<Metadata extends KubeObjectMetadata = KubeObject
|
|
|
135
138
|
* Note: this is brittle if `data` is not actually partial (but instead whole).
|
|
136
139
|
* As fields such as `resourceVersion` will probably out of date. This is a
|
|
137
140
|
* common race condition.
|
|
141
|
+
*
|
|
142
|
+
* @deprecated use KubeApi.update instead
|
|
138
143
|
*/
|
|
139
144
|
update(data: Partial<this>): Promise<KubeJsonApiData | null>;
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated use KubeApi.delete instead
|
|
147
|
+
*/
|
|
140
148
|
delete(params?: JsonApiParams): Promise<KubeJsonApiData>;
|
|
141
149
|
}
|
|
@@ -30,6 +30,28 @@ export interface KubeObjectStoreLoadingParams<K extends KubeObject> {
|
|
|
30
30
|
namespaces: string[];
|
|
31
31
|
api?: KubeApi<K>;
|
|
32
32
|
reqInit?: RequestInit;
|
|
33
|
+
/**
|
|
34
|
+
* A function that is called when listing fails. If set then blocks errors
|
|
35
|
+
* being rejected with
|
|
36
|
+
*/
|
|
37
|
+
onLoadFailure?: (err: any) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface KubeObjectStoreLoadAllParams {
|
|
40
|
+
namespaces?: string[];
|
|
41
|
+
merge?: boolean;
|
|
42
|
+
reqInit?: RequestInit;
|
|
43
|
+
/**
|
|
44
|
+
* A function that is called when listing fails. If set then blocks errors
|
|
45
|
+
* being rejected with
|
|
46
|
+
*/
|
|
47
|
+
onLoadFailure?: (err: any) => void;
|
|
48
|
+
}
|
|
49
|
+
export interface KubeObjectStoreSubscribeParams {
|
|
50
|
+
/**
|
|
51
|
+
* A function that is called when listing fails. If set then blocks errors
|
|
52
|
+
* being rejected with
|
|
53
|
+
*/
|
|
54
|
+
onLoadFailure?: (err: any) => void;
|
|
33
55
|
}
|
|
34
56
|
export declare abstract class KubeObjectStore<T extends KubeObject> extends ItemStore<T> {
|
|
35
57
|
static defaultContext: import("mobx").IObservableValue<ClusterContext>;
|
|
@@ -56,13 +78,9 @@ export declare abstract class KubeObjectStore<T extends KubeObject> extends Item
|
|
|
56
78
|
getByLabel(labels: string[] | {
|
|
57
79
|
[label: string]: string;
|
|
58
80
|
}): T[];
|
|
59
|
-
protected loadItems({ namespaces, api, reqInit }: KubeObjectStoreLoadingParams<T>): Promise<T[]>;
|
|
81
|
+
protected loadItems({ namespaces, api, reqInit, onLoadFailure }: KubeObjectStoreLoadingParams<T>): Promise<T[]>;
|
|
60
82
|
protected filterItemsOnLoad(items: T[]): T[];
|
|
61
|
-
loadAll(options?:
|
|
62
|
-
namespaces?: string[];
|
|
63
|
-
merge?: boolean;
|
|
64
|
-
reqInit?: RequestInit;
|
|
65
|
-
}): Promise<void | T[]>;
|
|
83
|
+
loadAll(options?: KubeObjectStoreLoadAllParams): Promise<void | T[]>;
|
|
66
84
|
reloadAll(opts?: {
|
|
67
85
|
force?: boolean;
|
|
68
86
|
namespaces?: string[];
|
|
@@ -99,7 +117,7 @@ export declare abstract class KubeObjectStore<T extends KubeObject> extends Item
|
|
|
99
117
|
removeSelectedItems(): Promise<void[]>;
|
|
100
118
|
protected eventsBuffer: import("mobx").IObservableArray<IKubeWatchEvent<KubeJsonApiData>>;
|
|
101
119
|
protected bindWatchEventsUpdater(delay?: number): void;
|
|
102
|
-
subscribe(): () => void;
|
|
120
|
+
subscribe(opts?: KubeObjectStoreSubscribeParams): () => void;
|
|
103
121
|
private watchNamespace;
|
|
104
122
|
protected updateFromEventsBuffer(): void;
|
|
105
123
|
}
|