-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [LKEAPIFW-428] LKE clusters should have IP ACL integration on CM (part 1) #10968
Conversation
Thanks for the contribution @talmai. Would you please move this to Draft until it's ready to be reviewed? |
7b7310e
to
4cd457e
Compare
…s; IPACL drawer showing enabled only when enabled wip
8870af0
to
265a3ca
Compare
Can someone help me get the changeset together? I keep hitting the following error:
|
Just pushed up a changeset! (I had to run the Giving a quick glance over the files - seems like there are a few new components and flows. Will there be test coverage added later/is there a ticket for it already? |
Coverage Report: ❌ |
packages/manager/src/features/Kubernetes/CreateCluster/ControlPlaneACLPane.tsx
Outdated
Show resolved
Hide resolved
Hi @talmai! I'm seeing a test has failed repeatedly in
yarn cy:run -s "cypress/e2e/core/kubernetes/lke-create.spec.ts" (You might have to follow our Cypress first time setup docs, but feel free to reach out on Slack if you have any questions or run into any trouble) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Let me know when you need a final review!
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx
Outdated
Show resolved
Hide resolved
@@ -58,3 +59,28 @@ export const createKubeClusterSchema = object().shape({ | |||
.of(nodePoolSchema) | |||
.min(1, 'Please add at least one node pool.'), | |||
}); | |||
|
|||
export const ipv4Address = string().test({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good callout. Nice job using validation here. Looks clean and seems to work work well with react hook form
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeSummaryPanel.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This poor form 😭
It really needs the react-hook-form
treatment.
This looks good for now, but hopefully we can find some time in the future to refactor this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder if it would make sense to just not use MultipleIPInput
at all for cases like this (in the future. we can leave it for now unless you want to do more work 😅 ). I do think abstractions are good, but I feel like building the same thing without the abstraction is also fine. MultipeIPInput
just seems a bit rigid and doesn't enable us to be as flexible. For example, I wonder if react-hook-form
's useFieldArray
could be used for the IPs (similar to packages/manager/src/features/Linodes/LinodeCreate/VPC/VPCRanges.tsx
) if we weren't locked into using MultipleIPInput
.
Most of that is me thing thinking out-loud, but what you did here seems fair to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅 I'm gonna leave as is for now since I still need to finish the e2e tests, but will hopefully revisit this down the line! Maybe this could be part of the work for transitioning ClusterCreate
to react-hook-form
, since that also uses MultipleIPInput
update: [M3-8777]
4ab6aaa
to
c871570
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coliu-akamai Fantastic job taking over a large PR that should have been broken down in the first place. Should have been flagged right away and rejected in its current shape. It's really hard to digest and ended up taking far more time it would have taken to make several small PRs.
I am going to spend some extra time with the UI in the coming days but so far I have not caught any issue with the UI & functionality. Left some minor comments and will get back to this, with fresh eyes a bit later.
|
||
export interface ControlPlaneACLOptions { | ||
enabled?: boolean; | ||
'revision-id'?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems quite unusual for the API to introduce a hyphened id
property. It doesn't usually play very well with downstream consumers...
forVPCIPv4Ranges || isLinkStyled ? ( | ||
<StyledLinkButtonBox sx={{ marginTop: isLinkStyled ? '8px' : '12px' }}> | ||
<LinkButton onClick={addNewInput}>{buttonText}</LinkButton> | ||
</StyledLinkButtonBox> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just pass SX
?
const payload: KubernetesControlPlaneACLPayload = { | ||
acl: { | ||
enabled: acl.enabled, | ||
'revision-id': acl['revision-id'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comment above.. not this PR's fault, but... why
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeControlPaneACLDrawer.tsx
Outdated
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great on my end - I did not find functionality issues after the second pass, tho I may still miss some context on the feature as a whole. Thanks for taking this to the finish line @coliu-akamai
Cloud Manager E2E Run #6715
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #6715
|
Run duration | 29m 04s |
Commit |
8b9d956cb1: feat: [LKEAPIFW-428] LKE clusters should have IP ACL integration on CM (part 1) ...
|
Committer | Talmai Oliveira |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
5
|
Pending |
2
|
Skipped |
0
|
Passing |
438
|
View all changes introduced in this branch ↗︎ |
@@ -30,12 +29,8 @@ export const KubernetesClusterDetail = () => { | |||
const id = Number(clusterID); | |||
const location = useLocation(); | |||
const showAPL = useGetAPLAvailability(); | |||
const kubernetesClusterBetaQuery = useKubernetesClusterBetaQuery(id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@talmai , why this was removed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we consolidated the logic for this query with the already existing kubernetesClusterQuery
so that we'd only need one query key. The functionality should still exist, it's just been moved. Apologies if this caused any confusion!
see here for reasoning/discussion for the change, and here for the file changes (lines 112-118)
Description 📝
Enables creation of LKE clusters with IP ACLS; enables updates of already migrated clusters
Changes 🔄
*** tests will be in separate PRs: #11131 and #11132
Target release date 🗓️
Oct 28th release
Preview 📷
Cluster creation:
Cluster summary:
New IPACL Drawer:
How to test 🧪
Spin up this branch, update to reach alpha's apinext backend. Once all set, attempt to create new clusters with ipacls and then update them.
For release testing: you should also be able to create clusters in the prod env, but for creating clusters without IPACL, see Talmai's comment (and use the prod env)
Prerequisites
See how to test
Verification steps
As an Author I have considered 🤔
Check all that apply