Skip to content

Commit 9e8cd17

Browse files
authored
Add nil check for SpotInstanceConfig (kubermatic#1009)
Signed-off-by: Marko Mudrinić <[email protected]>
1 parent 3a11501 commit 9e8cd17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cloudprovider/provider/aws/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func (p *provider) getConfig(s v1alpha1.ProviderSpec) (*Config, *providerconfigt
354354
c.Tags = rawConfig.Tags
355355
c.AssignPublicIP = rawConfig.AssignPublicIP
356356
c.IsSpotInstance = rawConfig.IsSpotInstance
357-
if c.IsSpotInstance != nil && *c.IsSpotInstance {
357+
if rawConfig.SpotInstanceConfig != nil && c.IsSpotInstance != nil && *c.IsSpotInstance {
358358
maxPrice, err := p.configVarResolver.GetConfigVarStringValue(rawConfig.SpotInstanceConfig.MaxPrice)
359359
if err != nil {
360360
return nil, nil, nil, err

0 commit comments

Comments
 (0)