@k8slens/extensions 6.0.1-git.e89841c51e.0 → 6.0.1-git.e89afe081c.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/app-event-bus/app-event-bus.global-override-for-injectable.d.ts +5 -0
- package/dist/src/common/base-store.d.ts +1 -1
- package/dist/src/common/get-configuration-file-model/get-configuration-file-model.injectable.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/index.d.ts +1 -0
- package/dist/src/common/k8s-api/endpoints/job.api.d.ts +4 -3
- package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +5 -2
- package/dist/src/common/k8s-api/endpoints/pod.api.d.ts +13 -129
- package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/types/capabilities.d.ts +17 -0
- package/dist/src/common/k8s-api/endpoints/types/container-port.d.ts +11 -0
- package/dist/src/common/k8s-api/endpoints/types/container.d.ts +158 -0
- package/dist/src/common/k8s-api/endpoints/types/env-from-source.d.ts +13 -0
- package/dist/src/common/k8s-api/endpoints/types/env-source.d.ts +11 -0
- package/dist/src/common/k8s-api/endpoints/types/env-var-key-selector.d.ts +9 -0
- package/dist/src/common/k8s-api/endpoints/types/env-var-source.d.ts +13 -0
- package/dist/src/common/k8s-api/endpoints/types/env-var.d.ts +10 -0
- package/dist/src/common/k8s-api/endpoints/types/exec-action.d.ts +18 -0
- package/dist/src/common/k8s-api/endpoints/types/handler.d.ts +15 -0
- package/dist/src/common/k8s-api/endpoints/types/http-get-action.d.ts +32 -0
- package/dist/src/common/k8s-api/endpoints/types/http-header.d.ts +17 -0
- package/dist/src/common/k8s-api/endpoints/types/index.d.ts +35 -0
- package/dist/src/common/k8s-api/endpoints/types/lifecycle.d.ts +15 -0
- package/dist/src/{main/routes/metrics/metrics-query.d.ts → common/k8s-api/endpoints/types/object-field-selector.d.ts} +4 -3
- package/dist/src/common/k8s-api/endpoints/types/pod-security-context.d.ts +20 -0
- package/dist/src/common/k8s-api/endpoints/types/probe.d.ts +70 -0
- package/dist/src/common/k8s-api/endpoints/types/resource-field-selector.d.ts +9 -0
- package/dist/src/common/k8s-api/endpoints/types/se-linux-options.d.ts +25 -0
- package/dist/src/common/k8s-api/endpoints/types/seccomp-profile.d.ts +27 -0
- package/dist/src/common/k8s-api/endpoints/types/security-context.d.ts +45 -0
- package/dist/src/common/k8s-api/endpoints/types/tcp-socket-action.d.ts +17 -0
- package/dist/src/common/k8s-api/endpoints/types/volume-device.d.ts +17 -0
- package/dist/src/common/k8s-api/endpoints/types/volume-mount.d.ts +12 -0
- package/dist/src/common/k8s-api/endpoints/types/windows-security-context-options.d.ts +36 -0
- package/dist/src/common/utils/singleton.d.ts +1 -1
- package/dist/src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api-with-modifications.d.ts +1 -1
- package/dist/src/extensions/common-api/k8s-api.d.ts +1 -1
- package/dist/src/extensions/extension-api.js +366 -14
- package/dist/src/extensions/extension-store.d.ts +1 -1
- package/dist/src/features/telemetry/emit-telemetry-from-specific-function-calls.test.d.ts +1 -0
- package/dist/src/features/telemetry/renderer/emit-telemetry.injectable.d.ts +5 -0
- package/dist/src/features/telemetry/renderer/telemetry-decorator.injectable.d.ts +11 -0
- package/dist/src/features/telemetry/renderer/telemetry-white-list-for-functions.injectable.d.ts +2 -0
- package/dist/src/main/prometheus/helm-14.d.ts +14 -0
- package/dist/src/renderer/components/+workloads-pods/details/volumes/variant-helpers.d.ts +1 -1
- package/dist/src/renderer/components/+workloads-pods/pod-container-env.d.ts +4 -10
- package/dist/src/renderer/components/+workloads-pods/pod-details-container.d.ts +2 -2
- package/dist/src/renderer/components/dock/logs/create-pod-logs-tab.injectable.d.ts +2 -2
- package/dist/src/renderer/components/layout/sidebar-item.d.ts +0 -1
- package/dist/src/renderer/navigation/index.d.ts +0 -4
- package/dist/src/renderer/navigation/match-route.injectable.d.ts +3 -1
- package/dist/src/renderer/utils/storageHelper.d.ts +1 -1
- package/package.json +1 -1
@@ -0,0 +1,5 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
injectable: import("@ogre-tools/injectable").Injectable<(data_0: import("./event-bus").AppEvent) => void, unknown, void>;
|
3
|
+
overridingInstantiate: import("@ogre-tools/injectable").Instantiate<(data_0: import("./event-bus").AppEvent) => void, void>;
|
4
|
+
};
|
5
|
+
export default _default;
|
@@ -16,7 +16,7 @@ export interface BaseStoreParams<T> extends ConfOptions<T> {
|
|
16
16
|
/**
|
17
17
|
* Note: T should only contain base JSON serializable types.
|
18
18
|
*/
|
19
|
-
export declare abstract class BaseStore<T> extends Singleton {
|
19
|
+
export declare abstract class BaseStore<T extends object> extends Singleton {
|
20
20
|
protected params: BaseStoreParams<T>;
|
21
21
|
protected storeConfig?: Config<T>;
|
22
22
|
protected syncDisposers: Disposer[];
|
package/dist/src/common/get-configuration-file-model/get-configuration-file-model.injectable.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import Config from "conf";
|
2
2
|
import type { BaseStoreParams } from "../base-store";
|
3
|
-
declare const getConfigurationFileModelInjectable: import("@ogre-tools/injectable").Injectable<(<
|
3
|
+
declare const getConfigurationFileModelInjectable: import("@ogre-tools/injectable").Injectable<(<T extends object>(content: BaseStoreParams<T>) => Config<T>), unknown, void>;
|
4
4
|
export default getConfigurationFileModelInjectable;
|
@@ -44,7 +44,7 @@ export declare class DaemonSet extends KubeObject<NamespaceScopedMetadata, Daemo
|
|
44
44
|
getTolerations(): import("../kube-object").Toleration[];
|
45
45
|
getAffinity(): import("../kube-object").Affinity | undefined;
|
46
46
|
getAffinityNumber(): number;
|
47
|
-
getImages(): string[];
|
47
|
+
getImages(): (string | undefined)[];
|
48
48
|
}
|
49
49
|
export declare class DaemonSetApi extends KubeApi<DaemonSet> {
|
50
50
|
constructor(opts?: DerivedKubeApiOptions & IgnoredKubeApiOptions);
|
@@ -4,7 +4,8 @@
|
|
4
4
|
*/
|
5
5
|
import type { DerivedKubeApiOptions, IgnoredKubeApiOptions } from "../kube-api";
|
6
6
|
import { KubeApi } from "../kube-api";
|
7
|
-
import type {
|
7
|
+
import type { PodMetricData, PodSpec } from "./pod.api";
|
8
|
+
import type { Container } from "./types/container";
|
8
9
|
import type { KubeObjectStatus, LabelSelector, NamespaceScopedMetadata } from "../kube-object";
|
9
10
|
import { KubeObject } from "../kube-object";
|
10
11
|
export interface JobSpec {
|
@@ -20,7 +21,7 @@ export interface JobSpec {
|
|
20
21
|
};
|
21
22
|
spec: PodSpec;
|
22
23
|
};
|
23
|
-
containers?:
|
24
|
+
containers?: Container[];
|
24
25
|
restartPolicy?: string;
|
25
26
|
terminationGracePeriodSeconds?: number;
|
26
27
|
dnsPolicy?: string;
|
@@ -47,7 +48,7 @@ export declare class Job extends KubeObject<NamespaceScopedMetadata, JobStatus,
|
|
47
48
|
getCompletions(): number;
|
48
49
|
getParallelism(): number | undefined;
|
49
50
|
getCondition(): import("../kube-object").BaseKubeObjectCondition | undefined;
|
50
|
-
getImages(): string[];
|
51
|
+
getImages(): (string | undefined)[];
|
51
52
|
}
|
52
53
|
export declare class JobApi extends KubeApi<Job> {
|
53
54
|
constructor(opts?: DerivedKubeApiOptions & IgnoredKubeApiOptions);
|
@@ -2,7 +2,6 @@
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
4
|
*/
|
5
|
-
import type { IMetricsQuery } from "../../../main/routes/metrics/metrics-query";
|
6
5
|
export interface MetricData {
|
7
6
|
status: string;
|
8
7
|
data: {
|
@@ -44,11 +43,15 @@ export interface IResourceMetrics<T extends MetricData> {
|
|
44
43
|
networkReceive: T;
|
45
44
|
networkTransmit: T;
|
46
45
|
}
|
46
|
+
declare function getMetrics(query: string, reqParams?: IMetricsReqParams): Promise<MetricData>;
|
47
|
+
declare function getMetrics(query: string[], reqParams?: IMetricsReqParams): Promise<MetricData[]>;
|
48
|
+
declare function getMetrics<MetricNames extends string>(query: Record<MetricNames, Partial<Record<string, string>>>, reqParams?: IMetricsReqParams): Promise<Record<MetricNames, MetricData>>;
|
47
49
|
export declare const metricsApi: {
|
48
|
-
getMetrics
|
50
|
+
getMetrics: typeof getMetrics;
|
49
51
|
getMetricProviders(): Promise<MetricProviderInfo[]>;
|
50
52
|
};
|
51
53
|
export declare function normalizeMetrics(metrics: MetricData | undefined | null, frames?: number): MetricData;
|
52
54
|
export declare function isMetricsEmpty(metrics: Partial<Record<string, MetricData>>): boolean;
|
53
55
|
export declare function getItemMetrics(metrics: Partial<Record<string, MetricData>> | null | undefined, itemName: string): Partial<Record<string, MetricData>> | undefined;
|
54
56
|
export declare function getMetricLastPoints<T extends Partial<Record<string, MetricData>>>(metrics: T): Record<keyof T, number>;
|
57
|
+
export {};
|
@@ -6,10 +6,13 @@ import type { MetricData } from "./metrics.api";
|
|
6
6
|
import type { DerivedKubeApiOptions, IgnoredKubeApiOptions, ResourceDescriptor } from "../kube-api";
|
7
7
|
import { KubeApi } from "../kube-api";
|
8
8
|
import type { RequireExactlyOne } from "type-fest";
|
9
|
-
import type { KubeObjectMetadata, LocalObjectReference, Affinity, Toleration,
|
9
|
+
import type { KubeObjectMetadata, LocalObjectReference, Affinity, Toleration, NamespaceScopedMetadata } from "../kube-object";
|
10
10
|
import type { SecretReference } from "./secret.api";
|
11
11
|
import type { PersistentVolumeClaimSpec } from "./persistent-volume-claim.api";
|
12
12
|
import { KubeObject } from "../kube-object";
|
13
|
+
import type { PodSecurityContext } from "./types/pod-security-context";
|
14
|
+
import type { Container } from "./types/container";
|
15
|
+
import type { ObjectFieldSelector, ResourceFieldSelector } from "./types";
|
13
16
|
export declare class PodApi extends KubeApi<Pod> {
|
14
17
|
constructor(opts?: DerivedKubeApiOptions & IgnoredKubeApiOptions);
|
15
18
|
getLogs(params: ResourceDescriptor, query?: PodLogsQuery): Promise<string>;
|
@@ -44,87 +47,6 @@ export declare enum PodStatusPhase {
|
|
44
47
|
SUCCEEDED = "Succeeded",
|
45
48
|
EVICTED = "Evicted"
|
46
49
|
}
|
47
|
-
export interface ContainerPort {
|
48
|
-
containerPort: number;
|
49
|
-
hostIP?: string;
|
50
|
-
hostPort?: number;
|
51
|
-
name?: string;
|
52
|
-
protocol?: "UDP" | "TCP" | "SCTP";
|
53
|
-
}
|
54
|
-
export interface VolumeMount {
|
55
|
-
name: string;
|
56
|
-
readOnly?: boolean;
|
57
|
-
mountPath: string;
|
58
|
-
mountPropagation?: string;
|
59
|
-
subPath?: string;
|
60
|
-
subPathExpr?: string;
|
61
|
-
}
|
62
|
-
export interface PodContainer extends Partial<Record<PodContainerProbe, IContainerProbe>> {
|
63
|
-
name: string;
|
64
|
-
image: string;
|
65
|
-
command?: string[];
|
66
|
-
args?: string[];
|
67
|
-
ports?: ContainerPort[];
|
68
|
-
resources?: {
|
69
|
-
limits?: {
|
70
|
-
cpu: string;
|
71
|
-
memory: string;
|
72
|
-
};
|
73
|
-
requests?: {
|
74
|
-
cpu: string;
|
75
|
-
memory: string;
|
76
|
-
};
|
77
|
-
};
|
78
|
-
terminationMessagePath?: string;
|
79
|
-
terminationMessagePolicy?: string;
|
80
|
-
env?: {
|
81
|
-
name: string;
|
82
|
-
value?: string;
|
83
|
-
valueFrom?: {
|
84
|
-
fieldRef?: {
|
85
|
-
apiVersion: string;
|
86
|
-
fieldPath: string;
|
87
|
-
};
|
88
|
-
secretKeyRef?: {
|
89
|
-
key: string;
|
90
|
-
name: string;
|
91
|
-
};
|
92
|
-
configMapKeyRef?: {
|
93
|
-
key: string;
|
94
|
-
name: string;
|
95
|
-
};
|
96
|
-
};
|
97
|
-
}[];
|
98
|
-
envFrom?: {
|
99
|
-
configMapRef?: LocalObjectReference;
|
100
|
-
secretRef?: LocalObjectReference;
|
101
|
-
}[];
|
102
|
-
volumeMounts?: VolumeMount[];
|
103
|
-
imagePullPolicy?: string;
|
104
|
-
}
|
105
|
-
export declare type PodContainerProbe = "livenessProbe" | "readinessProbe" | "startupProbe";
|
106
|
-
interface IContainerProbe {
|
107
|
-
httpGet?: {
|
108
|
-
path?: string;
|
109
|
-
/**
|
110
|
-
* either a port number or an IANA_SVC_NAME string referring to a port defined in the container
|
111
|
-
*/
|
112
|
-
port: number | string;
|
113
|
-
scheme: string;
|
114
|
-
host?: string;
|
115
|
-
};
|
116
|
-
exec?: {
|
117
|
-
command: string[];
|
118
|
-
};
|
119
|
-
tcpSocket?: {
|
120
|
-
port: number;
|
121
|
-
};
|
122
|
-
initialDelaySeconds?: number;
|
123
|
-
timeoutSeconds?: number;
|
124
|
-
periodSeconds?: number;
|
125
|
-
successThreshold?: number;
|
126
|
-
failureThreshold?: number;
|
127
|
-
}
|
128
50
|
export interface ContainerStateRunning {
|
129
51
|
startedAt: string;
|
130
52
|
}
|
@@ -385,15 +307,6 @@ export interface ConfigMapProjection {
|
|
385
307
|
items?: KeyToPath[];
|
386
308
|
optional?: boolean;
|
387
309
|
}
|
388
|
-
export interface ObjectFieldSelector {
|
389
|
-
fieldPath: string;
|
390
|
-
apiVersion?: string;
|
391
|
-
}
|
392
|
-
export interface ResourceFieldSelector {
|
393
|
-
resource: string;
|
394
|
-
containerName?: string;
|
395
|
-
divisor?: string;
|
396
|
-
}
|
397
310
|
export interface DownwardAPIVolumeFile {
|
398
311
|
path: string;
|
399
312
|
fieldRef?: ObjectFieldSelector;
|
@@ -580,45 +493,17 @@ export interface HostAlias {
|
|
580
493
|
ip: string;
|
581
494
|
hostnames: string[];
|
582
495
|
}
|
583
|
-
export interface SELinuxOptions {
|
584
|
-
level?: string;
|
585
|
-
role?: string;
|
586
|
-
type?: string;
|
587
|
-
user?: string;
|
588
|
-
}
|
589
|
-
export interface SeccompProfile {
|
590
|
-
localhostProfile?: string;
|
591
|
-
type: string;
|
592
|
-
}
|
593
496
|
export interface Sysctl {
|
594
497
|
name: string;
|
595
498
|
value: string;
|
596
499
|
}
|
597
|
-
export interface WindowsSecurityContextOptions {
|
598
|
-
labelSelector?: LabelSelector;
|
599
|
-
maxSkew: number;
|
600
|
-
topologyKey: string;
|
601
|
-
whenUnsatisfiable: string;
|
602
|
-
}
|
603
|
-
export interface PodSecurityContext {
|
604
|
-
fsGroup?: number;
|
605
|
-
fsGroupChangePolicy?: string;
|
606
|
-
runAsGroup?: number;
|
607
|
-
runAsNonRoot?: boolean;
|
608
|
-
runAsUser?: number;
|
609
|
-
seLinuxOptions?: SELinuxOptions;
|
610
|
-
seccompProfile?: SeccompProfile;
|
611
|
-
supplementalGroups?: number[];
|
612
|
-
sysctls?: Sysctl;
|
613
|
-
windowsOptions?: WindowsSecurityContextOptions;
|
614
|
-
}
|
615
500
|
export interface TopologySpreadConstraint {
|
616
501
|
}
|
617
502
|
export interface PodSpec {
|
618
503
|
activeDeadlineSeconds?: number;
|
619
504
|
affinity?: Affinity;
|
620
505
|
automountServiceAccountToken?: boolean;
|
621
|
-
containers?:
|
506
|
+
containers?: Container[];
|
622
507
|
dnsPolicy?: string;
|
623
508
|
enableServiceLinks?: boolean;
|
624
509
|
ephemeralContainers?: unknown[];
|
@@ -628,7 +513,7 @@ export interface PodSpec {
|
|
628
513
|
hostNetwork?: boolean;
|
629
514
|
hostPID?: boolean;
|
630
515
|
imagePullSecrets?: LocalObjectReference[];
|
631
|
-
initContainers?:
|
516
|
+
initContainers?: Container[];
|
632
517
|
nodeName?: string;
|
633
518
|
nodeSelector?: Partial<Record<string, string>>;
|
634
519
|
overhead?: Partial<Record<string, string>>;
|
@@ -677,10 +562,10 @@ export declare class Pod extends KubeObject<NamespaceScopedMetadata, PodStatus,
|
|
677
562
|
static namespaced: boolean;
|
678
563
|
static apiBase: string;
|
679
564
|
getAffinityNumber(): number;
|
680
|
-
getInitContainers():
|
681
|
-
getContainers():
|
682
|
-
getAllContainers():
|
683
|
-
getRunningContainers():
|
565
|
+
getInitContainers(): Container[];
|
566
|
+
getContainers(): Container[];
|
567
|
+
getAllContainers(): Container[];
|
568
|
+
getRunningContainers(): Container[];
|
684
569
|
getContainerStatuses(includeInitContainers?: boolean): PodContainerStatus[];
|
685
570
|
getRestartsCount(): number;
|
686
571
|
getQosClass(): string;
|
@@ -697,12 +582,11 @@ export declare class Pod extends KubeObject<NamespaceScopedMetadata, PodStatus,
|
|
697
582
|
getTolerations(): Toleration[];
|
698
583
|
getAffinity(): Affinity;
|
699
584
|
hasIssues(): boolean;
|
700
|
-
getLivenessProbe(container:
|
701
|
-
getReadinessProbe(container:
|
702
|
-
getStartupProbe(container:
|
585
|
+
getLivenessProbe(container: Container): string[];
|
586
|
+
getReadinessProbe(container: Container): string[];
|
587
|
+
getStartupProbe(container: Container): string[];
|
703
588
|
private getProbe;
|
704
589
|
getNodeName(): string | undefined;
|
705
590
|
getSelectedNodeOs(): string | undefined;
|
706
591
|
getIPs(): string[];
|
707
592
|
}
|
708
|
-
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* Adds and removes POSIX capabilities from running containers.
|
7
|
+
*/
|
8
|
+
export interface Capabilities {
|
9
|
+
/**
|
10
|
+
* Added capabilities
|
11
|
+
*/
|
12
|
+
add?: string[];
|
13
|
+
/**
|
14
|
+
* Removed capabilities
|
15
|
+
*/
|
16
|
+
drop?: string[];
|
17
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
export interface ContainerPort {
|
6
|
+
containerPort: number;
|
7
|
+
hostIP?: string;
|
8
|
+
hostPort?: number;
|
9
|
+
name?: string;
|
10
|
+
protocol?: "UDP" | "TCP" | "SCTP";
|
11
|
+
}
|
@@ -0,0 +1,158 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { Lifecycle } from "./lifecycle";
|
6
|
+
import type { ResourceRequirements } from "./resource-requirements";
|
7
|
+
import type { SecurityContext } from "./security-context";
|
8
|
+
import type { Probe } from "./probe";
|
9
|
+
import type { VolumeDevice } from "./volume-device";
|
10
|
+
import type { VolumeMount } from "./volume-mount";
|
11
|
+
import type { ContainerPort } from "./container-port";
|
12
|
+
import type { EnvFromSource } from "./env-from-source";
|
13
|
+
import type { EnvVar } from "./env-var";
|
14
|
+
/**
|
15
|
+
* A single application container that you want to run within a pod.
|
16
|
+
*/
|
17
|
+
export interface Container {
|
18
|
+
/**
|
19
|
+
* Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable
|
20
|
+
* references `$(VAR_NAME)` are expanded using the container's environment.
|
21
|
+
*
|
22
|
+
* If a variable cannot be resolved, the reference in the input string will be unchanged.
|
23
|
+
* Double `$$` are reduced to a single `$`, which allows for escaping the `$(VAR_NAME)` syntax:
|
24
|
+
* i.e. `"$$(VAR_NAME)"` will produce the string literal `"$(VAR_NAME)`".
|
25
|
+
*
|
26
|
+
* Escaped references will never be expanded, regardless of whether the variable exists or not.
|
27
|
+
* Cannot be updated.
|
28
|
+
*
|
29
|
+
* More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
|
30
|
+
*/
|
31
|
+
args?: string[];
|
32
|
+
/**
|
33
|
+
* Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this
|
34
|
+
* is not provided. Variable references `$(VAR_NAME)` are expanded using the container's
|
35
|
+
* environment.
|
36
|
+
*
|
37
|
+
* If a variable cannot be resolved, the reference in the input string will be unchanged.
|
38
|
+
* Double `$$` are reduced to a single `$`, which allows for escaping the `$(VAR_NAME)` syntax:
|
39
|
+
* i.e. `"$$(VAR_NAME)"` will produce the string literal `"$(VAR_NAME)`".
|
40
|
+
*
|
41
|
+
* Escaped references will never be expanded, regardless of whether the variable exists or not.
|
42
|
+
* Cannot be updated.
|
43
|
+
*
|
44
|
+
* More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
|
45
|
+
*/
|
46
|
+
command?: string[];
|
47
|
+
/**
|
48
|
+
* List of environment variables to set in the container. Cannot be updated.
|
49
|
+
*/
|
50
|
+
env?: EnvVar[];
|
51
|
+
/**
|
52
|
+
* List of sources to populate environment variables in the container. The keys defined within a
|
53
|
+
* source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the
|
54
|
+
* container is starting.
|
55
|
+
*
|
56
|
+
* When a key exists in multiple sources, the value associated with the last source will take
|
57
|
+
* precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be
|
58
|
+
* updated.
|
59
|
+
*/
|
60
|
+
envFrom?: EnvFromSource[];
|
61
|
+
/**
|
62
|
+
* Docker image name.
|
63
|
+
*
|
64
|
+
* More info: https://kubernetes.io/docs/concepts/containers/images
|
65
|
+
*/
|
66
|
+
image?: string;
|
67
|
+
/**
|
68
|
+
* Image pull policy. Defaults to `"Always"` if :latest tag is specified, or `"IfNotPresent"`
|
69
|
+
* otherwise. Cannot be updated.
|
70
|
+
*
|
71
|
+
* More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
|
72
|
+
*/
|
73
|
+
imagePullPolicy?: "Always" | "Never" | "IfNotPresent";
|
74
|
+
lifecycle?: Lifecycle;
|
75
|
+
livenessProbe?: Probe;
|
76
|
+
/**
|
77
|
+
* Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique
|
78
|
+
* name. Cannot be updated.
|
79
|
+
*/
|
80
|
+
name: string;
|
81
|
+
/**
|
82
|
+
* List of ports to expose from the container. Exposing a port here gives the system additional
|
83
|
+
* information about the network connections a container uses, but is primarily informational.
|
84
|
+
* Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is
|
85
|
+
* listening on the default `"0.0.0.0"` address inside a container will be accessible from the
|
86
|
+
* network. Cannot be updated.
|
87
|
+
*/
|
88
|
+
ports?: ContainerPort[];
|
89
|
+
readinessProbe?: Probe;
|
90
|
+
resources?: ResourceRequirements;
|
91
|
+
securityContext?: SecurityContext;
|
92
|
+
startupProbe?: Probe;
|
93
|
+
/**
|
94
|
+
* Whether this container should allocate a buffer for stdin in the container runtime. If this is
|
95
|
+
* not set, reads from stdin in the container will always result in EOF.
|
96
|
+
*
|
97
|
+
* @default false
|
98
|
+
*/
|
99
|
+
stdin?: boolean;
|
100
|
+
/**
|
101
|
+
* Whether the container runtime should close the stdin channel after it has been opened by a
|
102
|
+
* single attach. When stdin is true the stdin stream will remain open across multiple attach
|
103
|
+
* sessions.
|
104
|
+
*
|
105
|
+
* If stdinOnce is set to true, stdin is opened on container start, is empty until the first
|
106
|
+
* client attaches to stdin, and then remains open and accepts data until the client disconnects,
|
107
|
+
* at which time stdin is closed and remains closed until the container is restarted.
|
108
|
+
*
|
109
|
+
* If this flag is false, a container processes that reads from stdin will never receive an EOF.
|
110
|
+
*
|
111
|
+
* @default false
|
112
|
+
*/
|
113
|
+
stdinOnce?: boolean;
|
114
|
+
/**
|
115
|
+
* Path at which the file to which the container's termination message will be written
|
116
|
+
* is mounted into the container's filesystem. Message written is intended to be brief final
|
117
|
+
* status, such as an assertion failure message.
|
118
|
+
*
|
119
|
+
* Will be truncated by the node if greater than 4096 bytes.
|
120
|
+
* The total message length across all containers will be limited to 12kb. Cannot be updated.
|
121
|
+
*
|
122
|
+
* @default "/dev/termination-log"
|
123
|
+
*/
|
124
|
+
terminationMessagePath?: string;
|
125
|
+
/**
|
126
|
+
* Indicate how the termination message should be populated.
|
127
|
+
*
|
128
|
+
* - `File`: will use the contents of {@link terminationMessagePath} to populate the container
|
129
|
+
* status message on both success and failure.
|
130
|
+
*
|
131
|
+
* - `FallbackToLogsOnError`: will use the last chunk of container log output if the
|
132
|
+
* termination message file is empty and the container exited with an error.
|
133
|
+
*
|
134
|
+
* The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Cannot be updated.
|
135
|
+
*
|
136
|
+
* @default "File"
|
137
|
+
*/
|
138
|
+
terminationMessagePolicy?: "File" | "FallbackToLogsOnError";
|
139
|
+
/**
|
140
|
+
* Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
|
141
|
+
*
|
142
|
+
* @default false
|
143
|
+
*/
|
144
|
+
tty?: boolean;
|
145
|
+
/**
|
146
|
+
* volumeDevices is the list of block devices to be used by the container.
|
147
|
+
*/
|
148
|
+
volumeDevices?: VolumeDevice[];
|
149
|
+
/**
|
150
|
+
* Pod volumes to mount into the container's filesystem. Cannot be updated.
|
151
|
+
*/
|
152
|
+
volumeMounts?: VolumeMount[];
|
153
|
+
/**
|
154
|
+
* Container's working directory. If not specified, the container runtime's default will be used,
|
155
|
+
* which might be configured in the container image. Cannot be updated.
|
156
|
+
*/
|
157
|
+
workingDir?: string;
|
158
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { EnvSource } from "./env-source";
|
6
|
+
export interface EnvFromSource {
|
7
|
+
configMapRef?: EnvSource;
|
8
|
+
/**
|
9
|
+
* An identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
|
10
|
+
*/
|
11
|
+
prefix?: string;
|
12
|
+
secretRef?: EnvSource;
|
13
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { LocalObjectReference } from "../../kube-object";
|
6
|
+
export interface EnvSource extends LocalObjectReference {
|
7
|
+
/**
|
8
|
+
* Whether the object must be defined
|
9
|
+
*/
|
10
|
+
optional?: boolean;
|
11
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { EnvVarKeySelector } from "./env-var-key-selector";
|
6
|
+
import type { ObjectFieldSelector } from "./object-field-selector";
|
7
|
+
import type { ResourceFieldSelector } from "./resource-field-selector";
|
8
|
+
export interface EnvVarSource {
|
9
|
+
configMapKeyRef?: EnvVarKeySelector;
|
10
|
+
fieldRef?: ObjectFieldSelector;
|
11
|
+
resourceFieldRef?: ResourceFieldSelector;
|
12
|
+
secretKeyRef?: EnvVarKeySelector;
|
13
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { EnvVarSource } from "./env-var-source";
|
6
|
+
export interface EnvVar {
|
7
|
+
name: string;
|
8
|
+
value?: string;
|
9
|
+
valueFrom?: EnvVarSource;
|
10
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* ExecAction describes a "run in container" action.
|
7
|
+
*/
|
8
|
+
export interface ExecAction {
|
9
|
+
/**
|
10
|
+
* Command is the command line to execute inside the container, the working directory for the
|
11
|
+
* command is root ('\\') in the container's filesystem. The command is simply exec'd, it is not
|
12
|
+
* run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell,
|
13
|
+
* you need to explicitly call out to that shell.
|
14
|
+
*
|
15
|
+
* Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
|
16
|
+
*/
|
17
|
+
command?: string[];
|
18
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { ExecAction } from "./exec-action";
|
6
|
+
import type { HttpGetAction } from "./http-get-action";
|
7
|
+
import type { TcpSocketAction } from "./tcp-socket-action";
|
8
|
+
/**
|
9
|
+
* Handler defines a specific action that should be taken.
|
10
|
+
*/
|
11
|
+
export interface Handler {
|
12
|
+
exec?: ExecAction;
|
13
|
+
httpGet?: HttpGetAction;
|
14
|
+
tcpSocket?: TcpSocketAction;
|
15
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { HttpHeader } from "./http-header";
|
6
|
+
/**
|
7
|
+
* An action based on HTTP Get requests.
|
8
|
+
*/
|
9
|
+
export interface HttpGetAction {
|
10
|
+
/**
|
11
|
+
* Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.
|
12
|
+
*/
|
13
|
+
host?: string;
|
14
|
+
/**
|
15
|
+
* Custom headers to set in the request. HTTP allows repeated headers.
|
16
|
+
*/
|
17
|
+
httpHeaders?: HttpHeader[];
|
18
|
+
/**
|
19
|
+
* Path to access on the HTTP server.
|
20
|
+
*/
|
21
|
+
path?: string;
|
22
|
+
/**
|
23
|
+
* The PORT to request from.
|
24
|
+
*/
|
25
|
+
port: string | number;
|
26
|
+
/**
|
27
|
+
* Scheme to use for connecting to the host.
|
28
|
+
*
|
29
|
+
* @default "HTTP"
|
30
|
+
*/
|
31
|
+
scheme?: string;
|
32
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* A custom header to be used in HTTP probes and get actions
|
7
|
+
*/
|
8
|
+
export interface HttpHeader {
|
9
|
+
/**
|
10
|
+
* Field name
|
11
|
+
*/
|
12
|
+
name: string;
|
13
|
+
/**
|
14
|
+
* The value of the field
|
15
|
+
*/
|
16
|
+
value: string;
|
17
|
+
}
|