kubernetes-fluent-client 3.1.0 → 3.1.2

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.
Files changed (78) hide show
  1. package/dist/cli.d.ts +3 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +68 -0
  4. package/dist/fetch.d.ts +22 -0
  5. package/dist/fetch.d.ts.map +1 -0
  6. package/dist/fetch.js +82 -0
  7. package/dist/fetch.test.d.ts +2 -0
  8. package/dist/fetch.test.d.ts.map +1 -0
  9. package/dist/fetch.test.js +97 -0
  10. package/dist/fileSystem.d.ts +11 -0
  11. package/dist/fileSystem.d.ts.map +1 -0
  12. package/dist/fileSystem.js +42 -0
  13. package/dist/fileSystem.test.d.ts +2 -0
  14. package/dist/fileSystem.test.d.ts.map +1 -0
  15. package/dist/fileSystem.test.js +75 -0
  16. package/dist/fluent/http2-watch.spec.d.ts +2 -0
  17. package/dist/fluent/http2-watch.spec.d.ts.map +1 -0
  18. package/dist/fluent/http2-watch.spec.js +284 -0
  19. package/dist/fluent/index.d.ts +12 -0
  20. package/dist/fluent/index.d.ts.map +1 -0
  21. package/dist/fluent/index.js +228 -0
  22. package/dist/fluent/index.test.d.ts +2 -0
  23. package/dist/fluent/index.test.d.ts.map +1 -0
  24. package/dist/fluent/index.test.js +193 -0
  25. package/dist/fluent/types.d.ts +201 -0
  26. package/dist/fluent/types.d.ts.map +1 -0
  27. package/dist/fluent/types.js +16 -0
  28. package/dist/fluent/utils.d.ts +41 -0
  29. package/dist/fluent/utils.d.ts.map +1 -0
  30. package/dist/fluent/utils.js +153 -0
  31. package/dist/fluent/utils.test.d.ts +2 -0
  32. package/dist/fluent/utils.test.d.ts.map +1 -0
  33. package/dist/fluent/utils.test.js +215 -0
  34. package/dist/fluent/watch.d.ts +88 -0
  35. package/dist/fluent/watch.d.ts.map +1 -0
  36. package/dist/fluent/watch.js +595 -0
  37. package/dist/fluent/watch.spec.d.ts +2 -0
  38. package/dist/fluent/watch.spec.d.ts.map +1 -0
  39. package/dist/fluent/watch.spec.js +261 -0
  40. package/dist/generate.d.ts +84 -0
  41. package/dist/generate.d.ts.map +1 -0
  42. package/dist/generate.js +208 -0
  43. package/dist/generate.test.d.ts +2 -0
  44. package/dist/generate.test.d.ts.map +1 -0
  45. package/dist/generate.test.js +320 -0
  46. package/dist/helpers.d.ts +33 -0
  47. package/dist/helpers.d.ts.map +1 -0
  48. package/dist/helpers.js +103 -0
  49. package/dist/helpers.test.d.ts +2 -0
  50. package/dist/helpers.test.d.ts.map +1 -0
  51. package/dist/helpers.test.js +37 -0
  52. package/dist/index.d.ts +14 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +60 -0
  55. package/dist/kinds.d.ts +16 -0
  56. package/dist/kinds.d.ts.map +1 -0
  57. package/dist/kinds.js +570 -0
  58. package/dist/kinds.test.d.ts +2 -0
  59. package/dist/kinds.test.d.ts.map +1 -0
  60. package/dist/kinds.test.js +155 -0
  61. package/dist/patch.d.ts +7 -0
  62. package/dist/patch.d.ts.map +1 -0
  63. package/dist/patch.js +2 -0
  64. package/dist/postProcessing.d.ts +246 -0
  65. package/dist/postProcessing.d.ts.map +1 -0
  66. package/dist/postProcessing.js +497 -0
  67. package/dist/postProcessing.test.d.ts +2 -0
  68. package/dist/postProcessing.test.d.ts.map +1 -0
  69. package/dist/postProcessing.test.js +550 -0
  70. package/dist/types.d.ts +32 -0
  71. package/dist/types.d.ts.map +1 -0
  72. package/dist/types.js +16 -0
  73. package/dist/upstream.d.ts +4 -0
  74. package/dist/upstream.d.ts.map +1 -0
  75. package/dist/upstream.js +56 -0
  76. package/package.json +1 -1
  77. package/src/fluent/types.ts +16 -0
  78. package/src/fluent/watch.ts +134 -81
package/dist/kinds.js ADDED
@@ -0,0 +1,570 @@
1
+ "use strict";
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // SPDX-FileCopyrightText: 2023-Present The Kubernetes Fluent Client Authors
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.RegisterKind = void 0;
6
+ exports.modelToGroupVersionKind = modelToGroupVersionKind;
7
+ const gvkMap = {
8
+ /**
9
+ * Represents a K8s Event resource (new Event in the events.k8s.io API)
10
+ * Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
11
+ * Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not
12
+ * rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued
13
+ * existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
14
+ *
15
+ * @see {@link https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/event-v1/}
16
+ */
17
+ EventsV1Event: {
18
+ kind: "Event",
19
+ version: "v1",
20
+ group: "events.k8s.io",
21
+ },
22
+ /**
23
+ * Represents a K8s Event resource (legacy core v1 Event, use the above one instead, it is more complete)
24
+ * Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
25
+ * Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not
26
+ * rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued
27
+ * existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
28
+ *
29
+ * @see {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#event-v1-core}
30
+ */
31
+ CoreV1Event: {
32
+ kind: "Event",
33
+ version: "v1",
34
+ group: "",
35
+ },
36
+ /**
37
+ * Represents a K8s ClusterRole resource.
38
+ * ClusterRole is a set of permissions that can be bound to a user or group in a cluster-wide scope.
39
+ *
40
+ * @see {@link https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole}
41
+ */
42
+ V1ClusterRole: {
43
+ kind: "ClusterRole",
44
+ version: "v1",
45
+ group: "rbac.authorization.k8s.io",
46
+ },
47
+ /**
48
+ * Represents a K8s ClusterRoleBinding resource.
49
+ * ClusterRoleBinding binds a ClusterRole to a user or group in a cluster-wide scope.
50
+ *
51
+ * @see {@link https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding}
52
+ */
53
+ V1ClusterRoleBinding: {
54
+ kind: "ClusterRoleBinding",
55
+ version: "v1",
56
+ group: "rbac.authorization.k8s.io",
57
+ },
58
+ /**
59
+ * Represents a K8s Role resource.
60
+ * Role is a set of permissions that can be bound to a user or group in a namespace scope.
61
+ *
62
+ * @see {@link https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole}
63
+ */
64
+ V1Role: {
65
+ kind: "Role",
66
+ version: "v1",
67
+ group: "rbac.authorization.k8s.io",
68
+ },
69
+ /**
70
+ * Represents a K8s RoleBinding resource.
71
+ * RoleBinding binds a Role to a user or group in a namespace scope.
72
+ *
73
+ * @see {@link https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding}
74
+ */
75
+ V1RoleBinding: {
76
+ kind: "RoleBinding",
77
+ version: "v1",
78
+ group: "rbac.authorization.k8s.io",
79
+ },
80
+ /**
81
+ * Represents a K8s ConfigMap resource.
82
+ * ConfigMap holds configuration data for pods to consume.
83
+ *
84
+ * @see {@link https://kubernetes.io/docs/concepts/configuration/configmap/}
85
+ */
86
+ V1ConfigMap: {
87
+ kind: "ConfigMap",
88
+ version: "v1",
89
+ group: "",
90
+ },
91
+ /**
92
+ * Represents a K8s Endpoints resource.
93
+ * Endpoints expose a service's IP addresses and ports to other resources.
94
+ *
95
+ * @see {@link https://kubernetes.io/docs/concepts/services-networking/service/#endpoints}
96
+ */
97
+ V1Endpoint: {
98
+ kind: "Endpoints",
99
+ version: "v1",
100
+ group: "",
101
+ plural: "endpoints",
102
+ },
103
+ /**
104
+ * Represents a K8s LimitRange resource.
105
+ * LimitRange enforces constraints on the resource consumption of objects in a namespace.
106
+ *
107
+ * @see {@link https://kubernetes.io/docs/concepts/policy/limit-range/}
108
+ */
109
+ V1LimitRange: {
110
+ kind: "LimitRange",
111
+ version: "v1",
112
+ group: "",
113
+ },
114
+ /**
115
+ * Represents a K8s Namespace resource.
116
+ * Namespace is a way to divide cluster resources between multiple users.
117
+ *
118
+ * @see {@link https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/}
119
+ */
120
+ V1Namespace: {
121
+ kind: "Namespace",
122
+ version: "v1",
123
+ group: "",
124
+ },
125
+ /**
126
+ * Represents a K8s Node resource.
127
+ * Node is a worker machine in Kubernetes.
128
+ *
129
+ * @see {@link https://kubernetes.io/docs/concepts/architecture/nodes/}
130
+ */
131
+ V1Node: {
132
+ kind: "Node",
133
+ version: "v1",
134
+ group: "",
135
+ },
136
+ /**
137
+ * Represents a K8s PersistentVolumeClaim resource.
138
+ * PersistentVolumeClaim is a user's request for and claim to a persistent volume.
139
+ *
140
+ * @see {@link https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims}
141
+ */
142
+ V1PersistentVolumeClaim: {
143
+ kind: "PersistentVolumeClaim",
144
+ version: "v1",
145
+ group: "",
146
+ },
147
+ /**
148
+ * Represents a K8s PersistentVolume resource.
149
+ * PersistentVolume is a piece of storage in the cluster that has been provisioned by an administrator.
150
+ *
151
+ * @see {@link https://kubernetes.io/docs/concepts/storage/persistent-volumes/}
152
+ */
153
+ V1PersistentVolume: {
154
+ kind: "PersistentVolume",
155
+ version: "v1",
156
+ group: "",
157
+ },
158
+ /**
159
+ * Represents a K8s Pod resource.
160
+ * Pod is the smallest and simplest unit in the Kubernetes object model.
161
+ *
162
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/pods/}
163
+ */
164
+ V1Pod: {
165
+ kind: "Pod",
166
+ version: "v1",
167
+ group: "",
168
+ },
169
+ /**
170
+ * Represents a K8s PodTemplate resource.
171
+ * PodTemplate is an object that describes the pod that will be created from a higher level abstraction.
172
+ *
173
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/#pod-template}
174
+ */
175
+ V1PodTemplate: {
176
+ kind: "PodTemplate",
177
+ version: "v1",
178
+ group: "",
179
+ },
180
+ /**
181
+ * Represents a K8s ReplicationController resource.
182
+ * ReplicationController ensures that a specified number of pod replicas are running at any given time.
183
+ *
184
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/}
185
+ */
186
+ V1ReplicationController: {
187
+ kind: "ReplicationController",
188
+ version: "v1",
189
+ group: "",
190
+ },
191
+ /**
192
+ * Represents a K8s ResourceQuota resource.
193
+ * ResourceQuota provides constraints that limit resource consumption per namespace.
194
+ *
195
+ * @see {@link https://kubernetes.io/docs/concepts/policy/resource-quotas/}
196
+ */
197
+ V1ResourceQuota: {
198
+ kind: "ResourceQuota",
199
+ version: "v1",
200
+ group: "",
201
+ },
202
+ /**
203
+ * Represents a K8s Secret resource.
204
+ * Secret holds secret data of a certain type.
205
+ *
206
+ * @see {@link https://kubernetes.io/docs/concepts/configuration/secret/}
207
+ */
208
+ V1Secret: {
209
+ kind: "Secret",
210
+ version: "v1",
211
+ group: "",
212
+ },
213
+ /**
214
+ * Represents a K8s ServiceAccount resource.
215
+ * ServiceAccount is an identity that processes in a pod can use to access the Kubernetes API.
216
+ *
217
+ * @see {@link https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/}
218
+ */
219
+ V1ServiceAccount: {
220
+ kind: "ServiceAccount",
221
+ version: "v1",
222
+ group: "",
223
+ },
224
+ /**
225
+ * Represents a K8s Service resource.
226
+ * Service is an abstraction which defines a logical set of Pods and a policy by which to access them.
227
+ *
228
+ * @see {@link https://kubernetes.io/docs/concepts/services-networking/service/}
229
+ */
230
+ V1Service: {
231
+ kind: "Service",
232
+ version: "v1",
233
+ group: "",
234
+ },
235
+ /**
236
+ * Represents a K8s MutatingWebhookConfiguration resource.
237
+ * MutatingWebhookConfiguration configures a mutating admission webhook.
238
+ *
239
+ * @see {@link https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#configure-admission-webhooks-on-the-fly}
240
+ */
241
+ V1MutatingWebhookConfiguration: {
242
+ kind: "MutatingWebhookConfiguration",
243
+ version: "v1",
244
+ group: "admissionregistration.k8s.io",
245
+ },
246
+ /**
247
+ * Represents a K8s ValidatingWebhookConfiguration resource.
248
+ * ValidatingWebhookConfiguration configures a validating admission webhook.
249
+ *
250
+ * @see {@link https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#configure-admission-webhooks-on-the-fly}
251
+ */
252
+ V1ValidatingWebhookConfiguration: {
253
+ kind: "ValidatingWebhookConfiguration",
254
+ version: "v1",
255
+ group: "admissionregistration.k8s.io",
256
+ },
257
+ /**
258
+ * Represents a K8s CustomResourceDefinition resource.
259
+ * CustomResourceDefinition is a custom resource in a Kubernetes cluster.
260
+ *
261
+ * @see {@link https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/}
262
+ */
263
+ V1CustomResourceDefinition: {
264
+ kind: "CustomResourceDefinition",
265
+ version: "v1",
266
+ group: "apiextensions.k8s.io",
267
+ },
268
+ /**
269
+ * Represents a K8s APIService resource.
270
+ * APIService represents a server for a particular API version and group.
271
+ *
272
+ * @see {@link https://kubernetes.io/docs/tasks/access-kubernetes-api/setup-extension-api-server/}
273
+ */
274
+ V1APIService: {
275
+ kind: "APIService",
276
+ version: "v1",
277
+ group: "apiregistration.k8s.io",
278
+ },
279
+ /**
280
+ * Represents a K8s ControllerRevision resource.
281
+ * ControllerRevision is used to manage the history of a StatefulSet or DaemonSet.
282
+ *
283
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#revision-history}
284
+ */
285
+ V1ControllerRevision: {
286
+ kind: "ControllerRevision",
287
+ version: "v1",
288
+ group: "apps",
289
+ },
290
+ /**
291
+ * Represents a K8s DaemonSet resource.
292
+ * DaemonSet ensures that all (or some) nodes run a copy of a Pod.
293
+ *
294
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/}
295
+ */
296
+ V1DaemonSet: {
297
+ kind: "DaemonSet",
298
+ version: "v1",
299
+ group: "apps",
300
+ },
301
+ /**
302
+ * Represents a K8s Deployment resource.
303
+ * Deployment provides declarative updates for Pods and ReplicaSets.
304
+ *
305
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/deployment/}
306
+ */
307
+ V1Deployment: {
308
+ kind: "Deployment",
309
+ version: "v1",
310
+ group: "apps",
311
+ },
312
+ /**
313
+ * Represents a K8s ReplicaSet resource.
314
+ * ReplicaSet ensures that a specified number of pod replicas are running at any given time.
315
+ *
316
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/}
317
+ */
318
+ V1ReplicaSet: {
319
+ kind: "ReplicaSet",
320
+ version: "v1",
321
+ group: "apps",
322
+ },
323
+ /**
324
+ * Represents a K8s StatefulSet resource.
325
+ * StatefulSet is used to manage stateful applications.
326
+ *
327
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/}
328
+ */
329
+ V1StatefulSet: {
330
+ kind: "StatefulSet",
331
+ version: "v1",
332
+ group: "apps",
333
+ },
334
+ /**
335
+ * Represents a K8s TokenReview resource.
336
+ * TokenReview attempts to authenticate a token to a known user.
337
+ *
338
+ * @see {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#tokenreview-v1-authentication-k8s-io}
339
+ */
340
+ V1TokenReview: {
341
+ kind: "TokenReview",
342
+ version: "v1",
343
+ group: "authentication.k8s.io",
344
+ },
345
+ /**
346
+ * Represents a K8s LocalSubjectAccessReview resource.
347
+ * LocalSubjectAccessReview checks whether a specific user can perform a specific action in a specific namespace.
348
+ *
349
+ * @see {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#localsubjectaccessreview-v1-authorization-k8s-io}
350
+ */
351
+ V1LocalSubjectAccessReview: {
352
+ kind: "LocalSubjectAccessReview",
353
+ version: "v1",
354
+ group: "authorization.k8s.io",
355
+ },
356
+ /**
357
+ * Represents a K8s SelfSubjectAccessReview resource.
358
+ * SelfSubjectAccessReview checks whether the current user can perform a specific action.
359
+ *
360
+ * @see {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#selfsubjectaccessreview-v1-authorization-k8s-io}
361
+ */
362
+ V1SelfSubjectAccessReview: {
363
+ kind: "SelfSubjectAccessReview",
364
+ version: "v1",
365
+ group: "authorization.k8s.io",
366
+ },
367
+ /**
368
+ * Represents a K8s SelfSubjectRulesReview resource.
369
+ * SelfSubjectRulesReview lists the permissions a specific user has within a namespace.
370
+ *
371
+ * @see {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#selfsubjectrulesreview-v1-authorization-k8s-io}
372
+ */
373
+ V1SelfSubjectRulesReview: {
374
+ kind: "SelfSubjectRulesReview",
375
+ version: "v1",
376
+ group: "authorization.k8s.io",
377
+ },
378
+ /**
379
+ * Represents a K8s SubjectAccessReview resource.
380
+ * SubjectAccessReview checks whether a specific user can perform a specific action.
381
+ *
382
+ * @see {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#subjectaccessreview-v1-authorization-k8s-io}
383
+ */
384
+ V1SubjectAccessReview: {
385
+ kind: "SubjectAccessReview",
386
+ version: "v1",
387
+ group: "authorization.k8s.io",
388
+ },
389
+ /**
390
+ * Represents a K8s HorizontalPodAutoscaler resource.
391
+ * HorizontalPodAutoscaler automatically scales the number of Pods in a replication controller, deployment, or replica set.
392
+ *
393
+ * @see {@link https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/}
394
+ */
395
+ V1HorizontalPodAutoscaler: {
396
+ kind: "HorizontalPodAutoscaler",
397
+ version: "v2",
398
+ group: "autoscaling",
399
+ },
400
+ /**
401
+ * Represents a K8s CronJob resource.
402
+ * CronJob manages time-based jobs, specifically those that run periodically and complete after a successful execution.
403
+ *
404
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/}
405
+ */
406
+ V1CronJob: {
407
+ kind: "CronJob",
408
+ version: "v1",
409
+ group: "batch",
410
+ },
411
+ /**
412
+ * Represents a K8s Job resource.
413
+ * Job represents the configuration of a single job.
414
+ *
415
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/controllers/job/}
416
+ */
417
+ V1Job: {
418
+ kind: "Job",
419
+ version: "v1",
420
+ group: "batch",
421
+ },
422
+ /**
423
+ * Represents a K8s CertificateSigningRequest resource.
424
+ * CertificateSigningRequest represents a certificate signing request.
425
+ *
426
+ * @see {@link https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/}
427
+ */
428
+ V1CertificateSigningRequest: {
429
+ kind: "CertificateSigningRequest",
430
+ version: "v1",
431
+ group: "certificates.k8s.io",
432
+ },
433
+ /**
434
+ * Represents a K8s EndpointSlice resource.
435
+ * EndpointSlice represents a scalable set of network endpoints for a Kubernetes Service.
436
+ *
437
+ * @see {@link https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/}
438
+ */
439
+ V1EndpointSlice: {
440
+ kind: "EndpointSlice",
441
+ version: "v1",
442
+ group: "discovery.k8s.io",
443
+ },
444
+ /**
445
+ * Represents a K8s IngressClass resource.
446
+ * IngressClass represents the class of the Ingress, referenced by the Ingress spec.
447
+ *
448
+ * @see {@link https://kubernetes.io/docs/concepts/services-networking/ingress/}
449
+ */
450
+ V1IngressClass: {
451
+ kind: "IngressClass",
452
+ version: "v1",
453
+ group: "networking.k8s.io",
454
+ },
455
+ /**
456
+ * Represents a K8s Ingress resource.
457
+ * Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster.
458
+ *
459
+ * @see {@link https://kubernetes.io/docs/concepts/services-networking/ingress/}
460
+ */
461
+ V1Ingress: {
462
+ kind: "Ingress",
463
+ version: "v1",
464
+ group: "networking.k8s.io",
465
+ plural: "ingresses",
466
+ },
467
+ /**
468
+ * Represents a K8s NetworkPolicy resource.
469
+ * NetworkPolicy defines a set of rules for how pods communicate with each other.
470
+ *
471
+ * @see {@link https://kubernetes.io/docs/concepts/services-networking/network-policies/}
472
+ */
473
+ V1NetworkPolicy: {
474
+ kind: "NetworkPolicy",
475
+ version: "v1",
476
+ group: "networking.k8s.io",
477
+ plural: "networkpolicies",
478
+ },
479
+ /**
480
+ * Represents a K8s RuntimeClass resource.
481
+ * RuntimeClass is a cluster-scoped resource that surfaces container runtime properties to the control plane.
482
+ *
483
+ * @see {@link https://kubernetes.io/docs/concepts/containers/runtime-class/}
484
+ */
485
+ V1RuntimeClass: {
486
+ kind: "RuntimeClass",
487
+ version: "v1",
488
+ group: "node.k8s.io",
489
+ },
490
+ /**
491
+ * Represents a K8s PodDisruptionBudget resource.
492
+ * PodDisruptionBudget is an API object that limits the number of pods of a replicated application that are down simultaneously.
493
+ *
494
+ * @see {@link https://kubernetes.io/docs/concepts/workloads/pods/disruptions/}
495
+ */
496
+ V1PodDisruptionBudget: {
497
+ kind: "PodDisruptionBudget",
498
+ version: "v1",
499
+ group: "policy",
500
+ },
501
+ /**
502
+ * Represents a K8s VolumeAttachment resource.
503
+ * VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.
504
+ *
505
+ * @see {@link https://kubernetes.io/docs/concepts/storage/storage-classes/}
506
+ */
507
+ V1VolumeAttachment: {
508
+ kind: "VolumeAttachment",
509
+ version: "v1",
510
+ group: "storage.k8s.io",
511
+ },
512
+ /**
513
+ * Represents a K8s CSIDriver resource.
514
+ * CSIDriver captures information about a Container Storage Interface (CSI) volume driver.
515
+ *
516
+ * @see {@link https://kubernetes.io/docs/concepts/storage/volumes/}
517
+ */
518
+ V1CSIDriver: {
519
+ kind: "CSIDriver",
520
+ version: "v1",
521
+ group: "storage.k8s.io",
522
+ },
523
+ /**
524
+ * Represents a K8s CSIStorageCapacity resource.
525
+ * CSIStorageCapacity stores the reported storage capacity of a CSI node or storage class.
526
+ *
527
+ * @see {@link https://kubernetes.io/docs/concepts/storage/csi/}
528
+ */
529
+ V1CSIStorageCapacity: {
530
+ kind: "CSIStorageCapacity",
531
+ version: "v1",
532
+ group: "storage.k8s.io",
533
+ },
534
+ /**
535
+ * Represents a K8s StorageClass resource.
536
+ * StorageClass is a cluster-scoped resource that provides a way for administrators to describe the classes of storage they offer.
537
+ *
538
+ * @see {@link https://kubernetes.io/docs/concepts/storage/storage-classes/}
539
+ */
540
+ V1StorageClass: {
541
+ kind: "StorageClass",
542
+ version: "v1",
543
+ group: "storage.k8s.io",
544
+ },
545
+ };
546
+ /**
547
+ * Converts a model name to a GroupVersionKind
548
+ *
549
+ * @param key The name of the model
550
+ * @returns The GroupVersionKind for the model
551
+ */
552
+ function modelToGroupVersionKind(key) {
553
+ return gvkMap[key];
554
+ }
555
+ /**
556
+ * Registers a new model and GroupVersionKind to be used within the fluent API.
557
+ *
558
+ * @param model Used to match the GroupVersionKind and define the type-data for the request
559
+ * @param groupVersionKind Contains the match parameters to determine the request should be handled
560
+ */
561
+ const RegisterKind = (model, groupVersionKind) => {
562
+ const name = model.name;
563
+ // Do not allow overwriting existing GVKs
564
+ if (gvkMap[name]) {
565
+ throw new Error(`GVK ${name} already registered`);
566
+ }
567
+ // Set the GVK
568
+ gvkMap[name] = groupVersionKind;
569
+ };
570
+ exports.RegisterKind = RegisterKind;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=kinds.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kinds.test.d.ts","sourceRoot":"","sources":["../src/kinds.test.ts"],"names":[],"mappings":""}