Skip to content

Commit

Permalink
Validate kindConfigFile while configuring Kind cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Volodin <dmvolod@gmail.com>
  • Loading branch information
dmvolod committed Nov 9, 2023
1 parent b4b509b commit 5f44bc9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion support/kind/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ func (k *Cluster) clusterExists(name string) (string, bool) {
}

func (k *Cluster) CreateWithConfig(ctx context.Context, kindConfigFile string) (string, error) {
args := []string{"--config", kindConfigFile}
var args []string
if kindConfigFile != "" {
args = append(args, "--config", kindConfigFile)
}
if k.image != "" {
args = append(args, "--image", k.image)
}
Expand Down

0 comments on commit 5f44bc9

Please sign in to comment.