kubernetypes 0.0.0 → 1.35.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/dist/api/admission/v1.d.ts +163 -0
  4. package/dist/api/admission/v1beta1.d.ts +163 -0
  5. package/dist/api/apiextensions/v1.d.ts +868 -0
  6. package/dist/api/apiregistration/v1.d.ts +149 -0
  7. package/dist/api/apps/v1.d.ts +905 -0
  8. package/dist/api/authentication/v1.d.ts +203 -0
  9. package/dist/api/authentication/v1alpha1.d.ts +27 -0
  10. package/dist/api/authentication/v1beta1.d.ts +123 -0
  11. package/dist/api/authorization/v1.d.ts +350 -0
  12. package/dist/api/authorization/v1beta1.d.ts +295 -0
  13. package/dist/api/autoscaling/v1.d.ts +544 -0
  14. package/dist/api/autoscaling/v2.d.ts +594 -0
  15. package/dist/api/batch/v1.d.ts +648 -0
  16. package/dist/api/batch/v1beta1.d.ts +132 -0
  17. package/dist/api/certificates/v1.d.ts +233 -0
  18. package/dist/api/certificates/v1alpha1.d.ts +81 -0
  19. package/dist/api/certificates/v1beta1.d.ts +463 -0
  20. package/dist/api/coordination/v1.d.ts +73 -0
  21. package/dist/api/coordination/v1alpha2.d.ts +76 -0
  22. package/dist/api/coordination/v1beta1.d.ts +147 -0
  23. package/dist/api/core/v1.d.ts +7830 -0
  24. package/dist/api/discovery/v1.d.ts +223 -0
  25. package/dist/api/discovery/v1beta1.d.ts +207 -0
  26. package/dist/api/events/v1.d.ts +114 -0
  27. package/dist/api/events/v1beta1.d.ts +111 -0
  28. package/dist/api/extensions/v1beta1.d.ts +1139 -0
  29. package/dist/api/flowcontrol/v1.d.ts +567 -0
  30. package/dist/api/flowcontrol/v1beta1.d.ts +563 -0
  31. package/dist/api/flowcontrol/v1beta2.d.ts +563 -0
  32. package/dist/api/flowcontrol/v1beta3.d.ts +563 -0
  33. package/dist/api/imagepolicy/v1alpha1.d.ts +73 -0
  34. package/dist/api/networking/v1.d.ts +699 -0
  35. package/dist/api/networking/v1beta1.d.ts +476 -0
  36. package/dist/api/node/v1.d.ts +88 -0
  37. package/dist/api/node/v1alpha1.d.ts +101 -0
  38. package/dist/api/node/v1beta1.d.ts +88 -0
  39. package/dist/api/policy/v1.d.ts +163 -0
  40. package/dist/api/policy/v1beta1.d.ts +164 -0
  41. package/dist/api/resource/v1.d.ts +1499 -0
  42. package/dist/api/resource/v1alpha3.d.ts +209 -0
  43. package/dist/api/resource/v1beta1.d.ts +1513 -0
  44. package/dist/api/resource/v1beta2.d.ts +1499 -0
  45. package/dist/api/scheduling/v1.d.ts +51 -0
  46. package/dist/api/scheduling/v1alpha1.d.ts +167 -0
  47. package/dist/api/scheduling/v1beta1.d.ts +52 -0
  48. package/dist/api/storage/v1.d.ts +688 -0
  49. package/dist/api/storage/v1alpha1.d.ts +278 -0
  50. package/dist/api/storage/v1beta1.d.ts +691 -0
  51. package/dist/api/storagemigration/v1beta1.d.ts +61 -0
  52. package/dist/apimachinery/api/resource.d.ts +124 -0
  53. package/dist/apimachinery/apis/meta/v1.d.ts +1482 -0
  54. package/dist/apimachinery/runtime.d.ts +566 -0
  55. package/dist/apimachinery/types.d.ts +42 -0
  56. package/dist/apimachinery/util/intstr.d.ts +12 -0
  57. package/dist/apimachinery/version.d.ts +39 -0
  58. package/dist/apimachinery/watch.d.ts +102 -0
  59. package/package.json +252 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2026 Mateusz Paduszyński
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # `kubernetypes`
2
+
3
+ ![NPM Version](https://img.shields.io/npm/v/kubernetypes)
4
+ ![NPM License](https://img.shields.io/npm/l/kubernetypes)
5
+
6
+ TypeScript types for core Kubernetes APIs.
7
+
8
+ ## Installation
9
+
10
+ For latest Kubernetes version:
11
+
12
+ ```shell
13
+ npm install kubernetypes
14
+ ```
15
+
16
+ For specific Kubernetes version:
17
+
18
+ ```shell
19
+ npm install kubernetypes@<k8s version>
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ```typescript
25
+ import type { Pod } from 'kubernetypes/api/core/v1';
26
+
27
+ export default {
28
+ apiVersion: 'v1',
29
+ kind: 'Pod',
30
+ metadata: {
31
+ name: 'foobar',
32
+ },
33
+ spec: {
34
+ containers: [
35
+ {
36
+ name: 'app',
37
+ image: 'alpine:latest',
38
+ /* ... */
39
+ },
40
+ ],
41
+ },
42
+ } satisfies Pod;
43
+ ```
44
+
45
+ ## License
46
+
47
+ MIT
@@ -0,0 +1,163 @@
1
+ import * as m2 from 'kubernetypes/api/authentication/v1';
2
+ import * as m1 from 'kubernetypes/apimachinery/apis/meta/v1';
3
+ import * as m3 from 'kubernetypes/apimachinery/runtime';
4
+ import * as m0 from 'kubernetypes/apimachinery/types';
5
+ /**
6
+ * AdmissionRequest describes the admission.Attributes for the admission request.
7
+ */
8
+ export type AdmissionRequest = {
9
+ /**
10
+ * dryRun indicates that modifications will definitely not be persisted for this request.
11
+ * Defaults to false.
12
+ */
13
+ 'dryRun'?: boolean;
14
+ /**
15
+ * kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
16
+ */
17
+ 'kind': m1.GroupVersionKind;
18
+ /**
19
+ * name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
20
+ * rely on the server to generate the name. If that is the case, this field will contain an empty string.
21
+ */
22
+ 'name'?: string;
23
+ /**
24
+ * namespace is the namespace associated with the request (if any).
25
+ */
26
+ 'namespace'?: string;
27
+ /**
28
+ * object is the object from the incoming request.
29
+ */
30
+ 'object'?: m3.RawExtension;
31
+ /**
32
+ * oldObject is the existing object. Only populated for DELETE and UPDATE requests.
33
+ */
34
+ 'oldObject'?: m3.RawExtension;
35
+ /**
36
+ * operation is the operation being performed. This may be different than the operation
37
+ * requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
38
+ */
39
+ 'operation': Operation;
40
+ /**
41
+ * options is the operation option structure of the operation being performed.
42
+ * e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
43
+ * different than the options the caller provided. e.g. for a patch request the performed
44
+ * Operation might be a CREATE, in which case the Options will a
45
+ * `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
46
+ */
47
+ 'options'?: m3.RawExtension;
48
+ /**
49
+ * requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
50
+ * If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
51
+ *
52
+ * For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
53
+ * `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
54
+ * an API request to apps/v1beta1 deployments would be converted and sent to the webhook
55
+ * with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
56
+ * and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).
57
+ *
58
+ * See documentation for the "matchPolicy" field in the webhook configuration type for more details.
59
+ */
60
+ 'requestKind'?: m1.GroupVersionKind;
61
+ /**
62
+ * requestResource is the fully-qualified resource of the original API request (for example, v1.pods).
63
+ * If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
64
+ *
65
+ * For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
66
+ * `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
67
+ * an API request to apps/v1beta1 deployments would be converted and sent to the webhook
68
+ * with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
69
+ * and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).
70
+ *
71
+ * See documentation for the "matchPolicy" field in the webhook configuration type.
72
+ */
73
+ 'requestResource'?: m1.GroupVersionResource;
74
+ /**
75
+ * requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
76
+ * If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
77
+ * See documentation for the "matchPolicy" field in the webhook configuration type.
78
+ */
79
+ 'requestSubResource'?: string;
80
+ /**
81
+ * resource is the fully-qualified resource being requested (for example, v1.pods)
82
+ */
83
+ 'resource': m1.GroupVersionResource;
84
+ /**
85
+ * subResource is the subresource being requested, if any (for example, "status" or "scale")
86
+ */
87
+ 'subResource'?: string;
88
+ /**
89
+ * uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
90
+ * otherwise identical (parallel requests, requests when earlier requests did not modify etc)
91
+ * The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
92
+ * It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
93
+ */
94
+ 'uid': m0.UID;
95
+ /**
96
+ * userInfo is information about the requesting user
97
+ */
98
+ 'userInfo': m2.UserInfo;
99
+ };
100
+ /**
101
+ * AdmissionResponse describes an admission response.
102
+ */
103
+ export type AdmissionResponse = {
104
+ /**
105
+ * allowed indicates whether or not the admission request was permitted.
106
+ */
107
+ 'allowed': boolean;
108
+ /**
109
+ * auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
110
+ * MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
111
+ * admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
112
+ * the admission webhook to add additional context to the audit log for this request.
113
+ */
114
+ 'auditAnnotations'?: {
115
+ [key: string]: string;
116
+ };
117
+ /**
118
+ * patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902.
119
+ */
120
+ 'patch'?: number[];
121
+ /**
122
+ * patchType is the type of Patch. Currently we only allow "JSONPatch".
123
+ */
124
+ 'patchType'?: PatchType;
125
+ /**
126
+ * status is the result contains extra details into why an admission request was denied.
127
+ * This field IS NOT consulted in any way if "Allowed" is "true".
128
+ */
129
+ 'status'?: m1.Status;
130
+ /**
131
+ * uid is an identifier for the individual request/response.
132
+ * This must be copied over from the corresponding AdmissionRequest.
133
+ */
134
+ 'uid': m0.UID;
135
+ /**
136
+ * warnings is a list of warning messages to return to the requesting API client.
137
+ * Warning messages describe a problem the client making the API request should correct or be aware of.
138
+ * Limit warnings to 120 characters if possible.
139
+ * Warnings over 256 characters and large numbers of warnings may be truncated.
140
+ */
141
+ 'warnings'?: string[];
142
+ };
143
+ /**
144
+ * AdmissionReview describes an admission review request/response.
145
+ */
146
+ export type AdmissionReview = m1.TypeMeta<'admission.k8s.io/v1', 'AdmissionReview'> & {
147
+ /**
148
+ * request describes the attributes for the admission request.
149
+ */
150
+ 'request'?: AdmissionRequest;
151
+ /**
152
+ * response describes the attributes for the admission response.
153
+ */
154
+ 'response'?: AdmissionResponse;
155
+ };
156
+ /**
157
+ * Operation is the type of resource operation being checked for admission control
158
+ */
159
+ export type Operation = 'CONNECT' | 'CREATE' | 'DELETE' | 'UPDATE' | (string & {});
160
+ /**
161
+ * PatchType is the type of patch being used to represent the mutated object
162
+ */
163
+ export type PatchType = 'JSONPatch' | (string & {});
@@ -0,0 +1,163 @@
1
+ import * as m2 from 'kubernetypes/api/authentication/v1';
2
+ import * as m1 from 'kubernetypes/apimachinery/apis/meta/v1';
3
+ import * as m3 from 'kubernetypes/apimachinery/runtime';
4
+ import * as m0 from 'kubernetypes/apimachinery/types';
5
+ /**
6
+ * AdmissionRequest describes the admission.Attributes for the admission request.
7
+ */
8
+ export type AdmissionRequest = {
9
+ /**
10
+ * dryRun indicates that modifications will definitely not be persisted for this request.
11
+ * Defaults to false.
12
+ */
13
+ 'dryRun'?: boolean;
14
+ /**
15
+ * kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
16
+ */
17
+ 'kind': m1.GroupVersionKind;
18
+ /**
19
+ * name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
20
+ * rely on the server to generate the name. If that is the case, this field will contain an empty string.
21
+ */
22
+ 'name'?: string;
23
+ /**
24
+ * namespace is the namespace associated with the request (if any).
25
+ */
26
+ 'namespace'?: string;
27
+ /**
28
+ * object is the object from the incoming request.
29
+ */
30
+ 'object'?: m3.RawExtension;
31
+ /**
32
+ * oldObject is the existing object. Only populated for DELETE and UPDATE requests.
33
+ */
34
+ 'oldObject'?: m3.RawExtension;
35
+ /**
36
+ * operation is the operation being performed. This may be different than the operation
37
+ * requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
38
+ */
39
+ 'operation': Operation;
40
+ /**
41
+ * options is the operation option structure of the operation being performed.
42
+ * e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
43
+ * different than the options the caller provided. e.g. for a patch request the performed
44
+ * Operation might be a CREATE, in which case the Options will a
45
+ * `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
46
+ */
47
+ 'options'?: m3.RawExtension;
48
+ /**
49
+ * requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
50
+ * If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
51
+ *
52
+ * For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
53
+ * `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
54
+ * an API request to apps/v1beta1 deployments would be converted and sent to the webhook
55
+ * with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
56
+ * and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).
57
+ *
58
+ * See documentation for the "matchPolicy" field in the webhook configuration type for more details.
59
+ */
60
+ 'requestKind'?: m1.GroupVersionKind;
61
+ /**
62
+ * requestResource is the fully-qualified resource of the original API request (for example, v1.pods).
63
+ * If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
64
+ *
65
+ * For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
66
+ * `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
67
+ * an API request to apps/v1beta1 deployments would be converted and sent to the webhook
68
+ * with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
69
+ * and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).
70
+ *
71
+ * See documentation for the "matchPolicy" field in the webhook configuration type.
72
+ */
73
+ 'requestResource'?: m1.GroupVersionResource;
74
+ /**
75
+ * requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
76
+ * If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
77
+ * See documentation for the "matchPolicy" field in the webhook configuration type.
78
+ */
79
+ 'requestSubResource'?: string;
80
+ /**
81
+ * resource is the fully-qualified resource being requested (for example, v1.pods)
82
+ */
83
+ 'resource': m1.GroupVersionResource;
84
+ /**
85
+ * subResource is the subresource being requested, if any (for example, "status" or "scale")
86
+ */
87
+ 'subResource'?: string;
88
+ /**
89
+ * uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
90
+ * otherwise identical (parallel requests, requests when earlier requests did not modify etc)
91
+ * The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
92
+ * It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
93
+ */
94
+ 'uid': m0.UID;
95
+ /**
96
+ * userInfo is information about the requesting user
97
+ */
98
+ 'userInfo': m2.UserInfo;
99
+ };
100
+ /**
101
+ * AdmissionResponse describes an admission response.
102
+ */
103
+ export type AdmissionResponse = {
104
+ /**
105
+ * allowed indicates whether or not the admission request was permitted.
106
+ */
107
+ 'allowed': boolean;
108
+ /**
109
+ * auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
110
+ * MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
111
+ * admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
112
+ * the admission webhook to add additional context to the audit log for this request.
113
+ */
114
+ 'auditAnnotations'?: {
115
+ [key: string]: string;
116
+ };
117
+ /**
118
+ * patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902.
119
+ */
120
+ 'patch'?: number[];
121
+ /**
122
+ * patchType is the type of Patch. Currently we only allow "JSONPatch".
123
+ */
124
+ 'patchType'?: PatchType;
125
+ /**
126
+ * status is the result contains extra details into why an admission request was denied.
127
+ * This field IS NOT consulted in any way if "Allowed" is "true".
128
+ */
129
+ 'status'?: m1.Status;
130
+ /**
131
+ * uid is an identifier for the individual request/response.
132
+ * This should be copied over from the corresponding AdmissionRequest.
133
+ */
134
+ 'uid': m0.UID;
135
+ /**
136
+ * warnings is a list of warning messages to return to the requesting API client.
137
+ * Warning messages describe a problem the client making the API request should correct or be aware of.
138
+ * Limit warnings to 120 characters if possible.
139
+ * Warnings over 256 characters and large numbers of warnings may be truncated.
140
+ */
141
+ 'warnings'?: string[];
142
+ };
143
+ /**
144
+ * AdmissionReview describes an admission review request/response.
145
+ */
146
+ export type AdmissionReview = m1.TypeMeta<'admission.k8s.io/v1beta1', 'AdmissionReview'> & {
147
+ /**
148
+ * request describes the attributes for the admission request.
149
+ */
150
+ 'request'?: AdmissionRequest;
151
+ /**
152
+ * response describes the attributes for the admission response.
153
+ */
154
+ 'response'?: AdmissionResponse;
155
+ };
156
+ /**
157
+ * Operation is the type of resource operation being checked for admission control
158
+ */
159
+ export type Operation = 'CONNECT' | 'CREATE' | 'DELETE' | 'UPDATE' | (string & {});
160
+ /**
161
+ * PatchType is the type of patch being used to represent the mutated object
162
+ */
163
+ export type PatchType = 'JSONPatch' | (string & {});