allow kube app to scale 0 (#10909)
parent
7a1893f864
commit
317eec2790
|
@ -34,12 +34,12 @@ export function ReplicationFormSection({
|
||||||
<FormControl label="Instance count" required>
|
<FormControl label="Instance count" required>
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="0"
|
||||||
max="9999"
|
max="9999"
|
||||||
value={values.replicaCount}
|
value={values.replicaCount}
|
||||||
disabled={!supportScalableReplicaDeployment}
|
disabled={!supportScalableReplicaDeployment}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
onChange({ replicaCount: e.target.valueAsNumber || 1 })
|
onChange({ replicaCount: e.target.valueAsNumber || 0 })
|
||||||
}
|
}
|
||||||
className="w-1/4"
|
className="w-1/4"
|
||||||
data-cy="k8sAppCreate-replicaCountInput"
|
data-cy="k8sAppCreate-replicaCountInput"
|
||||||
|
|
|
@ -20,7 +20,7 @@ export function replicationValidation(
|
||||||
} = validationData || {};
|
} = validationData || {};
|
||||||
return object({
|
return object({
|
||||||
replicaCount: number()
|
replicaCount: number()
|
||||||
.min(1, 'Instance count must be greater than 0.')
|
.min(0, 'Instance count must be greater than or equal to 0.')
|
||||||
.test(
|
.test(
|
||||||
'overflow',
|
'overflow',
|
||||||
'This application would exceed available resources. Please review resource reservations or the instance count.',
|
'This application would exceed available resources. Please review resource reservations or the instance count.',
|
||||||
|
|
Loading…
Reference in New Issue