@k8slens/extensions 5.5.0-git.9203367c60.0 → 5.5.0-git.93069e8600.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +1 -1
  2. package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +17 -10
  3. package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +414 -43
  4. package/dist/src/common/k8s-api/endpoints/secret.api.d.ts +4 -0
  5. package/dist/src/common/k8s-api/kube-object.d.ts +6 -0
  6. package/dist/src/extensions/extension-api.js +231 -231
  7. package/dist/src/main/context-handler/context-handler.d.ts +2 -2
  8. package/dist/src/main/kube-auth-proxy/get-kube-auth-proxy-certificate.d.ts +8 -0
  9. package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +2 -1
  10. package/dist/src/renderer/components/+pod-security-policies/pod-security-policy-details.d.ts +1 -1
  11. package/dist/src/renderer/components/+workloads-pods/details/volumes/variant-helpers.d.ts +21 -0
  12. package/dist/src/renderer/components/+workloads-pods/details/volumes/variant.d.ts +11 -0
  13. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/aws-elastic-block-store.d.ts +6 -0
  14. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/azure-disk.d.ts +2 -0
  15. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/azure-file.d.ts +2 -0
  16. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/ceph-fs.d.ts +6 -0
  17. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/cinder.d.ts +6 -0
  18. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/config-map.d.ts +6 -0
  19. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/container-storage-interface.d.ts +6 -0
  20. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/downward-api.d.ts +6 -0
  21. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/empty-dir.d.ts +2 -0
  22. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/ephemeral.d.ts +2 -0
  23. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/fiber-channel.d.ts +6 -0
  24. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/flex-volume.d.ts +6 -0
  25. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/flocker.d.ts +6 -0
  26. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/gce-persistent-disk.d.ts +6 -0
  27. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/git-repo.d.ts +6 -0
  28. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/gluster-fs.d.ts +6 -0
  29. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/host-path.d.ts +6 -0
  30. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/i-scsi.d.ts +6 -0
  31. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/local.d.ts +6 -0
  32. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/network-fs.d.ts +6 -0
  33. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/persistent-volume-claim.d.ts +6 -0
  34. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/photon-persistent-disk.d.ts +6 -0
  35. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/portworx-volume.d.ts +6 -0
  36. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/projected.d.ts +6 -0
  37. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/quobyte.d.ts +6 -0
  38. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/rados-block-device.d.ts +6 -0
  39. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/scale-io.d.ts +6 -0
  40. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/secret.d.ts +6 -0
  41. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/storage-os.d.ts +6 -0
  42. package/dist/src/renderer/components/+workloads-pods/details/volumes/variants/vsphere-volume.d.ts +6 -0
  43. package/dist/src/renderer/components/+workloads-pods/details/volumes/view.d.ts +9 -0
  44. package/dist/src/renderer/components/+workloads-pods/pod-details-secrets.d.ts +2 -9
  45. package/dist/src/renderer/components/drawer/drawer-item-labels.d.ts +1 -1
  46. package/dist/src/renderer/components/drawer/drawer-item.d.ts +2 -5
  47. package/dist/src/renderer/components/drawer/drawer-title.d.ts +8 -5
  48. package/dist/src/renderer/components/layout/sidebar-cluster.d.ts +2 -2
  49. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  50. package/dist/src/renderer/components/tabs/tabs.d.ts +0 -1
  51. package/package.json +1 -1
  52. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.d.ts +0 -13
  53. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.injectable.d.ts +0 -3
  54. package/dist/src/main/kube-auth-proxy/kube-auth-proxy-ca.injectable.d.ts +0 -4
@@ -50,7 +50,7 @@ export declare const metricsApi: {
50
50
  };
51
51
  export declare function normalizeMetrics(metrics: IMetrics, frames?: number): IMetrics;
52
52
  export declare function isMetricsEmpty(metrics: Record<string, IMetrics>): boolean;
53
- export declare function getItemMetrics(metrics: Record<string, IMetrics>, itemName: string): Record<string, IMetrics> | void;
53
+ export declare function getItemMetrics(metrics: Record<string, IMetrics>, itemName: string): Record<string, IMetrics> | undefined;
54
54
  export declare function getMetricLastPoints(metrics: Record<string, IMetrics>): Partial<{
55
55
  [metric: string]: number;
56
56
  }>;
@@ -15,17 +15,24 @@ export interface IPvcMetrics<T = IMetrics> {
15
15
  diskUsage: T;
16
16
  diskCapacity: T;
17
17
  }
18
- export interface PersistentVolumeClaim {
19
- spec: {
20
- accessModes: string[];
21
- storageClassName: string;
22
- selector: LabelSelector;
23
- resources: {
24
- requests: {
25
- storage: string;
26
- };
27
- };
18
+ export interface PersistentVolumeClaimSpec {
19
+ accessModes: string[];
20
+ selector: LabelSelector;
21
+ resources: {
22
+ requests?: Record<string, string>;
23
+ limits?: Record<string, string>;
24
+ };
25
+ volumeName?: string;
26
+ storageClassName?: string;
27
+ volumeMode?: string;
28
+ dataSource?: {
29
+ apiGroup: string;
30
+ kind: string;
31
+ name: string;
28
32
  };
33
+ }
34
+ export interface PersistentVolumeClaim {
35
+ spec: PersistentVolumeClaimSpec;
29
36
  status: {
30
37
  phase: string;
31
38
  };
@@ -6,6 +6,10 @@ import { IAffinity, WorkloadKubeObject } from "../workload-kube-object";
6
6
  import { IMetrics } from "./metrics.api";
7
7
  import { KubeApi } from "../kube-api";
8
8
  import type { KubeJsonApiData } from "../kube-json-api";
9
+ import type { RequireExactlyOne } from "type-fest";
10
+ import type { KubeObjectMetadata, LocalObjectReference } from "../kube-object";
11
+ import type { SecretReference } from "./secret.api";
12
+ import type { PersistentVolumeClaimSpec } from "./persistent-volume-claims.api";
9
13
  export declare class PodsApi extends KubeApi<Pod> {
10
14
  getLogs: (params: {
11
15
  namespace: string;
@@ -82,12 +86,8 @@ export interface IPodContainer extends Partial<Record<PodContainerProbe, IContai
82
86
  };
83
87
  }[];
84
88
  envFrom?: {
85
- configMapRef?: {
86
- name: string;
87
- };
88
- secretRef?: {
89
- name: string;
90
- };
89
+ configMapRef?: LocalObjectReference;
90
+ secretRef?: LocalObjectReference;
91
91
  }[];
92
92
  volumeMounts?: {
93
93
  name: string;
@@ -156,29 +156,418 @@ export interface IPodContainerStatus {
156
156
  containerID?: string;
157
157
  started?: boolean;
158
158
  }
159
+ export interface AwsElasticBlockStoreSource {
160
+ volumeID: string;
161
+ fsType: string;
162
+ }
163
+ export interface AzureDiskSource {
164
+ /**
165
+ * The name of the VHD blob object OR the name of an Azure managed data disk if `kind` is `"Managed"`.
166
+ */
167
+ diskName: string;
168
+ /**
169
+ * The URI of the vhd blob object OR the `resourceID` of an Azure managed data disk if `kind` is `"Managed"`.
170
+ */
171
+ diskURI: string;
172
+ /**
173
+ * Kind of disk
174
+ * @default "Shared"
175
+ */
176
+ kind?: "Shared" | "Dedicated" | "Managed";
177
+ /**
178
+ * Disk caching mode.
179
+ * @default "None"
180
+ */
181
+ cachingMode?: "None" | "ReadOnly" | "ReadWrite";
182
+ /**
183
+ * The filesystem type to mount.
184
+ * @default "ext4"
185
+ */
186
+ fsType?: string;
187
+ /**
188
+ * Whether the filesystem is used as readOnly.
189
+ * @default false
190
+ */
191
+ readonly?: boolean;
192
+ }
193
+ export interface AzureFileSource {
194
+ /**
195
+ * The name of the secret that contains both Azure storage account name and key.
196
+ */
197
+ secretName: string;
198
+ /**
199
+ * The share name to be used.
200
+ */
201
+ shareName: string;
202
+ /**
203
+ * In case the secret is stored in a different namespace.
204
+ * @default "default"
205
+ */
206
+ secretNamespace?: string;
207
+ /**
208
+ * Whether the filesystem is used as readOnly.
209
+ */
210
+ readOnly: boolean;
211
+ }
212
+ export interface CephfsSource {
213
+ /**
214
+ * List of Ceph monitors
215
+ */
216
+ monitors: string[];
217
+ /**
218
+ * Used as the mounted root, rather than the full Ceph tree.
219
+ * @default "/"
220
+ */
221
+ path?: string;
222
+ /**
223
+ * The RADOS user name.
224
+ * @default "admin"
225
+ */
226
+ user?: string;
227
+ /**
228
+ * The path to the keyring file.
229
+ * @default "/etc/ceph/user.secret"
230
+ */
231
+ secretFile?: string;
232
+ /**
233
+ * Reference to Ceph authentication secrets. If provided, then the secret overrides `secretFile`
234
+ */
235
+ secretRef?: SecretReference;
236
+ /**
237
+ * Whether the filesystem is used as readOnly.
238
+ */
239
+ readOnly: boolean;
240
+ }
241
+ export interface CinderSource {
242
+ volumeID: string;
243
+ fsType: string;
244
+ /**
245
+ * @default false
246
+ */
247
+ readOnly?: boolean;
248
+ secretRef?: SecretReference;
249
+ }
250
+ export interface ConfigMapSource {
251
+ name: string;
252
+ items: {
253
+ key: string;
254
+ path: string;
255
+ }[];
256
+ }
257
+ export interface DownwardApiSource {
258
+ items: {
259
+ path: string;
260
+ fieldRef: {
261
+ fieldPath: string;
262
+ };
263
+ }[];
264
+ }
265
+ export interface EphemeralSource {
266
+ volumeClaimTemplate: {
267
+ /**
268
+ * All the rest of the fields are ignored and rejected during validation
269
+ */
270
+ metadata?: Pick<KubeObjectMetadata, "labels" | "annotations">;
271
+ spec: PersistentVolumeClaimSpec;
272
+ };
273
+ }
274
+ export interface EmptyDirSource {
275
+ medium?: string;
276
+ sizeLimit?: string;
277
+ }
278
+ export interface FiberChannelSource {
279
+ /**
280
+ * A list of World Wide Names
281
+ */
282
+ targetWWNs: string[];
283
+ /**
284
+ * Logical Unit number
285
+ */
286
+ lun: number;
287
+ /**
288
+ * The type of filesystem
289
+ * @default "ext4"
290
+ */
291
+ fsType?: string;
292
+ readOnly: boolean;
293
+ }
294
+ export interface FlockerSource {
295
+ datasetName: string;
296
+ }
297
+ export interface FlexVolumeSource {
298
+ driver: string;
299
+ fsType?: string;
300
+ secretRef?: LocalObjectReference;
301
+ /**
302
+ * @default false
303
+ */
304
+ readOnly?: boolean;
305
+ options?: Record<string, string>;
306
+ }
307
+ export interface GcePersistentDiskSource {
308
+ pdName: string;
309
+ fsType: string;
310
+ }
311
+ export interface GitRepoSource {
312
+ repository: string;
313
+ revision: string;
314
+ }
315
+ export interface GlusterFsSource {
316
+ /**
317
+ * The name of the Endpoints object that represents a Gluster cluster configuration.
318
+ */
319
+ endpoints: string;
320
+ /**
321
+ * The Glusterfs volume name.
322
+ */
323
+ path: string;
324
+ /**
325
+ * The boolean that sets the mountpoint readOnly or readWrite.
326
+ */
327
+ readOnly: boolean;
328
+ }
329
+ export interface HostPathSource {
330
+ path: string;
331
+ /**
332
+ * Determines the sorts of checks that will be done
333
+ * @default ""
334
+ */
335
+ type?: "" | "DirectoryOrCreate" | "Directory" | "FileOrCreate" | "File" | "Socket" | "CharDevice" | "BlockDevice";
336
+ }
337
+ export interface IScsiSource {
338
+ targetPortal: string;
339
+ iqn: string;
340
+ lun: number;
341
+ fsType: string;
342
+ readOnly: boolean;
343
+ chapAuthDiscovery?: boolean;
344
+ chapAuthSession?: boolean;
345
+ secretRef?: SecretReference;
346
+ }
347
+ export interface LocalSource {
348
+ path: string;
349
+ }
350
+ export interface NetworkFsSource {
351
+ server: string;
352
+ path: string;
353
+ readOnly?: boolean;
354
+ }
355
+ export interface PersistentVolumeClaimSource {
356
+ claimName: string;
357
+ }
358
+ export interface PhotonPersistentDiskSource {
359
+ pdID: string;
360
+ /**
361
+ * @default "ext4"
362
+ */
363
+ fsType?: string;
364
+ }
365
+ export interface PortworxVolumeSource {
366
+ volumeID: string;
367
+ fsType?: string;
368
+ readOnly?: boolean;
369
+ }
370
+ export interface ProjectedSource {
371
+ sources: {
372
+ secret?: {
373
+ name: string;
374
+ items?: {
375
+ key: string;
376
+ path: string;
377
+ mode?: number;
378
+ }[];
379
+ };
380
+ downwardAPI?: {
381
+ items?: {
382
+ path: string;
383
+ fieldRef?: {
384
+ fieldPath: string;
385
+ apiVersion?: string;
386
+ };
387
+ resourceFieldRef?: {
388
+ resource: string;
389
+ containerName?: string;
390
+ };
391
+ mode?: number;
392
+ }[];
393
+ };
394
+ configMap?: {
395
+ name: string;
396
+ items?: {
397
+ key: string;
398
+ path: string;
399
+ mode?: number;
400
+ }[];
401
+ optional?: boolean;
402
+ };
403
+ serviceAccountToken?: {
404
+ audience?: string;
405
+ expirationSeconds?: number;
406
+ path: string;
407
+ };
408
+ }[];
409
+ defaultMode: number;
410
+ }
411
+ export interface QuobyteSource {
412
+ registry: string;
413
+ volume: string;
414
+ /**
415
+ * @default false
416
+ */
417
+ readOnly?: boolean;
418
+ /**
419
+ * @default "serivceaccount"
420
+ */
421
+ user?: string;
422
+ group?: string;
423
+ tenant?: string;
424
+ }
425
+ export interface RadosBlockDeviceSource {
426
+ monitors: string[];
427
+ image: string;
428
+ /**
429
+ * @default "ext4"
430
+ */
431
+ fsType?: string;
432
+ /**
433
+ * @default "rbd"
434
+ */
435
+ pool?: string;
436
+ /**
437
+ * @default "admin"
438
+ */
439
+ user?: string;
440
+ /**
441
+ * @default "/etc/ceph/keyring"
442
+ */
443
+ keyring?: string;
444
+ secretRef?: SecretReference;
445
+ /**
446
+ * @default false
447
+ */
448
+ readOnly?: boolean;
449
+ }
450
+ export interface ScaleIoSource {
451
+ gateway: string;
452
+ system: string;
453
+ secretRef?: LocalObjectReference;
454
+ /**
455
+ * @default false
456
+ */
457
+ sslEnabled?: boolean;
458
+ protectionDomain?: string;
459
+ storagePool?: string;
460
+ /**
461
+ * @default "ThinProvisioned"
462
+ */
463
+ storageMode?: "ThickProvisioned" | "ThinProvisioned";
464
+ volumeName: string;
465
+ /**
466
+ * @default "xfs"
467
+ */
468
+ fsType?: string;
469
+ /**
470
+ * @default false
471
+ */
472
+ readOnly?: boolean;
473
+ }
474
+ export interface SecretSource {
475
+ secretName: string;
476
+ items?: {
477
+ key: string;
478
+ path: string;
479
+ mode?: number;
480
+ }[];
481
+ defaultMode?: number;
482
+ optional?: boolean;
483
+ }
484
+ export interface StorageOsSource {
485
+ volumeName: string;
486
+ /**
487
+ * @default Pod.metadata.namespace
488
+ */
489
+ volumeNamespace?: string;
490
+ /**
491
+ * @default "ext4"
492
+ */
493
+ fsType?: string;
494
+ /**
495
+ * @default false
496
+ */
497
+ readOnly?: boolean;
498
+ secretRef?: LocalObjectReference;
499
+ }
500
+ export interface VsphereVolumeSource {
501
+ volumePath: string;
502
+ /**
503
+ * @default "ext4"
504
+ */
505
+ fsType?: string;
506
+ storagePolicyName?: string;
507
+ storagePolicyID?: string;
508
+ }
509
+ export interface ContainerStorageInterfaceSource {
510
+ driver: string;
511
+ /**
512
+ * @default false
513
+ */
514
+ readOnly?: boolean;
515
+ /**
516
+ * @default "ext4"
517
+ */
518
+ fsType?: string;
519
+ volumeAttributes?: Record<string, string>;
520
+ controllerPublishSecretRef?: SecretReference;
521
+ nodeStageSecretRef?: SecretReference;
522
+ nodePublishSecretRef?: SecretReference;
523
+ controllerExpandSecretRef?: SecretReference;
524
+ }
525
+ export interface PodVolumeVariants {
526
+ awsElasticBlockStore: AwsElasticBlockStoreSource;
527
+ azureDisk: AzureDiskSource;
528
+ azureFile: AzureFileSource;
529
+ cephfs: CephfsSource;
530
+ cinder: CinderSource;
531
+ configMap: ConfigMapSource;
532
+ csi: ContainerStorageInterfaceSource;
533
+ downwardAPI: DownwardApiSource;
534
+ emptyDir: EmptyDirSource;
535
+ ephemeral: EphemeralSource;
536
+ fc: FiberChannelSource;
537
+ flexVolume: FlexVolumeSource;
538
+ flocker: FlockerSource;
539
+ gcePersistentDisk: GcePersistentDiskSource;
540
+ gitRepo: GitRepoSource;
541
+ glusterfs: GlusterFsSource;
542
+ hostPath: HostPathSource;
543
+ iscsi: IScsiSource;
544
+ local: LocalSource;
545
+ nfs: NetworkFsSource;
546
+ persistentVolumeClaim: PersistentVolumeClaimSource;
547
+ photonPersistentDisk: PhotonPersistentDiskSource;
548
+ portworxVolume: PortworxVolumeSource;
549
+ projected: ProjectedSource;
550
+ quobyte: QuobyteSource;
551
+ rbd: RadosBlockDeviceSource;
552
+ scaleIO: ScaleIoSource;
553
+ secret: SecretSource;
554
+ storageos: StorageOsSource;
555
+ vsphereVolume: VsphereVolumeSource;
556
+ }
557
+ /**
558
+ * The valid kinds of volume
559
+ */
560
+ export declare type PodVolumeKind = keyof PodVolumeVariants;
561
+ export declare type PodVolume = RequireExactlyOne<PodVolumeVariants> & {
562
+ name: string;
563
+ };
159
564
  export declare class Pod extends WorkloadKubeObject {
160
565
  static kind: string;
161
566
  static namespaced: boolean;
162
567
  static apiBase: string;
163
568
  constructor(data: KubeJsonApiData);
164
569
  spec?: {
165
- volumes?: {
166
- name: string;
167
- persistentVolumeClaim: {
168
- claimName: string;
169
- };
170
- emptyDir: {
171
- medium?: string;
172
- sizeLimit?: string;
173
- };
174
- configMap: {
175
- name: string;
176
- };
177
- secret: {
178
- secretName: string;
179
- defaultMode: number;
180
- };
181
- }[];
570
+ volumes?: PodVolume[];
182
571
  initContainers: IPodContainer[];
183
572
  containers: IPodContainer[];
184
573
  restartPolicy?: string;
@@ -195,9 +584,7 @@ export declare class Pod extends WorkloadKubeObject {
195
584
  [selector: string]: string;
196
585
  };
197
586
  securityContext?: {};
198
- imagePullSecrets?: {
199
- name: string;
200
- }[];
587
+ imagePullSecrets?: LocalObjectReference[];
201
588
  hostNetwork?: boolean;
202
589
  hostPID?: boolean;
203
590
  hostIPC?: boolean;
@@ -255,23 +642,7 @@ export declare class Pod extends WorkloadKubeObject {
255
642
  lastProbeTime: number;
256
643
  lastTransitionTime: string;
257
644
  }[];
258
- getVolumes(): {
259
- name: string;
260
- persistentVolumeClaim: {
261
- claimName: string;
262
- };
263
- emptyDir: {
264
- medium?: string;
265
- sizeLimit?: string;
266
- };
267
- configMap: {
268
- name: string;
269
- };
270
- secret: {
271
- secretName: string;
272
- defaultMode: number;
273
- };
274
- }[];
645
+ getVolumes(): PodVolume[];
275
646
  getSecrets(): string[];
276
647
  getNodeSelectors(): string[];
277
648
  getTolerations(): {
@@ -19,6 +19,10 @@ export interface ISecretRef {
19
19
  key?: string;
20
20
  name: string;
21
21
  }
22
+ export interface SecretReference {
23
+ name: string;
24
+ namespace?: string;
25
+ }
22
26
  export interface SecretData extends KubeJsonApiData {
23
27
  type: SecretType;
24
28
  data?: Record<string, string>;
@@ -11,6 +11,12 @@ export declare type KubeObjectConstructor<K extends KubeObject> = (new (data: Ku
11
11
  namespaced?: boolean;
12
12
  apiBase?: string;
13
13
  };
14
+ /**
15
+ * A reference to an object in the same namespace
16
+ */
17
+ export interface LocalObjectReference {
18
+ name: string;
19
+ }
14
20
  export interface KubeObjectMetadata {
15
21
  uid: string;
16
22
  name: string;