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

Revert "Fix e2e-simple test flake" #11331

Merged
merged 1 commit into from Jan 28, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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