Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding setup.kind.no-wait configuration #127

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading