Skip to content

Commit f9d97e8

Browse files
fix: [M3-10709] - firewall_id error on LKE pool update (#13109)
* Fix firewall_id error on LKE E pool update * Added changeset: The `firewall_id` error on LKE pool update * Add comments and update false check instances * Revert accidental removal of update_strategy
1 parent ad6aaa2 commit f9d97e8

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Fixed
3+
---
4+
5+
The `firewall_id` error on LKE pool update ([#13109](https://github.com/linode/manager/pull/13109))

packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/ConfigureNodePool/ConfigureNodePoolForm.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ export const ConfigureNodePoolForm = (props: Props) => {
4646
// @TODO allow users to edit Node Pool `label` and `tags` because the API supports it. (ECE-353)
4747
// label: nodePool.label,
4848
// tags: nodePool.tags,
49-
firewall_id: nodePool.firewall_id,
49+
50+
/**
51+
* We set the default value of the form field to `undefined` if `nodePool.firewall_id` is null.
52+
* This ensures the field remains controlled in React Hook Form and is properly initialized,
53+
* preventing unexpected validation errors when the initial value is null.
54+
*/
55+
firewall_id: nodePool.firewall_id ?? undefined,
5056
update_strategy: nodePool.update_strategy,
5157
k8s_version: nodePool.k8s_version,
5258
},
@@ -87,7 +93,7 @@ export const ConfigureNodePoolForm = (props: Props) => {
8793
clusterTier={clusterTier ?? 'standard'}
8894
firewallSelectOptions={{
8995
allowFirewallRemoval: clusterTier === 'standard',
90-
...(nodePool.firewall_id !== 0 && {
96+
...(nodePool.firewall_id !== null && {
9197
disableDefaultFirewallRadio: true,
9298
defaultFirewallRadioTooltip:
9399
"You can't use this option once an existing Firewall has been selected.",

0 commit comments

Comments
 (0)