Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-12814-removed-1757010425024.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Removed
---

Update strategy from the Node Pool summary item in LKE checkout bar ([#12814](https://github.com/linode/manager/pull/12814))
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,18 @@ import {
} from '@linode/ui';
import { pluralize } from '@linode/utilities';
import * as React from 'react';
import { useFormContext, useWatch } from 'react-hook-form';

import { DisplayPrice } from 'src/components/DisplayPrice';
import { EnhancedNumberInput } from 'src/components/EnhancedNumberInput/EnhancedNumberInput';
import { StyledLinkButtonBox } from 'src/components/SelectFirewallPanel/SelectFirewallPanel';
import {
MAX_NODES_PER_POOL_ENTERPRISE_TIER,
MAX_NODES_PER_POOL_STANDARD_TIER,
UPDATE_STRATEGY_OPTIONS,
} from 'src/features/Kubernetes/constants';

import { useIsLkeEnterpriseEnabled } from '../kubeUtils';

import type {
CreateClusterFormValues,
NodePoolConfigDrawerHandlerParams,
} from '../CreateCluster/CreateCluster';
import type { NodePoolConfigDrawerHandlerParams } from '../CreateCluster/CreateCluster';
import type { KubernetesTier } from '@linode/api-v4';
import type { ExtendedType } from 'src/utilities/extendType';

Expand Down Expand Up @@ -53,13 +48,6 @@ export const NodePoolSummaryItem = React.memo((props: Props) => {

const { isLkeEnterprisePostLAFeatureEnabled } = useIsLkeEnterpriseEnabled();

const { control } = useFormContext<CreateClusterFormValues>();
const nodePoolsWatcher = useWatch({
control,
name: 'nodePools',
});
const thisPool = nodePoolsWatcher[poolIndex];

// This should never happen but TS wants us to account for the situation
// where we fail to match a selected type against our types list.
if (poolType === null) {
Expand All @@ -78,13 +66,6 @@ export const NodePoolSummaryItem = React.memo((props: Props) => {
{pluralize('CPU', 'CPUs', poolType.vcpus)}, {poolType.disk / 1024}{' '}
GB Storage
</Typography>
<Typography>
{isLkeEnterprisePostLAFeatureEnabled && thisPool
? UPDATE_STRATEGY_OPTIONS.find(
(option) => option.value === thisPool?.update_strategy
)?.label
: ''}
</Typography>
</Stack>
<IconButton
data-testid="remove-pool-button"
Expand Down