@highstate/k8s 0.7.0 → 0.7.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/{helm-BV9UE-B8.js → helm-wPTgVV1N.js} +179 -48
- package/dist/index.d.ts +339 -74
- package/dist/index.js +531 -198
- package/dist/shared-Clzbl5K-.js +89 -0
- package/dist/units/cert-manager/index.js +6 -5
- package/dist/units/dns01-issuer/index.js +3 -3
- package/dist/units/existing-cluster/index.js +21 -5
- package/package.json +8 -7
- package/dist/shared-r5jBysdR.js +0 -51
package/dist/index.d.ts
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
+
import { PartialKeys, RequiredKeys } from '@highstate/contract';
|
1
2
|
import { k8s } from '@highstate/library';
|
2
|
-
import { Input, Unwrap, Output, InputArray,
|
3
|
-
import { Provider, core, types,
|
3
|
+
import { Input, Unwrap, Output, ComponentResource, InputArray, Resource, Inputs, ComponentResourceOptions, ResourceOptions, InputMap } from '@highstate/pulumi';
|
4
|
+
import { Provider, core, types, batch, helm } from '@pulumi/kubernetes';
|
4
5
|
import { gateway, types as types$1 } from '@highstate/gateway-api';
|
5
|
-
import { PartialKeys, RequiredKeys } from '@highstate/contract';
|
6
|
-
import { DnsRecord } from '@highstate/common';
|
7
6
|
import { Input as Input$1, ComponentResource as ComponentResource$1, Output as Output$1, ComponentResourceOptions as ComponentResourceOptions$1 } from '@pulumi/pulumi';
|
7
|
+
import { DnsRecord } from '@highstate/common';
|
8
8
|
import { local } from '@pulumi/command';
|
9
9
|
|
10
|
-
declare function
|
10
|
+
declare function getProvider(cluster: Input<k8s.Cluster>): Promise<Provider>;
|
11
11
|
declare function createNamespace(name: string, provider: Provider, args?: core.v1.NamespaceArgs): core.v1.Namespace;
|
12
|
+
declare function getNamespace(name: string | undefined, provider: Provider): core.v1.Namespace;
|
12
13
|
type NamespaceLike = core.v1.Namespace | string;
|
13
14
|
type CommonArgs = {
|
14
15
|
/**
|
@@ -18,17 +19,110 @@ type CommonArgs = {
|
|
18
19
|
/**
|
19
20
|
* The namespace to create the resource in.
|
20
21
|
*/
|
21
|
-
namespace
|
22
|
+
namespace: Input<NamespaceLike | undefined>;
|
22
23
|
/**
|
23
24
|
* The metadata to apply to the resource.
|
24
25
|
*/
|
25
26
|
metadata?: Input<types.input.meta.v1.ObjectMeta>;
|
26
27
|
};
|
27
|
-
declare function mapMetadata(args: Unwrap<CommonArgs>, fallbackName?: string): types.input.meta.v1.ObjectMeta;
|
28
|
+
declare function mapMetadata(args: PartialKeys<Unwrap<CommonArgs>, "namespace">, fallbackName?: string): types.input.meta.v1.ObjectMeta;
|
28
29
|
type SelectorLike = types.input.meta.v1.LabelSelector | Record<string, Input<string>>;
|
29
30
|
declare function mapSelectorLikeToSelector(selector: SelectorLike): types.input.meta.v1.LabelSelector;
|
30
31
|
declare function mapNamespaceLikeToNamespaceName(namespace: NamespaceLike): Output<string>;
|
31
32
|
declare function mapNamespaceNameToSelector(namespace: Input<string>): types.input.meta.v1.LabelSelector;
|
33
|
+
type ResourceId = {
|
34
|
+
name: Input<string>;
|
35
|
+
namespace?: Input<string | undefined>;
|
36
|
+
};
|
37
|
+
declare function getAppName(resourceId: Unwrap<ResourceId>): string;
|
38
|
+
declare function getAppDisplayName(resourceId: Unwrap<ResourceId>): string;
|
39
|
+
|
40
|
+
type ServiceArgs = CommonArgs & {
|
41
|
+
port?: Input<types.input.core.v1.ServicePort>;
|
42
|
+
/**
|
43
|
+
* The service to patch instead of creating a new one.
|
44
|
+
*/
|
45
|
+
patch?: Input<k8s.Service>;
|
46
|
+
/**
|
47
|
+
* The cluster to create the resource in.
|
48
|
+
*/
|
49
|
+
cluster: Input<k8s.Cluster>;
|
50
|
+
} & types.input.core.v1.ServiceSpec;
|
51
|
+
declare abstract class Service extends ComponentResource {
|
52
|
+
/**
|
53
|
+
* The cluster info associated with the service.
|
54
|
+
*/
|
55
|
+
readonly clusterInfo: Output<k8s.ClusterInfo>;
|
56
|
+
/**
|
57
|
+
* The metadata of the underlying Kubernetes service.
|
58
|
+
*/
|
59
|
+
readonly metadata: Output<types.output.meta.v1.ObjectMeta>;
|
60
|
+
/**
|
61
|
+
* The spec of the underlying Kubernetes service.
|
62
|
+
*/
|
63
|
+
readonly spec: Output<types.output.core.v1.ServiceSpec>;
|
64
|
+
/**
|
65
|
+
* The status of the underlying Kubernetes service.
|
66
|
+
*/
|
67
|
+
readonly status: Output<types.output.core.v1.ServiceStatus>;
|
68
|
+
/**
|
69
|
+
* The resources associated with the service.
|
70
|
+
*/
|
71
|
+
readonly resources: InputArray<Resource>;
|
72
|
+
protected constructor(type: string, name: string, args: Inputs, opts: ComponentResourceOptions,
|
73
|
+
/**
|
74
|
+
* The cluster info associated with the service.
|
75
|
+
*/
|
76
|
+
clusterInfo: Output<k8s.ClusterInfo>,
|
77
|
+
/**
|
78
|
+
* The metadata of the underlying Kubernetes service.
|
79
|
+
*/
|
80
|
+
metadata: Output<types.output.meta.v1.ObjectMeta>,
|
81
|
+
/**
|
82
|
+
* The spec of the underlying Kubernetes service.
|
83
|
+
*/
|
84
|
+
spec: Output<types.output.core.v1.ServiceSpec>,
|
85
|
+
/**
|
86
|
+
* The status of the underlying Kubernetes service.
|
87
|
+
*/
|
88
|
+
status: Output<types.output.core.v1.ServiceStatus>,
|
89
|
+
/**
|
90
|
+
* The resources associated with the service.
|
91
|
+
*/
|
92
|
+
resources: InputArray<Resource>);
|
93
|
+
/**
|
94
|
+
* The Highstate service entity.
|
95
|
+
*/
|
96
|
+
get entity(): Output<k8s.Service>;
|
97
|
+
static create(name: string, args: ServiceArgs, opts: ComponentResourceOptions): Service;
|
98
|
+
static wrap(name: string, service: Input<core.v1.Service>, clusterInfo: Input<k8s.ClusterInfo>, opts: ComponentResourceOptions): Service;
|
99
|
+
static external(name: string, id: ResourceId, clusterInfo: Input<k8s.ClusterInfo>, opts: ComponentResourceOptions): Service;
|
100
|
+
static of(name: string, entity: Input<k8s.Service>, opts: ComponentResourceOptions): Service;
|
101
|
+
/**
|
102
|
+
* Returns the host of the service accessible from the cluster.
|
103
|
+
*
|
104
|
+
* The format is `name.namespace.svc`.
|
105
|
+
*/
|
106
|
+
get clusterHost(): Output<string>;
|
107
|
+
/**
|
108
|
+
* Returns the external IP of the service.
|
109
|
+
*
|
110
|
+
* If the load balancer is available, the external IP is returned, otherwise the IP of the node.
|
111
|
+
*
|
112
|
+
* If the service has no external IP, `undefined` is returned.
|
113
|
+
*/
|
114
|
+
get externalIp(): Output<string | undefined>;
|
115
|
+
/**
|
116
|
+
* The "most public" IP of the service.
|
117
|
+
*
|
118
|
+
* Resolves to the external IP if available, otherwise the cluster IP.
|
119
|
+
*
|
120
|
+
* If the service is headless, an error is thrown.
|
121
|
+
*/
|
122
|
+
get ip(): Output<string>;
|
123
|
+
}
|
124
|
+
declare function mapContainerPortToServicePort(port: types.input.core.v1.ContainerPort): types.input.core.v1.ServicePort;
|
125
|
+
declare function mapServiceToLabelSelector(service: core.v1.Service): types.input.meta.v1.LabelSelector;
|
32
126
|
|
33
127
|
interface FullBackendRef {
|
34
128
|
/**
|
@@ -53,9 +147,9 @@ interface ServiceBackendRef {
|
|
53
147
|
/**
|
54
148
|
* The port of the service being referenced.
|
55
149
|
*/
|
56
|
-
port: Input<number
|
150
|
+
port: Input<number>;
|
57
151
|
}
|
58
|
-
type BackendRef = FullBackendRef | ServiceBackendRef |
|
152
|
+
type BackendRef = FullBackendRef | ServiceBackendRef | Service;
|
59
153
|
|
60
154
|
type HttpRouteArgs = Omit<CommonArgs, "namespace"> & {
|
61
155
|
/**
|
@@ -108,19 +202,59 @@ declare class HttpRoute extends ComponentResource {
|
|
108
202
|
constructor(name: string, args: HttpRouteArgs, opts?: ComponentResourceOptions);
|
109
203
|
}
|
110
204
|
|
111
|
-
type
|
112
|
-
port?: Input<types.input.core.v1.ServicePort>;
|
113
|
-
} & types.input.core.v1.ServiceSpec;
|
114
|
-
declare class Service extends ComponentResource {
|
205
|
+
type PersistentVolumeClaimArgs = CommonArgs & types.input.core.v1.PersistentVolumeClaimSpec & {
|
115
206
|
/**
|
116
|
-
* The
|
207
|
+
* The size of the volume to request.
|
208
|
+
*
|
209
|
+
* By default, the size is set to "100Mi".
|
117
210
|
*/
|
118
|
-
|
119
|
-
|
211
|
+
size?: string;
|
212
|
+
/**
|
213
|
+
* The cluster to create the resource in.
|
214
|
+
*/
|
215
|
+
cluster: Input<k8s.Cluster>;
|
216
|
+
};
|
217
|
+
declare abstract class PersistentVolumeClaim extends ComponentResource {
|
218
|
+
/**
|
219
|
+
* The cluster info associated with the pvc.
|
220
|
+
*/
|
221
|
+
readonly clusterInfo: Output<k8s.ClusterInfo>;
|
222
|
+
/**
|
223
|
+
* The metadata of the underlying Kubernetes pvc.
|
224
|
+
*/
|
225
|
+
readonly metadata: Output<types.output.meta.v1.ObjectMeta>;
|
226
|
+
/**
|
227
|
+
* The spec of the underlying Kubernetes pvc.
|
228
|
+
*/
|
229
|
+
readonly spec: Output<types.output.core.v1.PersistentVolumeClaimSpec>;
|
230
|
+
/**
|
231
|
+
* The status of the underlying Kubernetes pvc.
|
232
|
+
*/
|
233
|
+
readonly status: Output<types.output.core.v1.PersistentVolumeClaimStatus>;
|
234
|
+
protected constructor(type: string, name: string, args: Inputs, opts: ComponentResourceOptions,
|
235
|
+
/**
|
236
|
+
* The cluster info associated with the pvc.
|
237
|
+
*/
|
238
|
+
clusterInfo: Output<k8s.ClusterInfo>,
|
239
|
+
/**
|
240
|
+
* The metadata of the underlying Kubernetes pvc.
|
241
|
+
*/
|
242
|
+
metadata: Output<types.output.meta.v1.ObjectMeta>,
|
243
|
+
/**
|
244
|
+
* The spec of the underlying Kubernetes pvc.
|
245
|
+
*/
|
246
|
+
spec: Output<types.output.core.v1.PersistentVolumeClaimSpec>,
|
247
|
+
/**
|
248
|
+
* The status of the underlying Kubernetes pvc.
|
249
|
+
*/
|
250
|
+
status: Output<types.output.core.v1.PersistentVolumeClaimStatus>);
|
251
|
+
/**
|
252
|
+
* The Highstate service entity.
|
253
|
+
*/
|
254
|
+
get entity(): Output<k8s.PersistentVolumeClaim>;
|
255
|
+
static create(name: string, args: PersistentVolumeClaimArgs, opts: ComponentResourceOptions): PersistentVolumeClaim;
|
256
|
+
static of(name: string, entity: Input<k8s.PersistentVolumeClaim>, opts: ComponentResourceOptions): PersistentVolumeClaim;
|
120
257
|
}
|
121
|
-
declare function mapContainerPortToServicePort(port: types.input.core.v1.ContainerPort): types.input.core.v1.ServicePort;
|
122
|
-
declare function mapServiceToLabelSelector(service: core.v1.Service): types.input.meta.v1.LabelSelector;
|
123
|
-
declare function getServiceHost(service: core.v1.Service): Output<string>;
|
124
258
|
|
125
259
|
type Container = Omit<PartialKeys<types.input.core.v1.Container, "name">, "volumeMounts"> & {
|
126
260
|
/**
|
@@ -190,55 +324,141 @@ type ContainerVolumeMount = types.input.core.v1.VolumeMount | (Omit<types.input.
|
|
190
324
|
*/
|
191
325
|
volume: Input<WorkloadVolume>;
|
192
326
|
});
|
193
|
-
type WorkloadVolume = types.input.core.v1.Volume | core.v1.PersistentVolumeClaim | core.v1.ConfigMap | core.v1.Secret;
|
327
|
+
type WorkloadVolume = types.input.core.v1.Volume | core.v1.PersistentVolumeClaim | PersistentVolumeClaim | core.v1.ConfigMap | core.v1.Secret;
|
194
328
|
|
195
|
-
type
|
196
|
-
container?: Input<Container>;
|
329
|
+
type WorkloadArgs = CommonArgs & {
|
330
|
+
container?: Input$1<Container>;
|
197
331
|
containers?: InputArray<Container>;
|
198
|
-
|
199
|
-
|
332
|
+
/**
|
333
|
+
* The cluster to create the resource in.
|
334
|
+
*/
|
335
|
+
cluster: Input$1<k8s.Cluster>;
|
336
|
+
};
|
337
|
+
type PublicWorkloadArgs = WorkloadArgs & {
|
338
|
+
service?: Input$1<Omit<ServiceArgs, "cluster" | "namespace">>;
|
339
|
+
httpRoute?: Input$1<Omit<HttpRouteArgs, "cluster" | "namespace">>;
|
340
|
+
patch?: Input$1<k8s.Deployment | k8s.StatefulSet>;
|
341
|
+
} & Partial<types.input.apps.v1.StatefulSetSpec>;
|
342
|
+
|
343
|
+
type DeploymentArgs = Omit<PublicWorkloadArgs, "patch"> & {
|
344
|
+
patch?: Input<k8s.Deployment>;
|
200
345
|
} & Omit<Partial<types.input.apps.v1.DeploymentSpec>, "template"> & {
|
201
346
|
template?: {
|
202
347
|
metadata?: types.input.meta.v1.ObjectMeta;
|
203
348
|
spec?: Partial<types.input.core.v1.PodSpec>;
|
204
349
|
};
|
205
350
|
};
|
206
|
-
declare class Deployment extends ComponentResource {
|
351
|
+
declare abstract class Deployment extends ComponentResource {
|
352
|
+
/**
|
353
|
+
* The cluster info associated with the deployment.
|
354
|
+
*/
|
355
|
+
readonly clusterInfo: Output<k8s.ClusterInfo>;
|
356
|
+
/**
|
357
|
+
* The metadata of the underlying Kubernetes deployment.
|
358
|
+
*/
|
359
|
+
readonly metadata: Output<types.output.meta.v1.ObjectMeta>;
|
360
|
+
/**
|
361
|
+
* The spec of the underlying Kubernetes deployment.
|
362
|
+
*/
|
363
|
+
readonly spec: Output<types.output.apps.v1.DeploymentSpec>;
|
364
|
+
/**
|
365
|
+
* The status of the underlying Kubernetes deployment.
|
366
|
+
*/
|
367
|
+
readonly status: Output<types.output.apps.v1.DeploymentStatus>;
|
368
|
+
private readonly _service;
|
369
|
+
private readonly _httpRoute;
|
207
370
|
/**
|
208
|
-
* The
|
371
|
+
* The resources associated with the deployment.
|
209
372
|
*/
|
210
|
-
readonly
|
373
|
+
readonly resources: InputArray<Resource>;
|
374
|
+
protected constructor(type: string, name: string, args: Inputs, opts: ComponentResourceOptions,
|
375
|
+
/**
|
376
|
+
* The cluster info associated with the deployment.
|
377
|
+
*/
|
378
|
+
clusterInfo: Output<k8s.ClusterInfo>,
|
379
|
+
/**
|
380
|
+
* The metadata of the underlying Kubernetes deployment.
|
381
|
+
*/
|
382
|
+
metadata: Output<types.output.meta.v1.ObjectMeta>,
|
383
|
+
/**
|
384
|
+
* The spec of the underlying Kubernetes deployment.
|
385
|
+
*/
|
386
|
+
spec: Output<types.output.apps.v1.DeploymentSpec>,
|
387
|
+
/**
|
388
|
+
* The status of the underlying Kubernetes deployment.
|
389
|
+
*/
|
390
|
+
status: Output<types.output.apps.v1.DeploymentStatus>, _service: Output<Service | undefined>, _httpRoute: Output<HttpRoute | undefined>,
|
391
|
+
/**
|
392
|
+
* The resources associated with the deployment.
|
393
|
+
*/
|
394
|
+
resources: InputArray<Resource>);
|
395
|
+
/**
|
396
|
+
* The Highstate deployment entity.
|
397
|
+
*/
|
398
|
+
get entity(): Output<k8s.Deployment>;
|
211
399
|
/**
|
212
400
|
* The service associated with the deployment.
|
213
401
|
*/
|
214
|
-
|
402
|
+
get service(): Output<Service>;
|
215
403
|
/**
|
216
404
|
* The HTTP route associated with the deployment.
|
217
405
|
*/
|
218
|
-
|
219
|
-
|
220
|
-
getRequiredService(): Output<Service>;
|
406
|
+
get httpRoute(): Output<HttpRoute>;
|
407
|
+
static create(name: string, args: DeploymentArgs, opts: ComponentResourceOptions): Deployment;
|
221
408
|
}
|
222
409
|
|
223
|
-
type
|
224
|
-
|
225
|
-
type StatefulSetArgs = CommonArgs & {
|
226
|
-
container?: Input<Container>;
|
227
|
-
containers?: InputArray<Container>;
|
228
|
-
volumeClaim?: Input<PersistentVolumeClaimArgs>;
|
229
|
-
volumeClaims?: InputArray<PersistentVolumeClaimArgs>;
|
230
|
-
service?: Input<ServiceArgs>;
|
410
|
+
type StatefulSetArgs = Omit<PublicWorkloadArgs, "patch"> & {
|
411
|
+
patch?: Input<k8s.StatefulSet>;
|
231
412
|
} & Partial<types.input.apps.v1.StatefulSetSpec>;
|
232
|
-
declare class StatefulSet extends ComponentResource {
|
413
|
+
declare abstract class StatefulSet extends ComponentResource {
|
414
|
+
/**
|
415
|
+
* The cluster info associated with the stateful set.
|
416
|
+
*/
|
417
|
+
readonly clusterInfo: Output<k8s.ClusterInfo>;
|
233
418
|
/**
|
234
|
-
* The underlying Kubernetes stateful set.
|
419
|
+
* The metadata of the underlying Kubernetes stateful set.
|
235
420
|
*/
|
236
|
-
readonly
|
421
|
+
readonly metadata: Output<types.output.meta.v1.ObjectMeta>;
|
422
|
+
/**
|
423
|
+
* The spec of the underlying Kubernetes stateful set.
|
424
|
+
*/
|
425
|
+
readonly spec: Output<types.output.apps.v1.StatefulSetSpec>;
|
426
|
+
/**
|
427
|
+
* The status of the underlying Kubernetes stateful set.
|
428
|
+
*/
|
429
|
+
readonly status: Output<types.output.apps.v1.StatefulSetStatus>;
|
430
|
+
private readonly _service;
|
431
|
+
private readonly _httpRoute;
|
432
|
+
protected constructor(type: string, name: string, args: Inputs, opts: ComponentResourceOptions,
|
433
|
+
/**
|
434
|
+
* The cluster info associated with the stateful set.
|
435
|
+
*/
|
436
|
+
clusterInfo: Output<k8s.ClusterInfo>,
|
437
|
+
/**
|
438
|
+
* The metadata of the underlying Kubernetes stateful set.
|
439
|
+
*/
|
440
|
+
metadata: Output<types.output.meta.v1.ObjectMeta>,
|
441
|
+
/**
|
442
|
+
* The spec of the underlying Kubernetes stateful set.
|
443
|
+
*/
|
444
|
+
spec: Output<types.output.apps.v1.StatefulSetSpec>,
|
445
|
+
/**
|
446
|
+
* The status of the underlying Kubernetes stateful set.
|
447
|
+
*/
|
448
|
+
status: Output<types.output.apps.v1.StatefulSetStatus>, _service: Output<Service | undefined>, _httpRoute: Output<HttpRoute | undefined>);
|
449
|
+
/**
|
450
|
+
* The Highstate stateful set entity.
|
451
|
+
*/
|
452
|
+
get entity(): Output<k8s.StatefulSet>;
|
237
453
|
/**
|
238
454
|
* The service associated with the stateful set.
|
239
455
|
*/
|
240
|
-
|
241
|
-
|
456
|
+
get service(): Output<Service>;
|
457
|
+
/**
|
458
|
+
* The HTTP route associated with the stateful set.
|
459
|
+
*/
|
460
|
+
get httpRoute(): Output<HttpRoute>;
|
461
|
+
static create(name: string, args: StatefulSetArgs, opts: ComponentResourceOptions): StatefulSet;
|
242
462
|
}
|
243
463
|
|
244
464
|
type NetworkPolicyPort = {
|
@@ -359,7 +579,7 @@ type EgressRuleArgs = {
|
|
359
579
|
*/
|
360
580
|
toCidrs?: InputArray<string>;
|
361
581
|
/**
|
362
|
-
*
|
582
|
+
* The FQDN to allow outgoing traffic.
|
363
583
|
*
|
364
584
|
* Will be ORed with other conditions inside the same rule (except ports).
|
365
585
|
*/
|
@@ -370,6 +590,20 @@ type EgressRuleArgs = {
|
|
370
590
|
* Will be ORed with other conditions inside the same rule (except ports).
|
371
591
|
*/
|
372
592
|
toFqdns?: InputArray<string>;
|
593
|
+
/**
|
594
|
+
* Either the FQDN or the IP address of the endpoint to allow outgoing traffic.
|
595
|
+
*
|
596
|
+
* Just a syntactic sugar for `toFqdn` and `toCidr` for cases when the endpoint can be both.
|
597
|
+
*
|
598
|
+
* Will be ORed with other conditions inside the same rule (except ports).
|
599
|
+
*/
|
600
|
+
toEndpoint?: Input<string>;
|
601
|
+
/**
|
602
|
+
* The list of allowed endpoints for outgoing traffic.
|
603
|
+
*
|
604
|
+
* Will be ORed with other conditions inside the same rule (except ports).
|
605
|
+
*/
|
606
|
+
toEndpoints?: InputArray<string>;
|
373
607
|
/**
|
374
608
|
* The service to allow traffic to.
|
375
609
|
*
|
@@ -462,6 +696,18 @@ type NetworkPolicyArgs = CommonArgs & {
|
|
462
696
|
* Enable the isolation of egress traffic, so that only matched traffic can egress.
|
463
697
|
*/
|
464
698
|
isolateEgress?: Input<boolean>;
|
699
|
+
/**
|
700
|
+
* Allow the eggress traffic to the API server of the cluster.
|
701
|
+
*
|
702
|
+
* By default, `false`.
|
703
|
+
*/
|
704
|
+
allowKubeApiServer?: Input<boolean>;
|
705
|
+
/**
|
706
|
+
* Allow the eggress traffic to the DNS server of the cluster.
|
707
|
+
*
|
708
|
+
* By default, `false`.
|
709
|
+
*/
|
710
|
+
allowKubeDns?: Input<boolean>;
|
465
711
|
};
|
466
712
|
type FullNetworkPolicyArgs = NetworkPolicyArgs & {
|
467
713
|
/**
|
@@ -479,10 +725,11 @@ type NormalizedRuleArgs = {
|
|
479
725
|
selectors: SelectorLike[];
|
480
726
|
ports: NetworkPolicyPort[];
|
481
727
|
};
|
482
|
-
type NormalizedNetworkPolicyArgs = Omit<Unwrap<NetworkPolicyArgs>, "podSelector" | "ingressRule" | "ingressRules" | "egressRule" | "egressRules" | "isolateIngress" | "isolateEgress"> & {
|
728
|
+
type NormalizedNetworkPolicyArgs = Omit<Unwrap<NetworkPolicyArgs>, "podSelector" | "ingressRule" | "ingressRules" | "egressRule" | "egressRules" | "isolateIngress" | "isolateEgress" | "allowKubeApiServer" | "allowKubeDNS"> & {
|
483
729
|
podSelector: Unwrap<types.input.meta.v1.LabelSelector>;
|
484
730
|
isolateIngress: boolean;
|
485
731
|
isolateEgress: boolean;
|
732
|
+
allowKubeApiServer: boolean;
|
486
733
|
ingressRules: NormalizedRuleArgs[];
|
487
734
|
egressRules: NormalizedRuleArgs[];
|
488
735
|
};
|
@@ -498,8 +745,14 @@ declare abstract class NetworkPolicy extends ComponentResource {
|
|
498
745
|
*/
|
499
746
|
readonly networkPolicy: Output<Resource>;
|
500
747
|
protected constructor(name: string, args: Unwrap<NetworkPolicyArgs>, opts?: ResourceOptions);
|
748
|
+
private static mapCidrFromEndpoint;
|
501
749
|
protected abstract create(name: string, args: NormalizedNetworkPolicyArgs, opts?: ResourceOptions): Input<Resource>;
|
502
|
-
static
|
750
|
+
private static readonly supportedCNIs;
|
751
|
+
static create(name: string, args: FullNetworkPolicyArgs, opts: ResourceOptions): Output<NetworkPolicy>;
|
752
|
+
static allowInsideNamespace(namespace: Input<NamespaceLike>, k8sCluster: Input<k8s.Cluster>, opts: ResourceOptions): Output<NetworkPolicy>;
|
753
|
+
static allowKubeApiServer(namespace: Input<NamespaceLike>, k8sCluster: Input<k8s.Cluster>, opts: ResourceOptions): Output<NetworkPolicy>;
|
754
|
+
static allowKubeDns(namespace: Input<NamespaceLike>, k8sCluster: Input<k8s.Cluster>, opts: ResourceOptions): Output<NetworkPolicy>;
|
755
|
+
static allowAllEgress(namespace: Input<NamespaceLike>, k8sCluster: Input<k8s.Cluster>, opts: ResourceOptions): Output<NetworkPolicy>;
|
503
756
|
}
|
504
757
|
|
505
758
|
type UseAccessPointResult = {
|
@@ -510,18 +763,32 @@ type UseAccessPointResult = {
|
|
510
763
|
/**
|
511
764
|
* The DNS record associated created according to the access point and gateway.
|
512
765
|
*/
|
513
|
-
|
766
|
+
dnsRecords: DnsRecord[];
|
767
|
+
/**
|
768
|
+
* The network policies associated with the access point.
|
769
|
+
*/
|
770
|
+
networkPolicies: NetworkPolicy[];
|
514
771
|
};
|
515
772
|
type UseAccessPointArgs = Omit<CreateGatewayArgs, "gateway"> & {
|
516
773
|
accessPoint: Input<k8s.AccessPoint>;
|
517
774
|
};
|
518
775
|
declare function useAccessPoint(args: UseAccessPointArgs): Promise<UseAccessPointResult>;
|
776
|
+
type StandardAccessPointArgs = {
|
777
|
+
fqdn: string;
|
778
|
+
};
|
779
|
+
type StandardAccessPointInputs = {
|
780
|
+
accessPoint: Output<k8s.AccessPoint>;
|
781
|
+
k8sCluster: Output<k8s.Cluster>;
|
782
|
+
};
|
783
|
+
declare function useStandardAcessPoint(appName: string, namespace: core.v1.Namespace, args: StandardAccessPointArgs, inputs: StandardAccessPointInputs, provider: Provider): Promise<UseAccessPointResult>;
|
519
784
|
type CreateGatewayArgs = {
|
520
785
|
name: string;
|
521
786
|
namespace: Input<core.v1.Namespace>;
|
522
787
|
annotations?: Input<Record<string, string>>;
|
523
|
-
fqdn
|
788
|
+
fqdn?: Input<string>;
|
789
|
+
fqdns?: InputArray<string>;
|
524
790
|
gateway: Input<k8s.Gateway>;
|
791
|
+
clusterInfo: Input<k8s.ClusterInfo>;
|
525
792
|
provider: Provider;
|
526
793
|
};
|
527
794
|
|
@@ -669,32 +936,34 @@ declare class CronJob extends ComponentResource {
|
|
669
936
|
constructor(name: string, args: CronJobArgs, opts?: ComponentResourceOptions);
|
670
937
|
}
|
671
938
|
|
672
|
-
type ChartArgs
|
939
|
+
type ChartArgs = Omit<helm.v4.ChartArgs, "chart" | "version" | "repositoryOpts" | "namespace"> & {
|
673
940
|
/**
|
674
941
|
* The namespace to deploy the chart into.
|
675
942
|
*/
|
676
943
|
namespace?: Input$1<NamespaceLike>;
|
677
944
|
/**
|
678
|
-
* The custom name of the service
|
945
|
+
* The custom name of the primary service exposed by the chart.
|
679
946
|
*
|
680
947
|
* By default, it is the same as the chart name.
|
681
948
|
*/
|
682
949
|
serviceName?: string;
|
683
950
|
/**
|
684
|
-
* The
|
951
|
+
* The manifest of the chart to resolve.
|
685
952
|
*/
|
686
|
-
|
953
|
+
chart: ChartManifest;
|
687
954
|
/**
|
688
|
-
* The
|
955
|
+
* The cluster to create the resource in.
|
689
956
|
*/
|
690
|
-
|
957
|
+
cluster: Input$1<k8s.Cluster>;
|
691
958
|
/**
|
692
959
|
* The http route args to bind the service to.
|
693
960
|
*/
|
694
961
|
httpRoute?: Input$1<HttpRouteArgs>;
|
695
962
|
};
|
696
|
-
declare class Chart
|
963
|
+
declare class Chart extends ComponentResource$1 {
|
697
964
|
private readonly name;
|
965
|
+
private readonly args;
|
966
|
+
private readonly opts?;
|
698
967
|
/**
|
699
968
|
* The underlying Helm chart.
|
700
969
|
*/
|
@@ -703,29 +972,27 @@ declare class Chart<TCharts extends ChartRepository = ChartRepository, TName ext
|
|
703
972
|
* The HTTP route associated with the deployment.
|
704
973
|
*/
|
705
974
|
readonly httpRoute: Output$1<HttpRoute | undefined>;
|
706
|
-
constructor(name: string, args: ChartArgs
|
707
|
-
|
708
|
-
|
975
|
+
constructor(name: string, args: ChartArgs, opts?: ComponentResourceOptions$1 | undefined);
|
976
|
+
get service(): Output$1<Service>;
|
977
|
+
private readonly services;
|
978
|
+
getServiceOutput(name: string | undefined): Output$1<Service>;
|
979
|
+
getService(name?: string): Promise<Service>;
|
709
980
|
}
|
710
|
-
type RenderedChartArgs
|
981
|
+
type RenderedChartArgs = {
|
711
982
|
/**
|
712
983
|
* The namespace to deploy the chart into.
|
713
984
|
*/
|
714
985
|
namespace?: Input$1<NamespaceLike>;
|
715
986
|
/**
|
716
|
-
* The
|
717
|
-
*/
|
718
|
-
charts: TCharts;
|
719
|
-
/**
|
720
|
-
* The name of the chart to resolve.
|
987
|
+
* The manifest of the chart to resolve.
|
721
988
|
*/
|
722
|
-
chart:
|
989
|
+
chart: ChartManifest;
|
723
990
|
/**
|
724
991
|
* The values to pass to the chart.
|
725
992
|
*/
|
726
993
|
values?: InputMap<string>;
|
727
994
|
};
|
728
|
-
declare class RenderedChart
|
995
|
+
declare class RenderedChart extends ComponentResource$1 {
|
729
996
|
/**
|
730
997
|
* The rendered manifest of the Helm chart.
|
731
998
|
*/
|
@@ -734,23 +1001,21 @@ declare class RenderedChart<TCharts extends ChartRepository = ChartRepository, T
|
|
734
1001
|
* The underlying command used to render the chart.
|
735
1002
|
*/
|
736
1003
|
readonly command: Output$1<local.Command>;
|
737
|
-
constructor(name: string, args: RenderedChartArgs
|
1004
|
+
constructor(name: string, args: RenderedChartArgs, opts?: ComponentResourceOptions$1);
|
738
1005
|
}
|
739
|
-
type
|
1006
|
+
type ChartManifest = {
|
740
1007
|
repo: string;
|
741
1008
|
name: string;
|
742
1009
|
version: string;
|
743
1010
|
sha256: string;
|
744
1011
|
};
|
745
|
-
type ChartRepository = Record<string, ChartEntry>;
|
746
1012
|
/**
|
747
1013
|
* Downloads or reuses the Helm chart according to the charts.json file.
|
748
1014
|
* Returns the full path to the chart's .tgz file.
|
749
1015
|
*
|
750
|
-
* @param
|
751
|
-
* @param name The name of the chart to resolve.
|
1016
|
+
* @param manifest The manifest of the Helm chart.
|
752
1017
|
*/
|
753
|
-
declare function resolveHelmChart
|
1018
|
+
declare function resolveHelmChart(manifest: ChartManifest): Promise<string>;
|
754
1019
|
/**
|
755
1020
|
* Extracts the service with the given name from the chart resources.
|
756
1021
|
* Throws an error if the service is not found.
|
@@ -768,4 +1033,4 @@ declare function getChartServiceOutput(chart: helm.v4.Chart, name: string): Outp
|
|
768
1033
|
*/
|
769
1034
|
declare function getChartService(chart: helm.v4.Chart, name: string): Promise<core.v1.Service>;
|
770
1035
|
|
771
|
-
export { Chart, type ChartArgs, type
|
1036
|
+
export { Chart, type ChartArgs, type ChartManifest, type CommonArgs, type Container, type ContainerEnvironment, type ContainerEnvironmentSource, type ContainerEnvironmentVariable, type ContainerVolumeMount, CronJob, type CronJobArgs, Deployment, type DeploymentArgs, type FullNetworkPolicyArgs, HttpRoute, type HttpRouteArgs, Job, type JobArgs, type NamespaceLike, NetworkPolicy, type NetworkPolicyArgs, type NetworkPolicyPort, type NormalizedNetworkPolicyArgs, type NormalizedRuleArgs, PersistentVolumeClaim, type PersistentVolumeClaimArgs, RenderedChart, type RenderedChartArgs, ScriptBundle, type ScriptBundleArgs, type ScriptContainer, type ScriptDistribution, type ScriptEnvironment, type SelectorLike, Service, type ServiceArgs, StatefulSet, type StatefulSetArgs, type WorkloadVolume, createNamespace, getProvider as createProvider, createScriptContainer, getAppDisplayName, getAppName, getChartService, getChartServiceOutput, getNamespace, mapContainerPortToServicePort, mapMetadata, mapNamespaceLikeToNamespaceName, mapNamespaceNameToSelector, mapSelectorLikeToSelector, mapServiceToLabelSelector, resolveHelmChart, useAccessPoint, useStandardAcessPoint };
|