@intentius/chant-lexicon-aws 0.41.10 → 0.41.12
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/composites/eks-cluster.d.ts +59 -0
- package/dist/composites/eks-cluster.d.ts.map +1 -0
- package/dist/composites/index.d.ts +2 -0
- package/dist/composites/index.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/src/composites/eks-cluster.test.ts +73 -0
- package/src/composites/eks-cluster.ts +164 -0
- package/src/composites/index.ts +2 -0
- package/src/index.ts +2 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EKSCluster, Nodegroup, Role } from "../generated/index.js";
|
|
2
|
+
export interface EksClusterProps {
|
|
3
|
+
/** Cluster name. Required: everything downstream addresses the cluster by it. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Subnet ids for the control plane ENIs — EKS requires at least two AZs. */
|
|
6
|
+
subnetIds: string[];
|
|
7
|
+
/** Extra security groups for the control plane (EKS always adds its own). */
|
|
8
|
+
securityGroupIds?: string[];
|
|
9
|
+
/** Kubernetes version, e.g. "1.31". Omitted takes EKS's current default. */
|
|
10
|
+
version?: string;
|
|
11
|
+
/** Node group shape. Omitted provisions no node group (control plane only). */
|
|
12
|
+
nodegroup?: {
|
|
13
|
+
instanceTypes?: string[];
|
|
14
|
+
desiredSize?: number;
|
|
15
|
+
minSize?: number;
|
|
16
|
+
maxSize?: number;
|
|
17
|
+
/** Subnets the nodes land in. Default: the cluster's own `subnetIds`. */
|
|
18
|
+
subnetIds?: string[];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Managed add-ons to install, by name (e.g. "eks-pod-identity-agent" —
|
|
22
|
+
* without which an AWS::EKS::PodIdentityAssociation delivers no
|
|
23
|
+
* credentials and the workload it binds crashloops on startup, found on
|
|
24
|
+
* kubemicrovm-ops' first real deploy). Named by the caller, never guessed;
|
|
25
|
+
* versions omitted take EKS's default. Up to three (fixed member slots
|
|
26
|
+
* `addon1..addon3`, keyed by position — the statically-evaluable shape);
|
|
27
|
+
* an estate needing more declares the rest as bare Addon resources.
|
|
28
|
+
*/
|
|
29
|
+
addons?: Array<{
|
|
30
|
+
name: string;
|
|
31
|
+
version?: string;
|
|
32
|
+
}>;
|
|
33
|
+
tags?: Array<{
|
|
34
|
+
Key: string;
|
|
35
|
+
Value: string;
|
|
36
|
+
}>;
|
|
37
|
+
defaults?: {
|
|
38
|
+
cluster?: Partial<ConstructorParameters<typeof EKSCluster>[0]>;
|
|
39
|
+
nodegroup?: Partial<ConstructorParameters<typeof Nodegroup>[0]>;
|
|
40
|
+
clusterRole?: Partial<ConstructorParameters<typeof Role>[0]>;
|
|
41
|
+
nodeRole?: Partial<ConstructorParameters<typeof Role>[0]>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare const EksCluster: import("@intentius/chant").CompositeDefinition<EksClusterProps, {
|
|
45
|
+
addon3?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
46
|
+
addon2?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
47
|
+
addon1?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
48
|
+
clusterRole: import("@intentius/chant").Declarable & Record<string, string>;
|
|
49
|
+
cluster: import("@intentius/chant").Declarable & Record<string, string>;
|
|
50
|
+
} | {
|
|
51
|
+
addon3?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
52
|
+
addon2?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
53
|
+
addon1?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
54
|
+
clusterRole: import("@intentius/chant").Declarable & Record<string, string>;
|
|
55
|
+
cluster: import("@intentius/chant").Declarable & Record<string, string>;
|
|
56
|
+
nodeRole: import("@intentius/chant").Declarable & Record<string, string>;
|
|
57
|
+
nodegroup: import("@intentius/chant").Declarable & Record<string, string>;
|
|
58
|
+
}>;
|
|
59
|
+
//# sourceMappingURL=eks-cluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eks-cluster.d.ts","sourceRoot":"","sources":["../../src/composites/eks-cluster.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAS,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGlE,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,SAAS,CAAC,EAAE;QACV,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,yEAAyE;QACzE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;IACF;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,IAAI,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChE,WAAW,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3D,CAAC;CACH;AAID,eAAO,MAAM,UAAU;;;;;;;;;;;;;;EA8FP,CAAC"}
|
|
@@ -32,6 +32,8 @@ export { Ec2InstanceRole } from "./ec2-instance-role.js";
|
|
|
32
32
|
export type { Ec2InstanceRoleProps } from "./ec2-instance-role.js";
|
|
33
33
|
export { MinimalVpc } from "./minimal-vpc.js";
|
|
34
34
|
export type { MinimalVpcProps } from "./minimal-vpc.js";
|
|
35
|
+
export { EksCluster } from "./eks-cluster.js";
|
|
36
|
+
export type { EksClusterProps } from "./eks-cluster.js";
|
|
35
37
|
export { MicrovmApp, MICROVM_LIMITS } from "./microvm-app.js";
|
|
36
38
|
export type { MicrovmAppProps, MicrovmAppResult, MicrovmAppBuildConnectorProps, MicrovmMemoryMiB } from "./microvm-app.js";
|
|
37
39
|
export { AgentCoreAgent } from "./agentcore-agent.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composites/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACvG,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACtE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAA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3C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export type { CFNSchema, SchemaProperty, SchemaDefinition } from "./spec/fetch.j
|
|
|
23
23
|
export { parseCFNSchema, cfnShortName, cfnServiceName } from "./spec/parse.js";
|
|
24
24
|
export type { SchemaParseResult, ParsedResource, ParsedProperty, ParsedAttribute, ParsedPropertyType, ParsedEnum, PropertyConstraints } from "./spec/parse.js";
|
|
25
25
|
export { S3Actions, LambdaActions, DynamoDBActions, SQSActions, SNSActions, IAMActions, ECRActions, LogsActions, ECSActions } from "./actions/index.js";
|
|
26
|
-
export { LambdaFunction, LambdaNode, LambdaPython, NodeLambda, PythonLambda, LambdaApi, LambdaScheduled, ScheduledLambda, LambdaSqs, LambdaEventBridge, LambdaDynamoDB, LambdaS3, LambdaSns, VpcDefault, FargateAlb, AlbShared, FargateService, RdsInstance, RdsPostgres, EfsWithAccessPoint, Ec2InstanceRole, MinimalVpc, SolrFargateService, MicrovmApp, MICROVM_LIMITS, AgentCoreAgent, } from "./composites/index.js";
|
|
27
|
-
export type { LambdaFunctionProps, LambdaApiProps, ScheduledLambdaProps, LambdaSqsProps, LambdaEventBridgeProps, LambdaDynamoDBProps, LambdaS3Props, LambdaSnsProps, VpcDefaultProps, FargateAlbProps, AlbSharedProps, FargateServiceProps, RdsInstanceProps, RdsPostgresProps, EfsWithAccessPointProps, Ec2InstanceRoleProps, MinimalVpcProps, SolrFargateServiceProps, MicrovmAppProps, MicrovmAppResult, MicrovmAppBuildConnectorProps, MicrovmMemoryMiB, AgentCoreAgentProps, AgentCoreAgentResult, } from "./composites/index.js";
|
|
26
|
+
export { LambdaFunction, LambdaNode, LambdaPython, NodeLambda, PythonLambda, LambdaApi, LambdaScheduled, ScheduledLambda, LambdaSqs, LambdaEventBridge, LambdaDynamoDB, LambdaS3, LambdaSns, VpcDefault, FargateAlb, AlbShared, FargateService, RdsInstance, RdsPostgres, EfsWithAccessPoint, Ec2InstanceRole, MinimalVpc, EksCluster, SolrFargateService, MicrovmApp, MICROVM_LIMITS, AgentCoreAgent, } from "./composites/index.js";
|
|
27
|
+
export type { LambdaFunctionProps, LambdaApiProps, ScheduledLambdaProps, LambdaSqsProps, LambdaEventBridgeProps, LambdaDynamoDBProps, LambdaS3Props, LambdaSnsProps, VpcDefaultProps, FargateAlbProps, AlbSharedProps, FargateServiceProps, RdsInstanceProps, RdsPostgresProps, EfsWithAccessPointProps, Ec2InstanceRoleProps, MinimalVpcProps, EksClusterProps, SolrFargateServiceProps, MicrovmAppProps, MicrovmAppResult, MicrovmAppBuildConnectorProps, MicrovmMemoryMiB, AgentCoreAgentProps, AgentCoreAgentResult, } from "./composites/index.js";
|
|
28
28
|
export { generate, writeGeneratedFiles } from "./codegen/generate.js";
|
|
29
29
|
export { packageLexicon } from "./codegen/package.js";
|
|
30
30
|
export type { PackageOptions, PackageResult } from "./codegen/package.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAA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e,EAAE,cAAc,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EACzG,uBAAuB,EACvB,oBAAoB,EAAE,eAAe,EAAE,eAAe,EACtD,uBAAuB,EACvB,eAAe,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,gBAAgB,EAClF,mBAAmB,EAAE,oBAAoB,GAC1C,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "c30f447783709ca1501f1c4dbc4648568b08f07fc63fb322cbfeb75cd713740b",
|
|
5
5
|
"meta.json": "2e4cae67cbc2eb2962c3dd0aa57008ae96fb725dd0118af7b04b2b44eab7722a",
|
|
6
6
|
"types/index.d.ts": "6d6b37bd14a9b40fb3ff5c66e1cb49be1ae1032de47a4e167cf5f411c943b7f5",
|
|
7
7
|
"rules/hardcoded-region.ts": "5a0eaf7ab391231fe6cd51426ece29539cb4b36f31c8dd060956638fed55722a",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"skills/chant-aws-eks.md": "8789255709ff004ad0a875fd5999edcdc66fc6e33d710db058d9f42703bcfdfe",
|
|
60
60
|
"skills/chant-aws-carve-terraform.md": "f4c6fe1c702250665f90d82b3bdaba5ea50ae75e380a8ae321dad6eb1c39683e"
|
|
61
61
|
},
|
|
62
|
-
"composite": "
|
|
62
|
+
"composite": "d028551030c4fcd1fce01daf33202ddd5bc1e33fe417025dd6df378e7f2a6cbb"
|
|
63
63
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-aws",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.12",
|
|
4
4
|
"description": "AWS CloudFormation lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"typescript": "^5.9.3"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@intentius/chant": "^0.41.
|
|
83
|
+
"@intentius/chant": "^0.41.12",
|
|
84
84
|
"typescript": "^5.9.3"
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { describe, test, expect } from "vitest";
|
|
2
|
+
import { AttrRef } from "@intentius/chant/attrref";
|
|
3
|
+
import { EksCluster } from "./eks-cluster";
|
|
4
|
+
|
|
5
|
+
const subnets = ["subnet-aaa", "subnet-bbb"];
|
|
6
|
+
|
|
7
|
+
describe("EksCluster", () => {
|
|
8
|
+
test("control-plane-only: cluster + its role, wired by AttrRef", () => {
|
|
9
|
+
const c = EksCluster({ name: "kmv-dev", subnetIds: subnets });
|
|
10
|
+
expect(c.cluster).toBeDefined();
|
|
11
|
+
expect(c.clusterRole).toBeDefined();
|
|
12
|
+
expect((c as unknown as Record<string, unknown>).nodegroup).toBeUndefined();
|
|
13
|
+
const clusterProps = (c.cluster as any).props;
|
|
14
|
+
expect(clusterProps.RoleArn).toBeInstanceOf(AttrRef);
|
|
15
|
+
expect(clusterProps.ResourcesVpcConfig.SubnetIds).toEqual(subnets);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// The composite's return is a union (nodegroup-less vs full), and the
|
|
19
|
+
// repo-wide typecheck rightly refuses to narrow it structurally — tests go
|
|
20
|
+
// through a member map, the same access the expander itself uses.
|
|
21
|
+
type Members = Record<string, { props?: Record<string, any> } | undefined>;
|
|
22
|
+
|
|
23
|
+
test("with a nodegroup: node role carries the three worker policies, nodes default into the cluster subnets", () => {
|
|
24
|
+
const c = EksCluster({
|
|
25
|
+
name: "kmv-prod",
|
|
26
|
+
subnetIds: subnets,
|
|
27
|
+
version: "1.31",
|
|
28
|
+
nodegroup: { desiredSize: 2 },
|
|
29
|
+
}) as unknown as Members;
|
|
30
|
+
expect(c.nodegroup).toBeDefined();
|
|
31
|
+
expect(c.nodeRole).toBeDefined();
|
|
32
|
+
const ngProps = c.nodegroup!.props!;
|
|
33
|
+
expect(ngProps.ClusterName).toBe("kmv-prod");
|
|
34
|
+
expect(ngProps.Subnets).toEqual(subnets);
|
|
35
|
+
expect(ngProps.ScalingConfig.MinSize).toBe(2);
|
|
36
|
+
expect(ngProps.ScalingConfig.MaxSize).toBe(2);
|
|
37
|
+
expect(c.nodeRole!.props!.ManagedPolicyArns).toHaveLength(3);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test("nodegroup subnets override; scaling bounds honor explicit min/max", () => {
|
|
41
|
+
const c = EksCluster({
|
|
42
|
+
name: "kmv-ha",
|
|
43
|
+
subnetIds: subnets,
|
|
44
|
+
nodegroup: { subnetIds: ["subnet-nodes"], desiredSize: 2, minSize: 1, maxSize: 4 },
|
|
45
|
+
}) as unknown as Members;
|
|
46
|
+
const ng2 = c.nodegroup!.props!;
|
|
47
|
+
expect(ng2.Subnets).toEqual(["subnet-nodes"]);
|
|
48
|
+
expect(ng2.ScalingConfig.MinSize).toBe(1);
|
|
49
|
+
expect(ng2.ScalingConfig.MaxSize).toBe(4);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test("defaults escape hatch reaches the cluster (e.g. deletion protection)", () => {
|
|
53
|
+
const c = EksCluster({
|
|
54
|
+
name: "kmv-guarded",
|
|
55
|
+
subnetIds: subnets,
|
|
56
|
+
defaults: { cluster: { DeletionProtection: true } },
|
|
57
|
+
});
|
|
58
|
+
expect((c.cluster as any).props.DeletionProtection).toBe(true);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test("addons become keyed members, DependsOn the cluster (the pod-identity agent case)", () => {
|
|
62
|
+
const c = EksCluster({
|
|
63
|
+
name: "kmv-real",
|
|
64
|
+
subnetIds: subnets,
|
|
65
|
+
nodegroup: {},
|
|
66
|
+
addons: [{ name: "eks-pod-identity-agent" }],
|
|
67
|
+
}) as unknown as Members;
|
|
68
|
+
const addon = c.addon1;
|
|
69
|
+
expect(addon).toBeDefined();
|
|
70
|
+
expect(addon!.props?.AddonName).toBe("eks-pod-identity-agent");
|
|
71
|
+
expect(addon!.props?.ClusterName).toBe("kmv-real");
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EksCluster — a managed EKS control plane, its node group, and the two IAM
|
|
3
|
+
* roles they cannot exist without, as the one unit they are.
|
|
4
|
+
*
|
|
5
|
+
* The first consumer is kubemicrovm-ops' cluster plane (its "all infra from
|
|
6
|
+
* the tiers and targets" directive: the cluster stops being a
|
|
7
|
+
* reference-existing input and becomes provisionable), but nothing here is
|
|
8
|
+
* kubemicrovm-shaped — a cluster+nodegroup+roles bundle is what every EKS
|
|
9
|
+
* estate starts with, and cc-aws-canonical's bare cluster is the degenerate
|
|
10
|
+
* form of it.
|
|
11
|
+
*
|
|
12
|
+
* What is deliberately NOT here:
|
|
13
|
+
* - Networking. EKS requires subnets in at least two AZs, and `VpcDefault`
|
|
14
|
+
* (this directory) already provisions exactly that shape — the two
|
|
15
|
+
* composites compose rather than nest, so an adopter with their own VPC
|
|
16
|
+
* passes their own subnet ids.
|
|
17
|
+
* - Add-ons, OIDC/IRSA, access entries. Real per-estate decisions; a bundle
|
|
18
|
+
* that guessed them would fight every adopter. `defaults.cluster` /
|
|
19
|
+
* `defaults.nodegroup` are the escape hatch for the fields this surface
|
|
20
|
+
* does not name.
|
|
21
|
+
*
|
|
22
|
+
* On floci the cluster is k3s-backed and real (`aws eks update-kubeconfig`
|
|
23
|
+
* works, pods run — the cc-aws-canonical estate proved the path); the node
|
|
24
|
+
* group is accepted and tracked but backs no separate machines, which is the
|
|
25
|
+
* emulator being honest about what a laptop can host.
|
|
26
|
+
*/
|
|
27
|
+
import { Composite, mergeDefaults } from "@intentius/chant";
|
|
28
|
+
import { Addon, EKSCluster, Nodegroup, Role } from "../generated";
|
|
29
|
+
import { Sub } from "../intrinsics";
|
|
30
|
+
|
|
31
|
+
export interface EksClusterProps {
|
|
32
|
+
/** Cluster name. Required: everything downstream addresses the cluster by it. */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Subnet ids for the control plane ENIs — EKS requires at least two AZs. */
|
|
35
|
+
subnetIds: string[];
|
|
36
|
+
/** Extra security groups for the control plane (EKS always adds its own). */
|
|
37
|
+
securityGroupIds?: string[];
|
|
38
|
+
/** Kubernetes version, e.g. "1.31". Omitted takes EKS's current default. */
|
|
39
|
+
version?: string;
|
|
40
|
+
/** Node group shape. Omitted provisions no node group (control plane only). */
|
|
41
|
+
nodegroup?: {
|
|
42
|
+
instanceTypes?: string[];
|
|
43
|
+
desiredSize?: number;
|
|
44
|
+
minSize?: number;
|
|
45
|
+
maxSize?: number;
|
|
46
|
+
/** Subnets the nodes land in. Default: the cluster's own `subnetIds`. */
|
|
47
|
+
subnetIds?: string[];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Managed add-ons to install, by name (e.g. "eks-pod-identity-agent" —
|
|
51
|
+
* without which an AWS::EKS::PodIdentityAssociation delivers no
|
|
52
|
+
* credentials and the workload it binds crashloops on startup, found on
|
|
53
|
+
* kubemicrovm-ops' first real deploy). Named by the caller, never guessed;
|
|
54
|
+
* versions omitted take EKS's default. Up to three (fixed member slots
|
|
55
|
+
* `addon1..addon3`, keyed by position — the statically-evaluable shape);
|
|
56
|
+
* an estate needing more declares the rest as bare Addon resources.
|
|
57
|
+
*/
|
|
58
|
+
addons?: Array<{ name: string; version?: string }>;
|
|
59
|
+
tags?: Array<{ Key: string; Value: string }>;
|
|
60
|
+
defaults?: {
|
|
61
|
+
cluster?: Partial<ConstructorParameters<typeof EKSCluster>[0]>;
|
|
62
|
+
nodegroup?: Partial<ConstructorParameters<typeof Nodegroup>[0]>;
|
|
63
|
+
clusterRole?: Partial<ConstructorParameters<typeof Role>[0]>;
|
|
64
|
+
nodeRole?: Partial<ConstructorParameters<typeof Role>[0]>;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const managedPolicy = (name: string) => Sub`arn:\${AWS::Partition}:iam::aws:policy/${name}`;
|
|
69
|
+
|
|
70
|
+
export const EksCluster = Composite((props: EksClusterProps) => {
|
|
71
|
+
const { defaults } = props;
|
|
72
|
+
|
|
73
|
+
const clusterRole = new Role(mergeDefaults({
|
|
74
|
+
AssumeRolePolicyDocument: {
|
|
75
|
+
Version: "2012-10-17",
|
|
76
|
+
Statement: [
|
|
77
|
+
{ Effect: "Allow", Principal: { Service: "eks.amazonaws.com" }, Action: "sts:AssumeRole" },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
ManagedPolicyArns: [managedPolicy("AmazonEKSClusterPolicy")],
|
|
81
|
+
Tags: props.tags,
|
|
82
|
+
}, defaults?.clusterRole));
|
|
83
|
+
|
|
84
|
+
const cluster = new EKSCluster(mergeDefaults({
|
|
85
|
+
Name: props.name,
|
|
86
|
+
RoleArn: clusterRole.Arn,
|
|
87
|
+
Version: props.version,
|
|
88
|
+
ResourcesVpcConfig: {
|
|
89
|
+
SubnetIds: props.subnetIds,
|
|
90
|
+
...(props.securityGroupIds ? { SecurityGroupIds: props.securityGroupIds } : {}),
|
|
91
|
+
},
|
|
92
|
+
Tags: props.tags,
|
|
93
|
+
}, defaults?.cluster));
|
|
94
|
+
|
|
95
|
+
// Three fixed add-on slots, the same statically-evaluable shape
|
|
96
|
+
// vpc-default uses for its optional third AZ: a ternary is an expression
|
|
97
|
+
// (EVL-clean); a loop-built member map is control flow the reference
|
|
98
|
+
// composites must not contain (EVL002/EVL003). Members are addon1..addon3
|
|
99
|
+
// in the caller's order — logical ids stay stable as long as the order
|
|
100
|
+
// does, which the caller controls.
|
|
101
|
+
const a1 = props.addons?.[0];
|
|
102
|
+
const a2 = props.addons?.[1];
|
|
103
|
+
const a3 = props.addons?.[2];
|
|
104
|
+
const addon1 = a1
|
|
105
|
+
? new Addon({ ClusterName: props.name, AddonName: a1.name, AddonVersion: a1.version, Tags: props.tags }, { DependsOn: [cluster] })
|
|
106
|
+
: undefined;
|
|
107
|
+
const addon2 = a2
|
|
108
|
+
? new Addon({ ClusterName: props.name, AddonName: a2.name, AddonVersion: a2.version, Tags: props.tags }, { DependsOn: [cluster] })
|
|
109
|
+
: undefined;
|
|
110
|
+
const addon3 = a3
|
|
111
|
+
? new Addon({ ClusterName: props.name, AddonName: a3.name, AddonVersion: a3.version, Tags: props.tags }, { DependsOn: [cluster] })
|
|
112
|
+
: undefined;
|
|
113
|
+
|
|
114
|
+
if (!props.nodegroup) {
|
|
115
|
+
return {
|
|
116
|
+
clusterRole,
|
|
117
|
+
cluster,
|
|
118
|
+
...(addon1 ? { addon1 } : {}),
|
|
119
|
+
...(addon2 ? { addon2 } : {}),
|
|
120
|
+
...(addon3 ? { addon3 } : {}),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const nodeRole = new Role(mergeDefaults({
|
|
125
|
+
AssumeRolePolicyDocument: {
|
|
126
|
+
Version: "2012-10-17",
|
|
127
|
+
Statement: [
|
|
128
|
+
{ Effect: "Allow", Principal: { Service: "ec2.amazonaws.com" }, Action: "sts:AssumeRole" },
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
ManagedPolicyArns: [
|
|
132
|
+
managedPolicy("AmazonEKSWorkerNodePolicy"),
|
|
133
|
+
managedPolicy("AmazonEKS_CNI_Policy"),
|
|
134
|
+
managedPolicy("AmazonEC2ContainerRegistryReadOnly"),
|
|
135
|
+
],
|
|
136
|
+
Tags: props.tags,
|
|
137
|
+
}, defaults?.nodeRole));
|
|
138
|
+
|
|
139
|
+
const nodegroup = new Nodegroup(mergeDefaults({
|
|
140
|
+
// The literal, not an attribute reference: Name is an input the caller
|
|
141
|
+
// gave us, and the generated class exposes accessors only for GetAtt
|
|
142
|
+
// attributes. The creation-order edge is DependsOn below.
|
|
143
|
+
ClusterName: props.name,
|
|
144
|
+
NodeRole: nodeRole.Arn,
|
|
145
|
+
Subnets: props.nodegroup.subnetIds ?? props.subnetIds,
|
|
146
|
+
InstanceTypes: props.nodegroup.instanceTypes ?? ["t3.medium"],
|
|
147
|
+
ScalingConfig: {
|
|
148
|
+
DesiredSize: props.nodegroup.desiredSize ?? 2,
|
|
149
|
+
MinSize: props.nodegroup.minSize ?? props.nodegroup.desiredSize ?? 2,
|
|
150
|
+
MaxSize: props.nodegroup.maxSize ?? props.nodegroup.desiredSize ?? 2,
|
|
151
|
+
},
|
|
152
|
+
Tags: props.tags ? Object.fromEntries(props.tags.map((t) => [t.Key, t.Value])) : undefined,
|
|
153
|
+
}, defaults?.nodegroup), { DependsOn: [cluster] });
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
clusterRole,
|
|
157
|
+
cluster,
|
|
158
|
+
nodeRole,
|
|
159
|
+
nodegroup,
|
|
160
|
+
...(addon1 ? { addon1 } : {}),
|
|
161
|
+
...(addon2 ? { addon2 } : {}),
|
|
162
|
+
...(addon3 ? { addon3 } : {}),
|
|
163
|
+
};
|
|
164
|
+
}, "EksCluster");
|
package/src/composites/index.ts
CHANGED
|
@@ -32,6 +32,8 @@ export { Ec2InstanceRole } from "./ec2-instance-role";
|
|
|
32
32
|
export type { Ec2InstanceRoleProps } from "./ec2-instance-role";
|
|
33
33
|
export { MinimalVpc } from "./minimal-vpc";
|
|
34
34
|
export type { MinimalVpcProps } from "./minimal-vpc";
|
|
35
|
+
export { EksCluster } from "./eks-cluster";
|
|
36
|
+
export type { EksClusterProps } from "./eks-cluster";
|
|
35
37
|
export { MicrovmApp, MICROVM_LIMITS } from "./microvm-app";
|
|
36
38
|
export type { MicrovmAppProps, MicrovmAppResult, MicrovmAppBuildConnectorProps, MicrovmMemoryMiB } from "./microvm-app";
|
|
37
39
|
export { AgentCoreAgent } from "./agentcore-agent";
|
package/src/index.ts
CHANGED
|
@@ -110,7 +110,7 @@ export {
|
|
|
110
110
|
LambdaSqs, LambdaEventBridge, LambdaDynamoDB, LambdaS3, LambdaSns,
|
|
111
111
|
VpcDefault, FargateAlb, AlbShared, FargateService, RdsInstance, RdsPostgres,
|
|
112
112
|
EfsWithAccessPoint,
|
|
113
|
-
Ec2InstanceRole, MinimalVpc,
|
|
113
|
+
Ec2InstanceRole, MinimalVpc, EksCluster,
|
|
114
114
|
SolrFargateService,
|
|
115
115
|
MicrovmApp, MICROVM_LIMITS,
|
|
116
116
|
AgentCoreAgent,
|
|
@@ -120,7 +120,7 @@ export type {
|
|
|
120
120
|
LambdaSqsProps, LambdaEventBridgeProps, LambdaDynamoDBProps, LambdaS3Props, LambdaSnsProps,
|
|
121
121
|
VpcDefaultProps, FargateAlbProps, AlbSharedProps, FargateServiceProps, RdsInstanceProps, RdsPostgresProps,
|
|
122
122
|
EfsWithAccessPointProps,
|
|
123
|
-
Ec2InstanceRoleProps, MinimalVpcProps,
|
|
123
|
+
Ec2InstanceRoleProps, MinimalVpcProps, EksClusterProps,
|
|
124
124
|
SolrFargateServiceProps,
|
|
125
125
|
MicrovmAppProps, MicrovmAppResult, MicrovmAppBuildConnectorProps, MicrovmMemoryMiB,
|
|
126
126
|
AgentCoreAgentProps, AgentCoreAgentResult,
|