Skip to content

Commit

Permalink
feat: [M3-8856] - Surface Labels and Taints for LKE node pools - Part…
Browse files Browse the repository at this point in the history
… 2 (#11553)

* Add Labels and Taints drawer to node pool options

* Add Label table

* Add Taint types and table

* Save WIP: Add labels and taints

* Add ability to remove label from table

* Add ability to remove taint from table

* Add missing L&T option to collapsed activity menu; clean up

* Add most test coverage for drawer view and delete

* Add submit functionality to drawer for updates

* Feature flag button/menu item until Part 2 is ready

* Finish test coverage

* Add changesets

* Update packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/LabelsAndTaints/LabelAndTaintDrawer.tsx

Co-authored-by: Hana Xu <[email protected]>

* Address feedback: actually use the mockType in the mocked request

* Address UX feedback: use outlined Add buttons

* Address feedback: fix 'X' alignment; improve spacing

* Fix bug where primary CTA was enabled when it shouldn't be

* Fix factory default for labels and update test

* Clean up in test

* Address feedback: store labels array in const

* Add LabelInput form

* Fix console error with table row keys

* Add Taint input form to drawer

* Fix issue with deleting taints with the same key

* Clean up; styling

* Fix bug with labelsArray

* More clean up

* Fix issue with incorrect component imports in TaintTable

* Clean up buttons for both Add forms

* Fix ref console error; useFieldArray to append

* Add validation schema and validation to taint field

* Use the correct prop for errorText

* Attempt to add label schema validation

* Clean up schemas

* Add helper text to input fields

* Move descriptive text to drawer above tables

* Remove 'x' button from label field

* Un-feature-flag

* Add test coverage for adding labels and taints

* Separate add and delete into two tests

* Remove width now that we don't have a 'x' icon

* Improve test coverage for error validation

* Add changesets

* Delete the changeset for Part 1 and link both parts under Added

* Update copy

* Address feedback: hide add forms on cancel/close drawer

* Add slash to dnsPrefixRegix and use a test function

* Update packages/validation/.changeset/pr-11553-added-1738177379377.md

Co-authored-by: Dajahi Wiley <[email protected]>

* Address feedback: fix taint deletion for same key-value pair

* Surface better formatted API errors for labels and taints

* Correct spec for reserved domains in labels

* Clean up in schema and error response formatting

* Improve accessiblity; prefer button stack to reversed actions panel

* Address feedback: focus prev row after table deletion

* Address feedback: @dwiley-akamai cleanup

* Address feedback: @hana-akamai clean up nesting

---------

Co-authored-by: Hana Xu <[email protected]>
Co-authored-by: Dajahi Wiley <[email protected]>
  • Loading branch information
3 people authored Feb 3, 2025
1 parent b1bf01f commit 461f5ef
Show file tree
Hide file tree
Showing 15 changed files with 901 additions and 172 deletions.
5 changes: 5 additions & 0 deletions packages/api-v4/.changeset/pr-11553-changed-1738177462941.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/api-v4": Changed
---

Update Taint value to allow undefined ([#11553](https://github.com/linode/manager/pull/11553))
2 changes: 1 addition & 1 deletion packages/api-v4/src/kubernetes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Label = {
export interface Taint {
effect: KubernetesTaintEffect;
key: string;
value: string;
value: string | undefined;
}

export interface KubernetesCluster {
Expand Down

This file was deleted.

5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11553-added-1738177305962.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Added
---

Labels and Taints to LKE Node Pools ([#11528](https://github.com/linode/manager/pull/11528), [#11553](https://github.com/linode/manager/pull/11553))
Loading

0 comments on commit 461f5ef

Please sign in to comment.