@cloudfleet/sdk 0.5.0 → 0.5.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.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas.gen.d.ts +0 -22
- package/dist/schemas.gen.d.ts.map +1 -1
- package/dist/schemas.gen.js +0 -22
- package/dist/schemas.gen.js.map +1 -1
- package/dist/sdk.gen.d.ts +5 -17
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/sdk.gen.js +4 -30
- package/dist/sdk.gen.js.map +1 -1
- package/dist/services/kubernetes/api.d.ts +196 -0
- package/dist/services/kubernetes/api.d.ts.map +1 -0
- package/dist/services/kubernetes/api.js +140 -0
- package/dist/services/kubernetes/api.js.map +1 -0
- package/dist/services/kubernetes/index.d.ts +44 -0
- package/dist/services/kubernetes/index.d.ts.map +1 -0
- package/dist/services/kubernetes/index.js +68 -0
- package/dist/services/kubernetes/index.js.map +1 -0
- package/dist/services/kubernetes/types.d.ts +1335 -0
- package/dist/services/kubernetes/types.d.ts.map +1 -0
- package/dist/services/kubernetes/types.js +2 -0
- package/dist/services/kubernetes/types.js.map +1 -0
- package/dist/types.gen.d.ts +0 -59
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/zod.gen.d.ts +0 -194
- package/dist/zod.gen.d.ts.map +1 -1
- package/dist/zod.gen.js +1 -10
- package/dist/zod.gen.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,1335 @@
|
|
|
1
|
+
interface KubeOwnerReference {
|
|
2
|
+
/** API version of the referent. */
|
|
3
|
+
apiVersion: string;
|
|
4
|
+
/**
|
|
5
|
+
* If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot
|
|
6
|
+
* be deleted from the key-value store until this reference is removed.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion | foreground deletion}
|
|
9
|
+
* for how the garbage collector interacts with this field and enforces the foreground deletion.
|
|
10
|
+
*
|
|
11
|
+
* Defaults to false. To set this field, a user needs "delete" permission of the owner,
|
|
12
|
+
* otherwise 422 (Unprocessable Entity) will be returned.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
blockOwnerDeletion: boolean;
|
|
16
|
+
/** If true, this reference points to the managing controller. */
|
|
17
|
+
controller: boolean;
|
|
18
|
+
/** Kind of the referent. */
|
|
19
|
+
kind: string;
|
|
20
|
+
/** Name of the referent. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** UID of the referent. */
|
|
23
|
+
uid: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the
|
|
27
|
+
* resource that the fieldset applies to.
|
|
28
|
+
*/
|
|
29
|
+
interface KubeManagedFieldsEntry {
|
|
30
|
+
/**
|
|
31
|
+
* APIVersion defines the version of this resource that this field set applies to.
|
|
32
|
+
* The format is "group/version" just like the top-level APIVersion field.
|
|
33
|
+
* It is necessary to track the version of a field set because it cannot be
|
|
34
|
+
* automatically converted.
|
|
35
|
+
*/
|
|
36
|
+
apiVersion: string;
|
|
37
|
+
/**
|
|
38
|
+
* FieldsType is the discriminator for the different fields format and version.
|
|
39
|
+
* There is currently only one possible value: "FieldsV1"
|
|
40
|
+
*/
|
|
41
|
+
fieldsType: string;
|
|
42
|
+
/**
|
|
43
|
+
* FieldsV1 holds the first JSON version format as described in the "FieldsV1" type.
|
|
44
|
+
*/
|
|
45
|
+
fieldsV1: object;
|
|
46
|
+
/**
|
|
47
|
+
* Manager is an identifier of the workflow managing these fields.
|
|
48
|
+
*/
|
|
49
|
+
manager: string;
|
|
50
|
+
/**
|
|
51
|
+
* Operation is the type of operation which lead to this ManagedFieldsEntry being
|
|
52
|
+
* created. The only valid values for this field are 'Apply' and 'Update'.
|
|
53
|
+
*/
|
|
54
|
+
operation: string;
|
|
55
|
+
/**
|
|
56
|
+
* Subresource is the name of the subresource used to update that object, or empty
|
|
57
|
+
* string if the object was updated through the main resource. The value of this
|
|
58
|
+
* field is used to distinguish between managers, even if they share the same name.
|
|
59
|
+
* For example, a status update will be distinct from a regular update using the
|
|
60
|
+
* same manager name. Note that the APIVersion field is not related to the
|
|
61
|
+
* Subresource field and it always corresponds to the version of the main resource.
|
|
62
|
+
*/
|
|
63
|
+
subresource: string;
|
|
64
|
+
/**
|
|
65
|
+
* Time is the timestamp of when the ManagedFields entry was added.The timestamp
|
|
66
|
+
* will also be updated if a field is added, the manager changes any of the owned
|
|
67
|
+
* fields value or removes a field. The timestamp does not update when a field is
|
|
68
|
+
* removed from the entry because another manager took it over.
|
|
69
|
+
*/
|
|
70
|
+
timestamp: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* KubeMetadata contains the metadata that is common to all Kubernetes objects.
|
|
74
|
+
*
|
|
75
|
+
* @see {@link https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata | Metadata} for more details.
|
|
76
|
+
*/
|
|
77
|
+
export interface KubeMetadata {
|
|
78
|
+
/**
|
|
79
|
+
* A map of string keys and values that can be used by external tooling to store and
|
|
80
|
+
* retrieve arbitrary metadata about this object
|
|
81
|
+
* @see {@link https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | annotations docs} for more details.
|
|
82
|
+
*/
|
|
83
|
+
annotations?: Record<string, string>;
|
|
84
|
+
/**
|
|
85
|
+
* An RFC 3339 date of the date and time an object was created
|
|
86
|
+
*/
|
|
87
|
+
creationTimestamp: string;
|
|
88
|
+
/**
|
|
89
|
+
* Number of seconds allowed for this object to gracefully terminate before it
|
|
90
|
+
* will be removed from the system. Only set when deletionTimestamp is also set.
|
|
91
|
+
* May only be shortened.
|
|
92
|
+
* Read-only.
|
|
93
|
+
*/
|
|
94
|
+
deletionGracePeriodSeconds?: number;
|
|
95
|
+
/**
|
|
96
|
+
* An RFC 3339 date of the date and time after which this resource will be deleted.
|
|
97
|
+
* This field is set by the server when a graceful deletion is requested by the
|
|
98
|
+
* user, and is not directly settable by a client. The resource will be deleted
|
|
99
|
+
* (no longer visible from resource lists, and not reachable by name) after the
|
|
100
|
+
* time in this field except when the object has a finalizer set. In case the
|
|
101
|
+
* finalizer is set the deletion of the object is postponed at least until the
|
|
102
|
+
* finalizer is removed. Once the deletionTimestamp is set, this value may not
|
|
103
|
+
* be unset or be set further into the future, although it may be shortened or
|
|
104
|
+
* the resource may be deleted prior to this time.
|
|
105
|
+
*/
|
|
106
|
+
deletionTimestamp?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Must be empty before the object is deleted from the registry. Each entry is
|
|
109
|
+
* an identifier for the responsible component that will remove the entry from
|
|
110
|
+
* the list. If the deletionTimestamp of the object is non-nil, entries in this
|
|
111
|
+
* list can only be removed. Finalizers may be processed and removed in any order.
|
|
112
|
+
* Order is NOT enforced because it introduces significant risk of stuck finalizers.
|
|
113
|
+
* finalizers is a shared field, any actor with permission can reorder it.
|
|
114
|
+
* If the finalizer list is processed in order, then this can lead to a situation
|
|
115
|
+
* in which the component responsible for the first finalizer in the list is
|
|
116
|
+
* waiting for a signal (field value, external system, or other) produced by a
|
|
117
|
+
* component responsible for a finalizer later in the list, resulting in a deadlock.
|
|
118
|
+
* Without enforced ordering finalizers are free to order amongst themselves and
|
|
119
|
+
* are not vulnerable to ordering changes in the list.
|
|
120
|
+
*
|
|
121
|
+
* patch strategy: merge
|
|
122
|
+
*/
|
|
123
|
+
finalizers?: string[];
|
|
124
|
+
/**
|
|
125
|
+
* GenerateName is an optional prefix, used by the server, to generate a unique
|
|
126
|
+
* name ONLY IF the Name field has not been provided. If this field is used,
|
|
127
|
+
* the name returned to the client will be different than the name passed.
|
|
128
|
+
* This value will also be combined with a unique suffix. The provided value
|
|
129
|
+
* has the same validation rules as the Name field, and may be truncated by
|
|
130
|
+
* the length of the suffix required to make the value unique on the server.
|
|
131
|
+
* If this field is specified and the generated name exists, the server will
|
|
132
|
+
* return a 409. Applied only if Name is not specified.
|
|
133
|
+
*
|
|
134
|
+
* @see {@link https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency | more info}
|
|
135
|
+
*/
|
|
136
|
+
generateName?: string;
|
|
137
|
+
/**
|
|
138
|
+
* A sequence number representing a specific generation of the desired state.
|
|
139
|
+
* Populated by the system.
|
|
140
|
+
* Read-only.
|
|
141
|
+
*/
|
|
142
|
+
generation?: number;
|
|
143
|
+
/**
|
|
144
|
+
* A map of string keys and values that can be used to organize and categorize objects
|
|
145
|
+
*
|
|
146
|
+
* @see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
|
147
|
+
*/
|
|
148
|
+
labels?: Record<string, string>;
|
|
149
|
+
/**
|
|
150
|
+
* Maps workflow-id and version to the set of fields that are managed by that workflow.
|
|
151
|
+
* This is mostly for internal housekeeping, and users typically shouldn't need to set
|
|
152
|
+
* or understand this field. A workflow can be the user's name, a controller's name, or
|
|
153
|
+
* the name of a specific apply path like "ci-cd". The set of fields is always in the
|
|
154
|
+
* version that the workflow used when modifying the object.
|
|
155
|
+
*/
|
|
156
|
+
managedFields?: KubeManagedFieldsEntry[];
|
|
157
|
+
/**
|
|
158
|
+
* Uniquely identifies this object within the current namespace (see the identifiers docs).
|
|
159
|
+
* This value is used in the path when retrieving an individual object.
|
|
160
|
+
*
|
|
161
|
+
* @see {@link https://kubernetes.io/docs/concepts/overview/working-with-objects/names/ | Names docs} for more details.
|
|
162
|
+
*/
|
|
163
|
+
name: string;
|
|
164
|
+
/**
|
|
165
|
+
* Namespace defines the space within which each name must be unique. An empty namespace is
|
|
166
|
+
* equivalent to the "default" namespace, but "default" is the canonical representation.
|
|
167
|
+
* Not all objects are required to be scoped to a namespace - the value of this field for
|
|
168
|
+
* those objects will be empty. Must be a DNS_LABEL. Cannot be updated.
|
|
169
|
+
*
|
|
170
|
+
* @see {@link https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ | Namespaces docs} for more details.
|
|
171
|
+
*/
|
|
172
|
+
namespace?: string;
|
|
173
|
+
/**
|
|
174
|
+
* List of objects depended by this object. If ALL objects in the list have been deleted,
|
|
175
|
+
* this object will be garbage collected. If this object is managed by a controller,
|
|
176
|
+
* then an entry in this list will point to this controller, with the controller field
|
|
177
|
+
* set to true. There cannot be more than one managing controller.
|
|
178
|
+
*/
|
|
179
|
+
ownerReferences?: KubeOwnerReference[];
|
|
180
|
+
/**
|
|
181
|
+
* Identifies the internal version of this object that can be used by clients to
|
|
182
|
+
* determine when objects have changed. This value MUST be treated as opaque by
|
|
183
|
+
* clients and passed unmodified back to the server. Clients should not assume
|
|
184
|
+
* that the resource version has meaning across namespaces, different kinds of
|
|
185
|
+
* resources, or different servers.
|
|
186
|
+
*
|
|
187
|
+
* @see {@link https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency | concurrency control docs} for more details
|
|
188
|
+
*/
|
|
189
|
+
resourceVersion?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.
|
|
192
|
+
*/
|
|
193
|
+
selfLink?: string;
|
|
194
|
+
/**
|
|
195
|
+
* UID is the unique in time and space value for this object. It is typically generated by
|
|
196
|
+
* the server on successful creation of a resource and is not allowed to change on PUT
|
|
197
|
+
* operations. Populated by the system. Read-only.
|
|
198
|
+
*
|
|
199
|
+
* @see {@link https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids | UIDs docs} for more details.
|
|
200
|
+
*/
|
|
201
|
+
uid: string;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
* @link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#container-v1-core
|
|
206
|
+
*/
|
|
207
|
+
export interface KubeContainer {
|
|
208
|
+
/**
|
|
209
|
+
* Arguments to the entrypoint. The container image's CMD is used if this is not provided.
|
|
210
|
+
* Variable references $(VAR_NAME) are expanded using the container's environment.
|
|
211
|
+
* If a variable cannot be resolved, the reference in the input string will be unchanged.
|
|
212
|
+
* Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME)
|
|
213
|
+
* syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
|
|
214
|
+
* Escaped references will never be expanded, regardless of whether the variable exists or not.
|
|
215
|
+
* Cannot be updated.
|
|
216
|
+
*
|
|
217
|
+
* @see {@link https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell | more information}
|
|
218
|
+
*/
|
|
219
|
+
args?: string[];
|
|
220
|
+
/**
|
|
221
|
+
* Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if
|
|
222
|
+
* this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment.
|
|
223
|
+
* If a variable cannot be resolved, the reference in the input string will be unchanged.
|
|
224
|
+
* Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME)
|
|
225
|
+
* syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
|
|
226
|
+
* Escaped references will never be expanded, regardless of whether the variable exists or not.
|
|
227
|
+
* Cannot be updated.
|
|
228
|
+
*
|
|
229
|
+
* @see {@link https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell | more information}
|
|
230
|
+
*/
|
|
231
|
+
command?: string[];
|
|
232
|
+
/** List of environment variables to set in the container. Cannot be updated. */
|
|
233
|
+
env?: {
|
|
234
|
+
/** Name of the environment variable. Must be a C_IDENTIFIER. */
|
|
235
|
+
name: string;
|
|
236
|
+
/**
|
|
237
|
+
* Variable references $(VAR_NAME) are expanded using the previously defined environment variables
|
|
238
|
+
* in the container and any service environment variables. If a variable cannot be resolved, the
|
|
239
|
+
* reference in the input string will be unchanged. Double $$ are reduced to a single $, which
|
|
240
|
+
* allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the
|
|
241
|
+
* string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether
|
|
242
|
+
* the variable exists or not. Defaults to "".
|
|
243
|
+
*/
|
|
244
|
+
value?: string;
|
|
245
|
+
/** Source for the environment variable's value. Cannot be used if value is not empty. */
|
|
246
|
+
valueFrom?: {
|
|
247
|
+
/** Selects a key of a ConfigMap. */
|
|
248
|
+
configMapKeyRef?: {
|
|
249
|
+
/** The key to select. */
|
|
250
|
+
key: string;
|
|
251
|
+
/** Name of the referent. */
|
|
252
|
+
name: string;
|
|
253
|
+
/** Specify whether the ConfigMap or its key must be defined */
|
|
254
|
+
optional?: boolean;
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`,
|
|
258
|
+
* `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP,
|
|
259
|
+
* status.podIP, status.podIPs.
|
|
260
|
+
*/
|
|
261
|
+
fieldRef?: {
|
|
262
|
+
/** Version of the schema the FieldPath is written in terms of, defaults to "v1". */
|
|
263
|
+
apiVersion: string;
|
|
264
|
+
/** Path of the field to select in the specified API version. */
|
|
265
|
+
fieldPath: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Selects a resource of the container: only resources limits and requests
|
|
269
|
+
* (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory
|
|
270
|
+
* and requests.ephemeral-storage) are currently supported.
|
|
271
|
+
*/
|
|
272
|
+
resourceFieldRef?: {
|
|
273
|
+
/** Container name: required for volumes, optional for env vars */
|
|
274
|
+
containerName?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Specifies the output format of the exposed resources, defaults to "1".
|
|
277
|
+
*
|
|
278
|
+
* @see {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#quantity-resource-core | Quantity}
|
|
279
|
+
*/
|
|
280
|
+
divisor?: string;
|
|
281
|
+
/** Required: resource to select */
|
|
282
|
+
resource: string;
|
|
283
|
+
};
|
|
284
|
+
/** Selects a key of a secret in the pod's namespace */
|
|
285
|
+
secretKeyRef?: {
|
|
286
|
+
/** The key of the secret to select from. Must be a valid secret key. */
|
|
287
|
+
key: string;
|
|
288
|
+
/** Name of the referent. */
|
|
289
|
+
name: string;
|
|
290
|
+
/** Specify whether the Secret or its key must be defined */
|
|
291
|
+
optional?: boolean;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
}[];
|
|
295
|
+
envFrom?: {
|
|
296
|
+
/** SecretEnvSource The Secret to select from */
|
|
297
|
+
secretRef?: {
|
|
298
|
+
/** Name of the referent. */
|
|
299
|
+
name: string;
|
|
300
|
+
/** Specify whether the Secret must be defined */
|
|
301
|
+
optional?: boolean;
|
|
302
|
+
};
|
|
303
|
+
configMapRef?: {
|
|
304
|
+
/** Name of the referent. */
|
|
305
|
+
name: string;
|
|
306
|
+
/** Specify whether the ConfigMap must be defined */
|
|
307
|
+
optional?: boolean;
|
|
308
|
+
};
|
|
309
|
+
/** An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. */
|
|
310
|
+
prefix?: string;
|
|
311
|
+
}[];
|
|
312
|
+
/**
|
|
313
|
+
* Container image name. This field is optional to allow higher level config management to
|
|
314
|
+
* default or override container images in workload controllers like Deployments and StatefulSets.
|
|
315
|
+
*
|
|
316
|
+
* @see {@link https://kubernetes.io/docs/concepts/containers/images | more info}
|
|
317
|
+
*/
|
|
318
|
+
image: string;
|
|
319
|
+
/**
|
|
320
|
+
* Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is
|
|
321
|
+
* specified, or IfNotPresent otherwise. Cannot be updated.
|
|
322
|
+
*
|
|
323
|
+
* @see {@link https://kubernetes.io/docs/concepts/containers/images#updating-images | more info}
|
|
324
|
+
*/
|
|
325
|
+
imagePullPolicy: string;
|
|
326
|
+
/**
|
|
327
|
+
* Periodic probe of container liveness. Container will be restarted if the probe fails.
|
|
328
|
+
* Cannot be updated.
|
|
329
|
+
*
|
|
330
|
+
* @see {@link https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes | more info}
|
|
331
|
+
*/
|
|
332
|
+
livenessProbe?: KubeContainerProbe;
|
|
333
|
+
/**
|
|
334
|
+
* Name of the container specified as a DNS_LABEL.
|
|
335
|
+
* Each container in a pod must have a unique name (DNS_LABEL).
|
|
336
|
+
*
|
|
337
|
+
* Cannot be updated.
|
|
338
|
+
*/
|
|
339
|
+
name: string;
|
|
340
|
+
/**
|
|
341
|
+
* List of ports to expose from the container. Not specifying a port here DOES NOT prevent that
|
|
342
|
+
* port from being exposed. Any port which is listening on the default "0.0.0.0" address inside
|
|
343
|
+
* a container will be accessible from the network. Modifying this array with strategic merge
|
|
344
|
+
* patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
|
|
345
|
+
*
|
|
346
|
+
* Cannot be updated.
|
|
347
|
+
*
|
|
348
|
+
* https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#containerport-v1-core
|
|
349
|
+
*/
|
|
350
|
+
ports?: {
|
|
351
|
+
/** Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. */
|
|
352
|
+
containerPort: number;
|
|
353
|
+
/** What host IP to bind the external port to. */
|
|
354
|
+
hostIP?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536.
|
|
357
|
+
* If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
|
|
358
|
+
*/
|
|
359
|
+
hostPort?: number;
|
|
360
|
+
/** If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. */
|
|
361
|
+
name?: string;
|
|
362
|
+
/** Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". */
|
|
363
|
+
protocol?: string;
|
|
364
|
+
}[];
|
|
365
|
+
/**
|
|
366
|
+
* Periodic probe of container service readiness. Container will be removed from service endpoints
|
|
367
|
+
* if the probe fails.
|
|
368
|
+
*
|
|
369
|
+
* Cannot be updated.
|
|
370
|
+
*
|
|
371
|
+
* @see {@link https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes | more info}
|
|
372
|
+
*/
|
|
373
|
+
readinessProbe?: KubeContainerProbe;
|
|
374
|
+
/** Resources resize policy for the container. */
|
|
375
|
+
resizePolicy?: {
|
|
376
|
+
/**
|
|
377
|
+
* Name of the resource to which this resource resize policy applies.
|
|
378
|
+
* Supported values: cpu, memory.
|
|
379
|
+
*/
|
|
380
|
+
resourceName: string;
|
|
381
|
+
/**
|
|
382
|
+
* Restart policy to apply when specified resource is resized.
|
|
383
|
+
* If not specified, it defaults to NotRequired.
|
|
384
|
+
*/
|
|
385
|
+
restartPolicy?: string;
|
|
386
|
+
}[];
|
|
387
|
+
/**
|
|
388
|
+
* Compute Resources required by this container. Cannot be updated.
|
|
389
|
+
*
|
|
390
|
+
* @see {@link https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | more info}
|
|
391
|
+
*
|
|
392
|
+
* https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#resourcerequirements-v1-core
|
|
393
|
+
*/
|
|
394
|
+
resources?: {
|
|
395
|
+
claims?: {
|
|
396
|
+
/**
|
|
397
|
+
* Name must match the name of one entry in pod.spec.resourceClaims of the Pod where
|
|
398
|
+
* this field is used. It makes that resource available inside a container.
|
|
399
|
+
*/
|
|
400
|
+
name: string;
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* Limits describes the maximum amount of compute resources allowed.
|
|
404
|
+
*
|
|
405
|
+
* @see {@link https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | more info}
|
|
406
|
+
*
|
|
407
|
+
* Can also have hugpages like: "hugepages-2Mi": "100Mi" // Requesting 100 Mebibytes of 2 MiB HugePages
|
|
408
|
+
*/
|
|
409
|
+
limits?: {
|
|
410
|
+
/** example "100m", 100 milliCPU (0.1 CPU core) */
|
|
411
|
+
cpu?: string;
|
|
412
|
+
/** example , "256Mi" 256 Mebibytes */
|
|
413
|
+
memory?: string;
|
|
414
|
+
};
|
|
415
|
+
requests?: {
|
|
416
|
+
/** example "500m", 500 milliCPU (0.5 CPU core) */
|
|
417
|
+
cpu?: string;
|
|
418
|
+
/** example , "1Gi" 1 Gibibyte */
|
|
419
|
+
memory?: string;
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* Path at which the file to which the container's termination message will be written is mounted
|
|
424
|
+
* into the container's filesystem. Message written is intended to be brief final status, such as
|
|
425
|
+
* an assertion failure message. Will be truncated by the node if greater than 4096 bytes.
|
|
426
|
+
* The total message length across all containers will be limited to 12kb.
|
|
427
|
+
* Defaults to /dev/termination-log.
|
|
428
|
+
*
|
|
429
|
+
* Cannot be updated.
|
|
430
|
+
*/
|
|
431
|
+
terminationMessagePath?: string;
|
|
432
|
+
/**
|
|
433
|
+
* Indicate how the termination message should be populated. File will use the contents of
|
|
434
|
+
* terminationMessagePath to populate the container status message on both success and failure.
|
|
435
|
+
* FallbackToLogsOnError will use the last chunk of container log output if the termination message
|
|
436
|
+
* file is empty and the container exited with an error. The log output is limited to 2048 bytes or
|
|
437
|
+
* 80 lines, whichever is smaller. Defaults to File.
|
|
438
|
+
*
|
|
439
|
+
* Cannot be updated.
|
|
440
|
+
*/
|
|
441
|
+
terminationMessagePolicy?: string;
|
|
442
|
+
volumeMounts?: {
|
|
443
|
+
name: string;
|
|
444
|
+
readOnly: boolean;
|
|
445
|
+
mountPath: string;
|
|
446
|
+
}[];
|
|
447
|
+
/**
|
|
448
|
+
* Whether this container should allocate a buffer for stdin in the container runtime.
|
|
449
|
+
* If this is not set, reads from stdin in the container will always result in EOF.
|
|
450
|
+
*
|
|
451
|
+
* Default is false.
|
|
452
|
+
*/
|
|
453
|
+
stdin?: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* Whether the container runtime should close the stdin channel after it has been opened
|
|
456
|
+
* by a single attach. When stdin is true the stdin stream will remain open across
|
|
457
|
+
* multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start,
|
|
458
|
+
* is empty until the first client attaches to stdin, and then remains open and accepts data
|
|
459
|
+
* until the client disconnects, at which time stdin is closed and remains closed until the
|
|
460
|
+
* container is restarted. If this flag is false, a container processes that reads from stdin
|
|
461
|
+
* will never receive an EOF.
|
|
462
|
+
*
|
|
463
|
+
* Default is false
|
|
464
|
+
*/
|
|
465
|
+
stdinOnce?: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* Whether this container should allocate a TTY for itself, also requires
|
|
468
|
+
* 'stdin' to be true.
|
|
469
|
+
*
|
|
470
|
+
* Default is false.
|
|
471
|
+
*/
|
|
472
|
+
tty?: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* volumeDevices is the list of block devices to be used by the container.
|
|
475
|
+
*
|
|
476
|
+
* patch strategy: merge
|
|
477
|
+
* patch merge key: devicePath
|
|
478
|
+
*/
|
|
479
|
+
volumeDevices?: {
|
|
480
|
+
/** devicePath is the path inside of the container that the device will be mapped to. */
|
|
481
|
+
devicePath: string;
|
|
482
|
+
/** name must match the name of a persistentVolumeClaim in the pod */
|
|
483
|
+
name: string;
|
|
484
|
+
}[];
|
|
485
|
+
/**
|
|
486
|
+
* Container's working directory. If not specified, the container runtime's default
|
|
487
|
+
* will be used, which might be configured in the container image.
|
|
488
|
+
* Cannot be updated.
|
|
489
|
+
*/
|
|
490
|
+
workingDir?: string;
|
|
491
|
+
}
|
|
492
|
+
export interface KubeContainerProbe {
|
|
493
|
+
httpGet?: {
|
|
494
|
+
path?: string;
|
|
495
|
+
port: number;
|
|
496
|
+
scheme: string;
|
|
497
|
+
host?: string;
|
|
498
|
+
};
|
|
499
|
+
exec?: {
|
|
500
|
+
command: string[];
|
|
501
|
+
};
|
|
502
|
+
tcpSocket?: {
|
|
503
|
+
port: number;
|
|
504
|
+
};
|
|
505
|
+
initialDelaySeconds?: number;
|
|
506
|
+
timeoutSeconds?: number;
|
|
507
|
+
periodSeconds?: number;
|
|
508
|
+
successThreshold?: number;
|
|
509
|
+
failureThreshold?: number;
|
|
510
|
+
}
|
|
511
|
+
export interface LabelSelector {
|
|
512
|
+
matchExpressions?: {
|
|
513
|
+
key: string;
|
|
514
|
+
operator: string;
|
|
515
|
+
values: string[];
|
|
516
|
+
}[];
|
|
517
|
+
matchLabels?: Record<string, string>;
|
|
518
|
+
}
|
|
519
|
+
export interface KubePodSpec {
|
|
520
|
+
containers: KubeContainer[];
|
|
521
|
+
nodeName: string;
|
|
522
|
+
nodeSelector?: Record<string, string>;
|
|
523
|
+
initContainers?: KubeContainer[];
|
|
524
|
+
ephemeralContainers?: KubeContainer[];
|
|
525
|
+
readinessGates?: {
|
|
526
|
+
conditionType: string;
|
|
527
|
+
}[];
|
|
528
|
+
volumes?: KubeVolume[];
|
|
529
|
+
}
|
|
530
|
+
export interface KubeVolume {
|
|
531
|
+
name: string;
|
|
532
|
+
[volumeName: string]: any;
|
|
533
|
+
}
|
|
534
|
+
export type Time = number | string | null;
|
|
535
|
+
export interface KubeCondition {
|
|
536
|
+
/** Last time we probed the condition. */
|
|
537
|
+
lastProbeTime: Time;
|
|
538
|
+
lastTransitionTime?: Time;
|
|
539
|
+
lastUpdateTime?: Time;
|
|
540
|
+
message?: string;
|
|
541
|
+
/** Unique, one-word, CamelCase reason for the condition's last transition. */
|
|
542
|
+
reason?: string;
|
|
543
|
+
/** Status of the condition, one of True, False, Unknown. */
|
|
544
|
+
status: string;
|
|
545
|
+
type: string;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* This is the base interface for all Kubernetes resources, i.e. it contains fields
|
|
549
|
+
* that all Kubernetes resources have.
|
|
550
|
+
*/
|
|
551
|
+
export interface KubernetesObject {
|
|
552
|
+
/**
|
|
553
|
+
* Kind is a string value representing the REST resource this object represents.
|
|
554
|
+
* Servers may infer this from the endpoint the client submits requests to.
|
|
555
|
+
*
|
|
556
|
+
* In CamelCase.
|
|
557
|
+
*
|
|
558
|
+
* Cannot be updated.
|
|
559
|
+
*
|
|
560
|
+
* @see {@link https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | more info}
|
|
561
|
+
*/
|
|
562
|
+
kind: string;
|
|
563
|
+
apiVersion?: string;
|
|
564
|
+
metadata: KubeMetadata;
|
|
565
|
+
[prop: string]: any;
|
|
566
|
+
}
|
|
567
|
+
export interface Role extends KubernetesObject {
|
|
568
|
+
rules: {
|
|
569
|
+
apiGroups: string[];
|
|
570
|
+
nonResourceURLs: string[];
|
|
571
|
+
resourceNames: string[];
|
|
572
|
+
resources: string[];
|
|
573
|
+
verbs: string[];
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
export interface ClusterRole extends Role {
|
|
577
|
+
}
|
|
578
|
+
export interface RoleBinding extends KubernetesObject {
|
|
579
|
+
roleRef: {
|
|
580
|
+
apiGroup: string;
|
|
581
|
+
kind: string;
|
|
582
|
+
name: string;
|
|
583
|
+
};
|
|
584
|
+
subjects: {
|
|
585
|
+
apiGroup: string;
|
|
586
|
+
kind: string;
|
|
587
|
+
name: string;
|
|
588
|
+
namespace: string;
|
|
589
|
+
}[];
|
|
590
|
+
}
|
|
591
|
+
export interface ClusterRoleBinding extends RoleBinding {
|
|
592
|
+
}
|
|
593
|
+
export interface ConfigMap extends KubernetesObject {
|
|
594
|
+
data: Record<string, string>;
|
|
595
|
+
}
|
|
596
|
+
export interface CronJob extends KubernetesObject {
|
|
597
|
+
spec: {
|
|
598
|
+
suspend: boolean;
|
|
599
|
+
schedule: string;
|
|
600
|
+
startingDeadlineSeconds?: number;
|
|
601
|
+
successfulJobsHistoryLimit: number;
|
|
602
|
+
failedJobsHistoryLimit: number;
|
|
603
|
+
concurrencyPolicy: string;
|
|
604
|
+
jobTemplate: {
|
|
605
|
+
spec: {
|
|
606
|
+
metadata?: Partial<KubeMetadata>;
|
|
607
|
+
template: {
|
|
608
|
+
spec: {
|
|
609
|
+
metadata?: Partial<KubeMetadata>;
|
|
610
|
+
containers: KubeContainer[];
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
[otherProps: string]: any;
|
|
616
|
+
};
|
|
617
|
+
status: Record<string, any>;
|
|
618
|
+
}
|
|
619
|
+
export interface DaemonSet extends KubernetesObject {
|
|
620
|
+
spec: {
|
|
621
|
+
updateStrategy: {
|
|
622
|
+
type: string;
|
|
623
|
+
rollingUpdate: {
|
|
624
|
+
maxUnavailable: number;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
selector: LabelSelector;
|
|
628
|
+
template: {
|
|
629
|
+
metadata: KubeMetadata;
|
|
630
|
+
spec: KubePodSpec;
|
|
631
|
+
};
|
|
632
|
+
[otherProps: string]: any;
|
|
633
|
+
};
|
|
634
|
+
status: Record<string, any>;
|
|
635
|
+
}
|
|
636
|
+
export interface Deployment extends KubernetesObject {
|
|
637
|
+
spec: {
|
|
638
|
+
selector?: LabelSelector;
|
|
639
|
+
strategy?: {
|
|
640
|
+
type: string;
|
|
641
|
+
[otherProps: string]: any;
|
|
642
|
+
};
|
|
643
|
+
template: {
|
|
644
|
+
metadata?: KubeMetadata;
|
|
645
|
+
spec: KubePodSpec;
|
|
646
|
+
};
|
|
647
|
+
[otherProps: string]: any;
|
|
648
|
+
};
|
|
649
|
+
status: Record<string, any>;
|
|
650
|
+
}
|
|
651
|
+
export interface Endpoint extends KubernetesObject {
|
|
652
|
+
subsets: KubeEndpointSubset[];
|
|
653
|
+
}
|
|
654
|
+
interface KubeEndpointPort {
|
|
655
|
+
name?: string;
|
|
656
|
+
appProtocol: string;
|
|
657
|
+
port: number;
|
|
658
|
+
protocol: string;
|
|
659
|
+
}
|
|
660
|
+
interface KubeEndpointAddress {
|
|
661
|
+
hostname: string;
|
|
662
|
+
ip: string;
|
|
663
|
+
nodeName?: string;
|
|
664
|
+
targetRef?: Pick<KubernetesObject, "apiVersion" | "kind"> & Pick<KubeMetadata, "name" | "namespace" | "resourceVersion" | "uid"> & {
|
|
665
|
+
fieldPath: string;
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
interface KubeEndpointSubset {
|
|
669
|
+
addresses?: KubeEndpointAddress[];
|
|
670
|
+
notReadyAddresses?: KubeEndpointAddress[];
|
|
671
|
+
ports?: KubeEndpointPort[];
|
|
672
|
+
}
|
|
673
|
+
export interface Event extends KubernetesObject {
|
|
674
|
+
type: string;
|
|
675
|
+
reason: string;
|
|
676
|
+
message: string;
|
|
677
|
+
involvedObject: {
|
|
678
|
+
kind: string;
|
|
679
|
+
namespace: string;
|
|
680
|
+
name: string;
|
|
681
|
+
uid: string;
|
|
682
|
+
apiVersion: string;
|
|
683
|
+
resourceVersion: string;
|
|
684
|
+
fieldPath: string;
|
|
685
|
+
};
|
|
686
|
+
[otherProps: string]: any;
|
|
687
|
+
}
|
|
688
|
+
export interface HPA extends KubernetesObject {
|
|
689
|
+
spec: HpaSpec;
|
|
690
|
+
status: HpaStatus;
|
|
691
|
+
}
|
|
692
|
+
type MetricType = "Utilization" | "Value" | "AverageValue";
|
|
693
|
+
type MetricSourceType = "Resource" | "Pods" | "Object" | "External" | "ContainerResource";
|
|
694
|
+
interface HpaSpec {
|
|
695
|
+
maxReplicas: number;
|
|
696
|
+
minReplicas: number;
|
|
697
|
+
targetCPUUtilizationPercentage?: number;
|
|
698
|
+
scaleTargetRef: CrossVersionObjectReference;
|
|
699
|
+
metrics: {
|
|
700
|
+
external?: {
|
|
701
|
+
metric: MetricIdentifier;
|
|
702
|
+
target: MetricTarget;
|
|
703
|
+
};
|
|
704
|
+
object?: {
|
|
705
|
+
metric: MetricIdentifier;
|
|
706
|
+
describedObject: CrossVersionObjectReference;
|
|
707
|
+
target: MetricTarget;
|
|
708
|
+
};
|
|
709
|
+
pods?: {
|
|
710
|
+
metric: MetricIdentifier;
|
|
711
|
+
target: MetricTarget;
|
|
712
|
+
};
|
|
713
|
+
resource?: {
|
|
714
|
+
name: string;
|
|
715
|
+
target: MetricTarget;
|
|
716
|
+
};
|
|
717
|
+
containerResource?: {
|
|
718
|
+
container: string;
|
|
719
|
+
name: string;
|
|
720
|
+
target: MetricTarget;
|
|
721
|
+
};
|
|
722
|
+
type: MetricSourceType;
|
|
723
|
+
}[];
|
|
724
|
+
}
|
|
725
|
+
interface MetricTarget {
|
|
726
|
+
type: MetricType;
|
|
727
|
+
averageUtilization?: number;
|
|
728
|
+
averageValue?: string;
|
|
729
|
+
value?: string;
|
|
730
|
+
}
|
|
731
|
+
interface CrossVersionObjectReference {
|
|
732
|
+
apiVersion: string;
|
|
733
|
+
kind: string;
|
|
734
|
+
name: string;
|
|
735
|
+
}
|
|
736
|
+
interface MetricIdentifier {
|
|
737
|
+
name: string;
|
|
738
|
+
selector: {
|
|
739
|
+
matchLabels: Record<string, string>;
|
|
740
|
+
matchExpressions: {
|
|
741
|
+
key: string;
|
|
742
|
+
operator: string;
|
|
743
|
+
values: string[];
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
interface MetricValueStatus {
|
|
748
|
+
averageUtilization?: number;
|
|
749
|
+
averageValue?: string;
|
|
750
|
+
value?: string;
|
|
751
|
+
}
|
|
752
|
+
interface HpaStatus {
|
|
753
|
+
currentCPUUtilizationPercentage?: number;
|
|
754
|
+
currentReplicas: number;
|
|
755
|
+
desiredReplicas: number;
|
|
756
|
+
lastScaleTime: string;
|
|
757
|
+
observedGeneration?: number;
|
|
758
|
+
currentMetrics: {
|
|
759
|
+
type: string;
|
|
760
|
+
external?: {
|
|
761
|
+
current: MetricValueStatus;
|
|
762
|
+
metric: MetricIdentifier;
|
|
763
|
+
};
|
|
764
|
+
object?: {
|
|
765
|
+
current: MetricValueStatus;
|
|
766
|
+
metric: MetricIdentifier;
|
|
767
|
+
desiredObject: CrossVersionObjectReference;
|
|
768
|
+
};
|
|
769
|
+
pods?: {
|
|
770
|
+
current: MetricValueStatus;
|
|
771
|
+
metric: MetricIdentifier;
|
|
772
|
+
};
|
|
773
|
+
resource?: {
|
|
774
|
+
name: string;
|
|
775
|
+
current: MetricValueStatus;
|
|
776
|
+
};
|
|
777
|
+
containerResource?: {
|
|
778
|
+
container: string;
|
|
779
|
+
name: string;
|
|
780
|
+
current: MetricValueStatus;
|
|
781
|
+
};
|
|
782
|
+
}[] | null;
|
|
783
|
+
conditions: {
|
|
784
|
+
type: string;
|
|
785
|
+
status: string;
|
|
786
|
+
lastTransitionTime: string;
|
|
787
|
+
reason: string;
|
|
788
|
+
message: string;
|
|
789
|
+
}[];
|
|
790
|
+
}
|
|
791
|
+
export interface Ingress extends KubernetesObject {
|
|
792
|
+
spec: {
|
|
793
|
+
ingressClassName?: string;
|
|
794
|
+
rules: IngressRule[] | LegacyIngressRule[];
|
|
795
|
+
tls?: {
|
|
796
|
+
hosts: string[];
|
|
797
|
+
secretName: string;
|
|
798
|
+
}[];
|
|
799
|
+
defaultBackend?: {
|
|
800
|
+
resource?: {
|
|
801
|
+
apiVersion: string;
|
|
802
|
+
kind: string;
|
|
803
|
+
name: string;
|
|
804
|
+
};
|
|
805
|
+
service?: {
|
|
806
|
+
name: string;
|
|
807
|
+
port: {
|
|
808
|
+
name?: string;
|
|
809
|
+
number?: number;
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
[key: string]: any;
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
interface LegacyIngressRule {
|
|
817
|
+
host: string;
|
|
818
|
+
http: {
|
|
819
|
+
paths: {
|
|
820
|
+
path: string;
|
|
821
|
+
backend: LegacyIngressBackend;
|
|
822
|
+
}[];
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
interface IngressRule {
|
|
826
|
+
host: string;
|
|
827
|
+
http: {
|
|
828
|
+
paths: {
|
|
829
|
+
path: string;
|
|
830
|
+
pathType?: string;
|
|
831
|
+
backend: IngressBackend;
|
|
832
|
+
}[];
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
interface LegacyIngressBackend {
|
|
836
|
+
serviceName: string;
|
|
837
|
+
servicePort: string;
|
|
838
|
+
}
|
|
839
|
+
interface IngressBackend {
|
|
840
|
+
service?: {
|
|
841
|
+
name: string;
|
|
842
|
+
port: {
|
|
843
|
+
number?: number;
|
|
844
|
+
name?: string;
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
resource?: {
|
|
848
|
+
apiVersion: string;
|
|
849
|
+
kind: string;
|
|
850
|
+
name: string;
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
export interface IngressClass extends KubernetesObject {
|
|
854
|
+
spec: {
|
|
855
|
+
controller: string;
|
|
856
|
+
[key: string]: any;
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
export interface Job extends KubernetesObject {
|
|
860
|
+
spec: {
|
|
861
|
+
selector: LabelSelector;
|
|
862
|
+
template: {
|
|
863
|
+
metadata?: KubeMetadata;
|
|
864
|
+
spec: KubePodSpec;
|
|
865
|
+
};
|
|
866
|
+
[otherProps: string]: any;
|
|
867
|
+
};
|
|
868
|
+
status: Record<string, any>;
|
|
869
|
+
}
|
|
870
|
+
export interface Lease extends KubernetesObject {
|
|
871
|
+
spec: LeaseSpec;
|
|
872
|
+
}
|
|
873
|
+
interface LeaseSpec {
|
|
874
|
+
holderIdentity: string;
|
|
875
|
+
leaseDurationSeconds: number;
|
|
876
|
+
leaseTransitions: number;
|
|
877
|
+
renewTime: string;
|
|
878
|
+
}
|
|
879
|
+
export interface LimitRange extends KubernetesObject {
|
|
880
|
+
spec: LimitRangeSpec;
|
|
881
|
+
}
|
|
882
|
+
interface LimitRangeSpec {
|
|
883
|
+
limits: {
|
|
884
|
+
default: {
|
|
885
|
+
cpu: string;
|
|
886
|
+
memory: string;
|
|
887
|
+
};
|
|
888
|
+
defaultRequest: {
|
|
889
|
+
cpu: string;
|
|
890
|
+
memory: string;
|
|
891
|
+
};
|
|
892
|
+
max: {
|
|
893
|
+
cpu: string;
|
|
894
|
+
memory: string;
|
|
895
|
+
};
|
|
896
|
+
min: {
|
|
897
|
+
cpu: string;
|
|
898
|
+
memory: string;
|
|
899
|
+
};
|
|
900
|
+
type: string;
|
|
901
|
+
}[];
|
|
902
|
+
}
|
|
903
|
+
export interface MutatingWebhookConfiguration extends KubernetesObject {
|
|
904
|
+
webhooks: {
|
|
905
|
+
admissionReviewVersions: string[];
|
|
906
|
+
clientConfig: KubeWebhookClientConfig;
|
|
907
|
+
failurePolicy?: string;
|
|
908
|
+
matchPolicy?: string;
|
|
909
|
+
name: string;
|
|
910
|
+
namespaceSelector?: {
|
|
911
|
+
matchExpressions: LabelSelector["matchExpressions"];
|
|
912
|
+
matchLabels: LabelSelector["matchLabels"];
|
|
913
|
+
};
|
|
914
|
+
objectSelector?: {
|
|
915
|
+
matchExpressions: LabelSelector["matchExpressions"];
|
|
916
|
+
matchLabels: LabelSelector["matchLabels"];
|
|
917
|
+
};
|
|
918
|
+
reinvocationPolicy?: string;
|
|
919
|
+
rules?: KubeRuleWithOperations[];
|
|
920
|
+
sideEffects?: string;
|
|
921
|
+
timeoutSeconds?: number;
|
|
922
|
+
}[];
|
|
923
|
+
}
|
|
924
|
+
export interface KubeRuleWithOperations {
|
|
925
|
+
apiGroups: string[];
|
|
926
|
+
apiVersions: string[];
|
|
927
|
+
operations: string[];
|
|
928
|
+
resources: string[];
|
|
929
|
+
scope?: string;
|
|
930
|
+
}
|
|
931
|
+
export interface KubeWebhookClientConfig {
|
|
932
|
+
caBundle: string;
|
|
933
|
+
url?: string;
|
|
934
|
+
service?: {
|
|
935
|
+
name: string;
|
|
936
|
+
namespace: string;
|
|
937
|
+
path?: string;
|
|
938
|
+
port?: number;
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
export interface Namespace extends KubernetesObject {
|
|
942
|
+
status: {
|
|
943
|
+
phase: string;
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
export interface NetworkPolicy extends KubernetesObject {
|
|
947
|
+
egress: NetworkPolicyEgressRule[];
|
|
948
|
+
ingress: NetworkPolicyIngressRule[];
|
|
949
|
+
podSelector: LabelSelector;
|
|
950
|
+
policyTypes: string[];
|
|
951
|
+
}
|
|
952
|
+
interface NetworkPolicyPort {
|
|
953
|
+
port?: string | number;
|
|
954
|
+
protocol?: string;
|
|
955
|
+
endPort?: number;
|
|
956
|
+
}
|
|
957
|
+
interface IPBlock {
|
|
958
|
+
cidr: string;
|
|
959
|
+
except: string[];
|
|
960
|
+
}
|
|
961
|
+
interface NetworkPolicyPeer {
|
|
962
|
+
ipBlock?: IPBlock;
|
|
963
|
+
namespaceSelector?: LabelSelector;
|
|
964
|
+
podSelector?: LabelSelector;
|
|
965
|
+
}
|
|
966
|
+
interface NetworkPolicyEgressRule {
|
|
967
|
+
ports: NetworkPolicyPort[];
|
|
968
|
+
to: NetworkPolicyPeer[];
|
|
969
|
+
}
|
|
970
|
+
interface NetworkPolicyIngressRule {
|
|
971
|
+
ports: NetworkPolicyPort[];
|
|
972
|
+
from: NetworkPolicyPeer[];
|
|
973
|
+
}
|
|
974
|
+
export interface Node extends KubernetesObject {
|
|
975
|
+
status: {
|
|
976
|
+
addresses: {
|
|
977
|
+
address: string;
|
|
978
|
+
type: string;
|
|
979
|
+
}[];
|
|
980
|
+
capacity: {
|
|
981
|
+
cpu: any;
|
|
982
|
+
memory: any;
|
|
983
|
+
};
|
|
984
|
+
conditions: (Omit<KubeCondition, "lastProbeTime" | "lastUpdateTime"> & {
|
|
985
|
+
lastHeartbeatTime: string;
|
|
986
|
+
})[];
|
|
987
|
+
nodeInfo: {
|
|
988
|
+
architecture: string;
|
|
989
|
+
bootID: string;
|
|
990
|
+
containerRuntimeVersion: string;
|
|
991
|
+
kernelVersion: string;
|
|
992
|
+
kubeProxyVersion: string;
|
|
993
|
+
kubeletVersion: string;
|
|
994
|
+
machineID: string;
|
|
995
|
+
operatingSystem: string;
|
|
996
|
+
osImage: string;
|
|
997
|
+
systemUUID: string;
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
spec: {
|
|
1001
|
+
podCIDR: string;
|
|
1002
|
+
[otherProps: string]: any;
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
export interface NodeClaim extends KubernetesObject {
|
|
1006
|
+
status: {
|
|
1007
|
+
conditions: KubeCondition[];
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
export interface PDB extends KubernetesObject {
|
|
1011
|
+
spec: {
|
|
1012
|
+
selector: {
|
|
1013
|
+
matchLabels: Record<string, string>;
|
|
1014
|
+
matchExpressions?: {
|
|
1015
|
+
key: string;
|
|
1016
|
+
operator: string;
|
|
1017
|
+
values: string[];
|
|
1018
|
+
};
|
|
1019
|
+
};
|
|
1020
|
+
minAvailable?: number;
|
|
1021
|
+
maxUnavailable?: number;
|
|
1022
|
+
};
|
|
1023
|
+
status: {
|
|
1024
|
+
currentHealthy: number;
|
|
1025
|
+
desiredHealthy: number;
|
|
1026
|
+
disruptionsAllowed: number;
|
|
1027
|
+
expectedPods: number;
|
|
1028
|
+
observedGeneration: number;
|
|
1029
|
+
disruptedPods?: Record<string, string>;
|
|
1030
|
+
conditions: {
|
|
1031
|
+
type: string;
|
|
1032
|
+
status: string;
|
|
1033
|
+
reason: string;
|
|
1034
|
+
observedGeneration: number;
|
|
1035
|
+
message: string;
|
|
1036
|
+
lastTransitionTime: string;
|
|
1037
|
+
}[];
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
export interface PersistentVolume extends KubernetesObject {
|
|
1041
|
+
spec: {
|
|
1042
|
+
capacity: {
|
|
1043
|
+
storage: string;
|
|
1044
|
+
};
|
|
1045
|
+
[other: string]: any;
|
|
1046
|
+
};
|
|
1047
|
+
status: {
|
|
1048
|
+
message: string;
|
|
1049
|
+
phase: string;
|
|
1050
|
+
reason: string;
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
export interface PersistentVolumeClaim extends KubernetesObject {
|
|
1054
|
+
spec?: {
|
|
1055
|
+
accessModes?: string[];
|
|
1056
|
+
resources?: {
|
|
1057
|
+
limits?: object;
|
|
1058
|
+
requests: {
|
|
1059
|
+
storage?: string;
|
|
1060
|
+
[other: string]: any;
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
storageClassName?: string;
|
|
1064
|
+
volumeMode?: string;
|
|
1065
|
+
volumeName?: string;
|
|
1066
|
+
[other: string]: any;
|
|
1067
|
+
};
|
|
1068
|
+
status?: {
|
|
1069
|
+
capacity?: {
|
|
1070
|
+
storage?: string;
|
|
1071
|
+
};
|
|
1072
|
+
phase?: string;
|
|
1073
|
+
accessModes?: string[];
|
|
1074
|
+
[other: string]: any;
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
type PodPhase = "Pending" | "Running" | "Succeeded" | "Failed" | "Unknown";
|
|
1078
|
+
export interface Pod extends KubernetesObject {
|
|
1079
|
+
spec: KubePodSpec;
|
|
1080
|
+
status: {
|
|
1081
|
+
conditions: KubeCondition[];
|
|
1082
|
+
containerStatuses: KubeContainerStatus[];
|
|
1083
|
+
initContainerStatuses?: KubeContainerStatus[];
|
|
1084
|
+
ephemeralContainerStatuses?: KubeContainerStatus[];
|
|
1085
|
+
hostIP: string;
|
|
1086
|
+
message?: string;
|
|
1087
|
+
phase: PodPhase;
|
|
1088
|
+
qosClass?: string;
|
|
1089
|
+
reason?: string;
|
|
1090
|
+
startTime: Time;
|
|
1091
|
+
[other: string]: any;
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
interface ContainerState {
|
|
1095
|
+
running: {
|
|
1096
|
+
startedAt: string;
|
|
1097
|
+
};
|
|
1098
|
+
terminated: {
|
|
1099
|
+
containerID: string;
|
|
1100
|
+
exitCode: number;
|
|
1101
|
+
finishedAt: string;
|
|
1102
|
+
message?: string;
|
|
1103
|
+
reason: string;
|
|
1104
|
+
signal?: number;
|
|
1105
|
+
startedAt: string;
|
|
1106
|
+
};
|
|
1107
|
+
waiting: {
|
|
1108
|
+
message?: string;
|
|
1109
|
+
reason: string;
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
interface KubeContainerStatus {
|
|
1113
|
+
containerID?: string;
|
|
1114
|
+
image: string;
|
|
1115
|
+
imageID: string;
|
|
1116
|
+
name: string;
|
|
1117
|
+
ready: boolean;
|
|
1118
|
+
restartCount: number;
|
|
1119
|
+
lastState: Partial<ContainerState>;
|
|
1120
|
+
state: Partial<ContainerState>;
|
|
1121
|
+
started?: boolean;
|
|
1122
|
+
}
|
|
1123
|
+
export interface PriorityClass extends KubernetesObject {
|
|
1124
|
+
value: number;
|
|
1125
|
+
preemptionPolicy: string;
|
|
1126
|
+
globalDefault?: boolean;
|
|
1127
|
+
description: string;
|
|
1128
|
+
}
|
|
1129
|
+
export interface ReplicaSet extends KubernetesObject {
|
|
1130
|
+
spec: {
|
|
1131
|
+
minReadySeconds: number;
|
|
1132
|
+
replicas: number;
|
|
1133
|
+
selector: LabelSelector;
|
|
1134
|
+
template: {
|
|
1135
|
+
metadata?: KubeMetadata;
|
|
1136
|
+
spec: KubePodSpec;
|
|
1137
|
+
};
|
|
1138
|
+
[other: string]: any;
|
|
1139
|
+
};
|
|
1140
|
+
status: {
|
|
1141
|
+
availableReplicas: number;
|
|
1142
|
+
conditions: Omit<KubeCondition, "lastProbeTime" | "lastUpdateTime">[];
|
|
1143
|
+
fullyLabeledReplicas: number;
|
|
1144
|
+
observedGeneration: number;
|
|
1145
|
+
readyReplicas: number;
|
|
1146
|
+
replicas: number;
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
export interface ResourceQuota extends KubernetesObject {
|
|
1150
|
+
spec: spec;
|
|
1151
|
+
status: status;
|
|
1152
|
+
}
|
|
1153
|
+
interface spec {
|
|
1154
|
+
hard: Record<string, string>;
|
|
1155
|
+
scopes?: string[];
|
|
1156
|
+
scopeSelector?: {
|
|
1157
|
+
matchExpressions: {
|
|
1158
|
+
operator: string;
|
|
1159
|
+
scopeName: string;
|
|
1160
|
+
values: string[];
|
|
1161
|
+
}[];
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
interface status {
|
|
1165
|
+
hard: Record<string, string>;
|
|
1166
|
+
used: Record<string, string>;
|
|
1167
|
+
}
|
|
1168
|
+
export interface RuntimeClass extends KubernetesObject {
|
|
1169
|
+
handler: string;
|
|
1170
|
+
}
|
|
1171
|
+
export interface Secret extends KubernetesObject {
|
|
1172
|
+
data: Record<string, string>;
|
|
1173
|
+
type: string;
|
|
1174
|
+
}
|
|
1175
|
+
export interface Service extends KubernetesObject {
|
|
1176
|
+
spec: {
|
|
1177
|
+
clusterIP: string;
|
|
1178
|
+
ports: {
|
|
1179
|
+
name: string;
|
|
1180
|
+
nodePort: number;
|
|
1181
|
+
port: number;
|
|
1182
|
+
protocol: string;
|
|
1183
|
+
targetPort: number | string;
|
|
1184
|
+
}[];
|
|
1185
|
+
type: string;
|
|
1186
|
+
externalIPs: string[];
|
|
1187
|
+
selector: Record<string, string>;
|
|
1188
|
+
[otherProps: string]: any;
|
|
1189
|
+
};
|
|
1190
|
+
status: {
|
|
1191
|
+
conditions?: KubeCondition[];
|
|
1192
|
+
loadBalancer?: {
|
|
1193
|
+
ingress: KubeLoadBalancerIngress[];
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
interface KubePortStatus {
|
|
1198
|
+
error?: string;
|
|
1199
|
+
port: number;
|
|
1200
|
+
protocol: string;
|
|
1201
|
+
}
|
|
1202
|
+
interface KubeLoadBalancerIngress {
|
|
1203
|
+
hostname?: string;
|
|
1204
|
+
ip?: string;
|
|
1205
|
+
ports?: KubePortStatus[];
|
|
1206
|
+
}
|
|
1207
|
+
export interface ServiceAccount extends KubernetesObject {
|
|
1208
|
+
secrets: {
|
|
1209
|
+
apiVersion: string;
|
|
1210
|
+
fieldPath: string;
|
|
1211
|
+
kind: string;
|
|
1212
|
+
name: string;
|
|
1213
|
+
namespace: string;
|
|
1214
|
+
uid: string;
|
|
1215
|
+
}[];
|
|
1216
|
+
}
|
|
1217
|
+
export interface StatefulSet extends KubernetesObject {
|
|
1218
|
+
spec: {
|
|
1219
|
+
selector: LabelSelector;
|
|
1220
|
+
updateStrategy: {
|
|
1221
|
+
rollingUpdate: {
|
|
1222
|
+
partition: number;
|
|
1223
|
+
};
|
|
1224
|
+
type: string;
|
|
1225
|
+
};
|
|
1226
|
+
template: {
|
|
1227
|
+
metadata: KubeMetadata;
|
|
1228
|
+
spec: KubePodSpec;
|
|
1229
|
+
};
|
|
1230
|
+
[other: string]: any;
|
|
1231
|
+
};
|
|
1232
|
+
status: Record<string, any>;
|
|
1233
|
+
}
|
|
1234
|
+
export interface StorageClass extends KubernetesObject {
|
|
1235
|
+
provisioner: string;
|
|
1236
|
+
reclaimPolicy: string;
|
|
1237
|
+
volumeBindingMode: string;
|
|
1238
|
+
}
|
|
1239
|
+
export interface Token extends KubernetesObject {
|
|
1240
|
+
status: {
|
|
1241
|
+
token: string;
|
|
1242
|
+
expirationTimestamp: string;
|
|
1243
|
+
};
|
|
1244
|
+
spec: {
|
|
1245
|
+
audiences: string[];
|
|
1246
|
+
expirationSeconds: number;
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
export interface ValidatingWebhookConfiguration extends KubernetesObject {
|
|
1250
|
+
webhooks: {
|
|
1251
|
+
admissionReviewVersions: string[];
|
|
1252
|
+
clientConfig: KubeWebhookClientConfig;
|
|
1253
|
+
failurePolicy?: string;
|
|
1254
|
+
matchPolicy?: string;
|
|
1255
|
+
name: string;
|
|
1256
|
+
namespaceSelector?: {
|
|
1257
|
+
matchExpressions: LabelSelector["matchExpressions"];
|
|
1258
|
+
matchLabels: LabelSelector["matchLabels"];
|
|
1259
|
+
};
|
|
1260
|
+
objectSelector?: {
|
|
1261
|
+
matchExpressions: LabelSelector["matchExpressions"];
|
|
1262
|
+
matchLabels: LabelSelector["matchLabels"];
|
|
1263
|
+
};
|
|
1264
|
+
rules?: KubeRuleWithOperations[];
|
|
1265
|
+
sideEffects?: string;
|
|
1266
|
+
timeoutSeconds?: number;
|
|
1267
|
+
}[];
|
|
1268
|
+
}
|
|
1269
|
+
export interface VPA extends KubernetesObject {
|
|
1270
|
+
spec: VpaSpec;
|
|
1271
|
+
status: VpaStatus;
|
|
1272
|
+
}
|
|
1273
|
+
type ResourceName = "cpu" | "memory" | "storage" | "ephemeral-storage";
|
|
1274
|
+
type UpdateMode = "Off" | "Initial" | "Auto" | "Recreate";
|
|
1275
|
+
type EvictionChangeRequirement = "TargetHigherThanRequests" | "TargetLowerThanRequests";
|
|
1276
|
+
interface VpaSpec {
|
|
1277
|
+
targetRef: {
|
|
1278
|
+
apiVersion: string;
|
|
1279
|
+
kind: string;
|
|
1280
|
+
name: string;
|
|
1281
|
+
namespace?: string;
|
|
1282
|
+
};
|
|
1283
|
+
updatePolicy?: {
|
|
1284
|
+
updateMode: UpdateMode;
|
|
1285
|
+
minReplicas?: number;
|
|
1286
|
+
evictionRequirements?: {
|
|
1287
|
+
resources: {
|
|
1288
|
+
resourceName: ResourceName;
|
|
1289
|
+
}[];
|
|
1290
|
+
changeRequirement: EvictionChangeRequirement;
|
|
1291
|
+
}[];
|
|
1292
|
+
};
|
|
1293
|
+
resourcePolicy?: {
|
|
1294
|
+
containerPolicies: {
|
|
1295
|
+
containerName: string;
|
|
1296
|
+
mode?: UpdateMode;
|
|
1297
|
+
minAllowed?: {};
|
|
1298
|
+
maxAllowed?: {};
|
|
1299
|
+
controlledResources?: ResourceName[];
|
|
1300
|
+
controlledValues?: "RequestsAndLimits" | "RequestsOnly";
|
|
1301
|
+
}[];
|
|
1302
|
+
};
|
|
1303
|
+
recommenders?: {
|
|
1304
|
+
name: string;
|
|
1305
|
+
}[];
|
|
1306
|
+
}
|
|
1307
|
+
interface VpaStatus {
|
|
1308
|
+
conditions: VpaCondition[];
|
|
1309
|
+
recommendation?: VpaRecommendation;
|
|
1310
|
+
}
|
|
1311
|
+
interface VpaCondition {
|
|
1312
|
+
type: string;
|
|
1313
|
+
status: string;
|
|
1314
|
+
lastTransitionTime: string;
|
|
1315
|
+
reason?: string;
|
|
1316
|
+
message?: string;
|
|
1317
|
+
}
|
|
1318
|
+
interface RecommendationValue {
|
|
1319
|
+
cpu?: string;
|
|
1320
|
+
memory?: string;
|
|
1321
|
+
storage?: string;
|
|
1322
|
+
ephemeralStorage?: string;
|
|
1323
|
+
}
|
|
1324
|
+
interface VpaRecommendation {
|
|
1325
|
+
containerRecommendations: {
|
|
1326
|
+
containerName: string;
|
|
1327
|
+
lowerBound: RecommendationValue;
|
|
1328
|
+
target: RecommendationValue;
|
|
1329
|
+
uncappedTarget: RecommendationValue;
|
|
1330
|
+
upperBound: RecommendationValue;
|
|
1331
|
+
}[];
|
|
1332
|
+
}
|
|
1333
|
+
export type Workload = DaemonSet | ReplicaSet | StatefulSet | Job | CronJob | Deployment;
|
|
1334
|
+
export {};
|
|
1335
|
+
//# sourceMappingURL=types.d.ts.map
|