Skip to content

Commit

Permalink
controller: Skip TLS when missing certs
Browse files Browse the repository at this point in the history
Issue: When running controller locally for development the certificates
are usually missing and the main controller can fail to send requests to
some existing inventory.

Fix: Skip TLS check when the certs are missing.

Signed-off-by: Martin Necas <[email protected]>
  • Loading branch information
mnecas committed Feb 25, 2025
1 parent 90b8be3 commit 4e6c948
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/provider/web/base/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ func (c *RestClient) buildTransport() (err error) {
transport.TLSClientConfig = &tls.Config{
RootCAs: pool,
}
} else {
// Disable TLS for development when certs are missing
transport.TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
}
}

c.Transport = transport
Expand Down

0 comments on commit 4e6c948

Please sign in to comment.