Make sure Nomd TLSConfig struct exists before setting Insecure

Fixes #1074
This commit is contained in:
Ian Fijolek
2024-05-28 11:19:48 -07:00
parent be3d838e3d
commit 1ab4453f43

View File

@@ -34,7 +34,9 @@ func (c *Client) listTaskImages() []model.Image {
}
if *c.config.TLSInsecure {
config.TLSConfig.Insecure = true
config.TLSConfig = &nomad.TLSConfig{
Insecure: true,
}
}
client, err := nomad.NewClient(config)