This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git


The following commit(s) were added to refs/heads/main by this push:
     new 7f6b0da  Adding `setup.kind.no-wait` configuration (#127)
7f6b0da is described below

commit 7f6b0da20f170b181a79cf89ef7d47848ac34138
Author: mrproliu <[email protected]>
AuthorDate: Thu Jul 4 01:04:06 2024 +0000

    Adding `setup.kind.no-wait` configuration (#127)
---
 CHANGES.md                          | 4 ++++
 docs/en/setup/Configuration-File.md | 1 +
 internal/components/setup/kind.go   | 4 +++-
 internal/config/e2eConfig.go        | 1 +
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index ef8ca61..fd201cd 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -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
diff --git a/docs/en/setup/Configuration-File.md 
b/docs/en/setup/Configuration-File.md
index d6e833c..d171214 100644
--- a/docs/en/setup/Configuration-File.md
+++ b/docs/en/setup/Configuration-File.md
@@ -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
diff --git a/internal/components/setup/kind.go 
b/internal/components/setup/kind.go
index a344fe0..137c966 100644
--- a/internal/components/setup/kind.go
+++ b/internal/components/setup/kind.go
@@ -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...")
diff --git a/internal/config/e2eConfig.go b/internal/config/e2eConfig.go
index 18a3352..34271bf 100644
--- a/internal/config/e2eConfig.go
+++ b/internal/config/e2eConfig.go
@@ -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 {

Reply via email to