Skip to content

Commit

Permalink
Forcing maxlength of 12 for node pool name (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Byers committed Nov 17, 2022
1 parent d5f2534 commit 51c63ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ param agentCountMax int = 0
var autoScale = agentCountMax > agentCount

@minLength(3)
@maxLength(20)
@maxLength(12)
@description('Name for user node pool')
param nodePoolName string = 'npuser01'

Expand Down
10 changes: 9 additions & 1 deletion helper/src/components/clusterTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,15 @@ export default function ({ tabValues, updateFn, featureFlag, invalidArray }) {
label={`Node count range ${cluster.autoscale ? 'range' : ''}`} min={0} max={100} step={1}
value={cluster.autoscale? cluster.maxCount : cluster.agentCount} showValue={true}
onChange={(val, range) => sliderUpdateFn(cluster.autoscale ? {agentCount: range[0], maxCount: range[1]} : {agentCount: val})} />
<TextField placeholder='npuser01' label="Node pool name" onChange={(ev, val) => updateFn('nodepoolName', val)} required errorMessage={getError(invalidArray, 'nodepoolName')} value={cluster.nodepoolName} />

<TextField
placeholder='npuser01'
label="Node pool name"
maxLength={12}
onChange={(ev, val) => updateFn('nodepoolName', val)}
required
errorMessage={getError(invalidArray, 'nodepoolName')}
value={cluster.nodepoolName} />
</Stack.Item>
</Stack>

Expand Down

0 comments on commit 51c63ab

Please sign in to comment.