fix: validate that workers don't get cluster CA key
Only the cert should be present on worker nodes, enforce this via validation. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
3735add87c
commit
c6ad0fcceb
@ -374,6 +374,10 @@ func (c *ClusterConfig) Validate(isControlPlane bool) error {
|
||||
}
|
||||
}
|
||||
|
||||
if c.ClusterCA != nil && !isControlPlane && len(c.ClusterCA.Key) > 0 {
|
||||
result = multierror.Append(result, errors.New("cluster CA key is not allowed on non-controlplane nodes (.cluster.ca)"))
|
||||
}
|
||||
|
||||
result = multierror.Append(
|
||||
result,
|
||||
c.ClusterInlineManifests.Validate(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user