Skip to content

Commit

Permalink
Revert "Fix e2e-simple test flake (istio#11271)" (istio#11331)
Browse files Browse the repository at this point in the history
This reverts commit f993e46.
  • Loading branch information
hklai authored and louiscryan committed Feb 14, 2019
1 parent 9c8bd40 commit 1ebb78d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -667,7 +667,7 @@ isti%.yaml: $(HELM) $(HOME)/.helm helm-repo-add
--values install/kubernetes/helm/istio/values-$@ \
install/kubernetes/helm/istio >> install/kubernetes/$@

generate_yaml: $(HELM) $(HOME)/.helm helm-repo-add istio-init.yaml
generate_yaml: $(HELM) $(HOME)/.helm helm-repo-add
$(HELM) dep update --skip-refresh install/kubernetes/helm/istio
./install/updateVersion.sh -a ${HUB},${TAG} >/dev/null 2>&1
cat install/kubernetes/namespace.yaml > install/kubernetes/istio.yaml
Expand Down Expand Up @@ -703,7 +703,7 @@ generate_yaml_coredump:
# TODO(sdake) All this copy and paste needs to go. This is easy to wrap up in
# isti%.yaml macro with value files per test scenario. Will handle
# as a followup PR.
generate_e2e_test_yaml: $(HELM) $(HOME)/.helm helm-repo-add istio-init.yaml
generate_e2e_test_yaml: $(HELM) $(HOME)/.helm helm-repo-add
$(HELM) dep update --skip-refresh install/kubernetes/helm/istio
./install/updateVersion.sh -a ${HUB},${TAG} >/dev/null 2>&1
cat install/kubernetes/namespace.yaml > install/kubernetes/istio.yaml
Expand Down
29 changes: 5 additions & 24 deletions tests/e2e/framework/kubernetes.go
Expand Up @@ -39,7 +39,6 @@ import (
const (
yamlSuffix = ".yaml"
istioInstallDir = "install/kubernetes"
initInstallFile = "istio-init.yaml"
nonAuthInstallFile = "istio.yaml"
authInstallFile = "istio-auth.yaml"
authSdsInstallFile = "istio-auth-sds.yaml"
Expand Down Expand Up @@ -652,35 +651,17 @@ func (k *KubeInfo) deployIstio() error {
}
}

// Create istio-system namespace
if err := util.CreateNamespace(k.Namespace, k.KubeConfig); err != nil {
log.Errorf("Unable to create namespace %s: %s", k.Namespace, err.Error())
return err
}
// Apply istio-init
yamlDir := filepath.Join(istioInstallDir, initInstallFile)
yamlDir := filepath.Join(istioInstallDir, istioYaml)
baseIstioYaml := filepath.Join(k.ReleaseDir, yamlDir)
testIstioYaml := filepath.Join(k.TmpDir, "yaml", istioYaml)
if err := k.generateIstio(baseIstioYaml, testIstioYaml); err != nil {
log.Errorf("Generating istio-init.yaml")
return err
}

if err := util.KubeApply(k.Namespace, testIstioYaml, k.KubeConfig); err != nil {
log.Errorf("istio-init.yaml %s deployment failed", testIstioYaml)
if err := k.generateIstio(baseIstioYaml, testIstioYaml); err != nil {
log.Errorf("Generating yaml %s failed", testIstioYaml)
return err
}

// TODO(sdake): need a better synchronization
time.Sleep(20 * time.Second)

// Apply main manifest
yamlDir = filepath.Join(istioInstallDir, istioYaml)
baseIstioYaml = filepath.Join(k.ReleaseDir, yamlDir)
testIstioYaml = filepath.Join(k.TmpDir, "yaml", istioYaml)

if err := k.generateIstio(baseIstioYaml, testIstioYaml); err != nil {
log.Errorf("Generating yaml %s failed", testIstioYaml)
if err := util.CreateNamespace(k.Namespace, k.KubeConfig); err != nil {
log.Errorf("Unable to create namespace %s: %s", k.Namespace, err.Error())
return err
}

Expand Down

0 comments on commit 1ebb78d

Please sign in to comment.