Skip to content

Commit

Permalink
Adding setup.kind.no-wait configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mrproliu committed Jul 3, 2024
1 parent 616a7d4 commit 0c99f4b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Release Notes.

1.4.0
------------------
#### Features

* Adding `setup.kind.no-wait` to support should wait for the kind cluster to be ready or not.

#### Bug Fixes

* Fix kind load docker-image error
Expand Down
1 change: 1 addition & 0 deletions docs/en/setup/Configuration-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ setup:
label-selector: # The resource label selector
for: # The wait condition
kind:
no-wait: false # Should wait the kind cluster resource ready, default is false, means wait for the cluster to be ready, otherwise it would not wait.
import-images: # import docker images to KinD
- image:version # support using env to expand image, such as `${env_key}` or `$env_key`
expose-ports: # Expose resource for host access
Expand Down
4 changes: 3 additions & 1 deletion internal/components/setup/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ func createKindCluster(kindConfigPath string, e2eConfig *config.E2EConfig) error
"create", "cluster",
"--config", kindConfigPath,
"--kubeconfig", kubeConfigPath,
"--wait", e2eConfig.Setup.GetTimeout().String(),
}
if !e2eConfig.Setup.Kind.NoWait {
args = append(args, "--wait", e2eConfig.Setup.GetTimeout().String())
}

logger.Log.Info("creating kind cluster...")
Expand Down
1 change: 1 addition & 0 deletions internal/config/e2eConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ type Step struct {
type KindSetup struct {
ImportImages []string `yaml:"import-images"`
ExposePorts []KindExposePort `yaml:"expose-ports"`
NoWait bool `yaml:"no-wait"`
}

type KindExposePort struct {
Expand Down

0 comments on commit 0c99f4b

Please sign in to comment.