Skip to content

Commit e98bf23

Browse files
committed
bug(nodeadm): run validation in config check
1 parent 28f65e2 commit e98bf23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nodeadm/cmd/nodeadm/config/check.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package config
22

33
import (
4+
"github.com/awslabs/amazon-eks-ami/nodeadm/internal/api"
45
"github.com/awslabs/amazon-eks-ami/nodeadm/internal/cli"
56
"github.com/awslabs/amazon-eks-ami/nodeadm/internal/configprovider"
67
"github.com/integrii/flaggy"
@@ -29,10 +30,13 @@ func (c *fileCmd) Run(log *zap.Logger, opts *cli.GlobalOptions) error {
2930
if err != nil {
3031
return err
3132
}
32-
_, err = provider.Provide()
33+
nodeConfig, err := provider.Provide()
3334
if err != nil {
3435
return err
3536
}
37+
if err := api.ValidateNodeConfig(nodeConfig); err != nil {
38+
return err
39+
}
3640
log.Info("Configuration is valid")
3741
return nil
3842
}

0 commit comments

Comments
 (0)