Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
barry cho
Rancher
Commits
675bd75f
Commit
675bd75f
authored
4 years ago
by
Darren Shepherd
Browse files
Options
Download
Email Patches
Plain Diff
Error out when an invalid nodePool is configured
parent
801f4729
master
cfbd0d3
dev
kinarashah-patch-1
release/v2.6
release/v2.6.2
revert-35793-temporarily-disable-fossa
snyk-fix-0564176c790784e319dbf499a8a4b2b8
update-issue-templates
Tags unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/controllers/provisioningv2/rke2/provisioningcluster/template.go
+4
-2
...llers/provisioningv2/rke2/provisioningcluster/template.go
with
4 additions
and
2 deletions
+4
-2
pkg/controllers/provisioningv2/rke2/provisioningcluster/template.go
+
4
-
2
View file @
675bd75f
...
...
@@ -140,10 +140,12 @@ func machineDeployments(cluster *rancherv1.Cluster, capiCluster *capi.Cluster, d
nodePoolNames
:=
map
[
string
]
bool
{}
for
_
,
nodePool
:=
range
cluster
.
Spec
.
RKEConfig
.
NodePools
{
if
nodePool
.
Name
==
""
||
nodePool
.
NodeConfig
==
nil
||
nodePool
.
NodeConfig
.
Name
==
""
||
nodePool
.
NodeConfig
.
Kind
==
""
||
(
nodePool
.
Quantity
!=
nil
&&
*
nodePool
.
Quantity
==
0
)
{
if
nodePool
.
Quantity
!=
nil
&&
*
nodePool
.
Quantity
==
0
{
continue
}
if
nodePool
.
Name
==
""
||
nodePool
.
NodeConfig
==
nil
||
nodePool
.
NodeConfig
.
Name
==
""
||
nodePool
.
NodeConfig
.
Kind
==
""
{
return
nil
,
fmt
.
Errorf
(
"invalid nodePool [%s] missing name or valid config"
,
nodePool
.
Name
)
}
if
!
nodePool
.
EtcdRole
&&
!
nodePool
.
ControlPlaneRole
&&
!
nodePool
.
WorkerRole
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help