Nodegroups eks fargate eks - #1523
Conversation
|
Thanks for putting this together, the node group and Fargate profile support is a great addition and the wire shapes look spot on. I checked the paths, response wrappers, field casing, the A couple of things worth a look before this is ready. Node groups and Fargate profiles stay in The diff got reindented from 4 spaces to 2. Most of the line count in EksController.java and EksService.java is whitespace, which makes the real changes hard to spot and drops the comment explaining why the node group routes are declared explicitly (they have to outrank the S3 catch all, issue #1137). Reverting the formatting so only the new endpoints show would help a lot. Smaller notes:
Also the CI is red on a few checks, could you take a look? Example of the stuck status: Thanks again, this is close and the protocol side is solid. |
|
| Filename | Overview |
|---|---|
| src/main/java/io/github/hectorvent/floci/services/eks/EksService.java | Core service layer refactored to use dedicated request models, adds Fargate profile CRUD, fixes version inheritance from cluster, and includes UUID in both ARN types. |
| src/main/java/io/github/hectorvent/floci/services/eks/EksController.java | Added four new JAX-RS routes for Fargate profile CRUD; nodegroup methods updated to use renamed service methods and typed request model. |
| src/main/java/io/github/hectorvent/floci/services/eks/model/FargateProfile.java | New model class for Fargate profiles with nested Selector, Health, and Issue types; accountId correctly excluded from serialization via @JsonIgnore. |
| src/main/java/io/github/hectorvent/floci/services/eks/model/CreateNodeGroupRequest.java | New dedicated request model separating create-time input from the stored Nodegroup response shape. |
| src/main/java/io/github/hectorvent/floci/services/eks/model/CreateFargateProfileRequest.java | New request model for Fargate profile creation; all AWS API fields present including selectors and clientRequestToken. |
| src/test/java/io/github/hectorvent/floci/services/eks/EksServiceTest.java | Completely rewritten without Mockito using JDK dynamic proxies; adds 14 unit tests covering nodegroup and Fargate profile CRUD, validation, and error paths. |
| compatibility-tests/sdk-test-java/src/test/java/com/floci/test/EksTest.java | Added full lifecycle tests for nodegroups and Fargate profiles at orders 8-9, with proper cleanup in @afterall; ARN assertions now correctly require the UUID suffix segment. |
| src/main/java/io/github/hectorvent/floci/services/cloudformation/CloudFormationResourceProvisioner.java | Two call sites updated from old camelCase method names to renamed methods (deleteNodeGroup/createNodeGroup). |
| src/test/java/io/github/hectorvent/floci/services/eks/EksNodegroupIntegrationTest.java | Test method renames and status assertion tightened from anyOf(ACTIVE, CREATING) to equalTo(ACTIVE), reflecting immediate-active emulator behaviour. |
| docs/services/eks.md | Documents new nodegroup and Fargate profile endpoints with correct /node-groups and /fargate-profiles paths, ARN formats, and curl examples. |
Sequence Diagram
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Client as AWS SDK / curl
participant Ctrl as EksController
participant Svc as EksService
participant NGStore as nodeGroupStorage
participant FPStore as fargateProfileStorage
participant CStore as clusterStorage
Client->>Ctrl: "POST /clusters/{name}/node-groups"
Ctrl->>Svc: createNodeGroup(name, CreateNodeGroupRequest)
Svc->>Svc: map request to Nodegroup
Svc->>CStore: describeCluster(name) [validates cluster exists]
Svc->>NGStore: get(clusterName/ngName) [duplicate check]
Svc->>NGStore: put(clusterName/ngName, Nodegroup)
Svc-->>Ctrl: Nodegroup (ACTIVE)
Ctrl-->>Client: "200 {nodegroup: ...}"
Client->>Ctrl: "POST /clusters/{name}/fargate-profiles"
Ctrl->>Svc: createFargateProfile(name, CreateFargateProfileRequest)
Svc->>CStore: describeCluster(name) [validates cluster exists]
Svc->>FPStore: get(clusterName/profileName) [duplicate check]
Svc->>FPStore: put(clusterName/profileName, FargateProfile)
Svc-->>Ctrl: FargateProfile (ACTIVE)
Ctrl-->>Client: "200 {fargateProfile: ...}"
Client->>Ctrl: "DELETE /clusters/{name}/node-groups/{ngName}"
Ctrl->>Svc: deleteNodeGroup(name, ngName)
Svc->>NGStore: "get -> Nodegroup"
Svc->>NGStore: delete(clusterName/ngName)
Svc-->>Ctrl: Nodegroup (DELETING)
Ctrl-->>Client: "200 {nodegroup: {status: DELETING}}"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Client as AWS SDK / curl
participant Ctrl as EksController
participant Svc as EksService
participant NGStore as nodeGroupStorage
participant FPStore as fargateProfileStorage
participant CStore as clusterStorage
Client->>Ctrl: "POST /clusters/{name}/node-groups"
Ctrl->>Svc: createNodeGroup(name, CreateNodeGroupRequest)
Svc->>Svc: map request to Nodegroup
Svc->>CStore: describeCluster(name) [validates cluster exists]
Svc->>NGStore: get(clusterName/ngName) [duplicate check]
Svc->>NGStore: put(clusterName/ngName, Nodegroup)
Svc-->>Ctrl: Nodegroup (ACTIVE)
Ctrl-->>Client: "200 {nodegroup: ...}"
Client->>Ctrl: "POST /clusters/{name}/fargate-profiles"
Ctrl->>Svc: createFargateProfile(name, CreateFargateProfileRequest)
Svc->>CStore: describeCluster(name) [validates cluster exists]
Svc->>FPStore: get(clusterName/profileName) [duplicate check]
Svc->>FPStore: put(clusterName/profileName, FargateProfile)
Svc-->>Ctrl: FargateProfile (ACTIVE)
Ctrl-->>Client: "200 {fargateProfile: ...}"
Client->>Ctrl: "DELETE /clusters/{name}/node-groups/{ngName}"
Ctrl->>Svc: deleteNodeGroup(name, ngName)
Svc->>NGStore: "get -> Nodegroup"
Svc->>NGStore: delete(clusterName/ngName)
Svc-->>Ctrl: Nodegroup (DELETING)
Ctrl-->>Client: "200 {nodegroup: {status: DELETING}}"
Reviews (4): Last reviewed commit: "docs: sync generated action tables" | Re-trigger Greptile
|
@IoannisLafiotis check greptile comments. |
0b393c1 to
8f4ea6e
Compare
8f4ea6e to
350c50e
Compare
|
Nice work on the Fargate profile side. I checked the shapes against botocore's service-2.json and One thing to sort before merge. // sent
{"nodegroupName":"ng1","nodeRole":"...","subnets":["subnet-abc"],
"taints":[{"key":"dedicated","value":"gpu","effect":"NO_SCHEDULE"}]}
// returned
{"nodegroup":{"nodegroupName":"ng1","nodeRole":"...","subnets":["subnet-abc"]}}All four are on the Two smaller notes, neither blocking:
The Mockito removal in |
hectorvent
left a comment
There was a problem hiding this comment.
Thanks @IoannisLafiotis,
Solid implementation
* feat(eks): add nodegroups and fargate profiles * docs: sync generated action tables
Summary
feat:)Branch: nodegroupsEks_FargateEks
Commits:
c50f388 Testintg on node groups and fargate profiles
7b27f4e Add EKS SDK nodegroup and Fargate tests
Verification: