Skip to content

Commit

Permalink
fix: panic in osroot controller
Browse files Browse the repository at this point in the history
Fixes #8753

There seems to be a problem in the machine config anyways, as
`machine.ca.crt` is missing for the worker (this should break `apid`
connectivity), but still Talos controller shouldn't enter a panic loop.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed May 21, 2024
1 parent e1711cd commit ce8c86d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/app/machined/pkg/controllers/secrets/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ func NewRootOSController() *RootOSController {
osSecrets.AcceptedCAs = append(osSecrets.AcceptedCAs, &x509.PEMEncodedCertificate{
Crt: osSecrets.IssuingCA.Crt,
})
}

if len(osSecrets.IssuingCA.Key) == 0 {
// drop incomplete issuing CA, as the machine config for workers contains just the cert
osSecrets.IssuingCA = nil
if len(osSecrets.IssuingCA.Key) == 0 {
// drop incomplete issuing CA, as the machine config for workers contains just the cert
osSecrets.IssuingCA = nil
}
}

osSecrets.CertSANIPs = nil
Expand Down

0 comments on commit ce8c86d

Please sign in to comment.