Migration e2e installation to helm (#5086)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-02-16 11:58:37 -03:00 committed by GitHub
parent 4b5c39e97b
commit 37c24b0df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 321 additions and 725 deletions

View file

@ -45,20 +45,23 @@ var _ = framework.IngressNginxDescribe("Status Update [Status]", func() {
err = framework.UpdateDeployment(f.KubeClientSet, f.Namespace, "nginx-ingress-controller", 1,
func(deployment *appsv1.Deployment) error {
args := deployment.Spec.Template.Spec.Containers[0].Args
args := []string{}
// flags --publish-service and --publish-status-address are mutually exclusive
for _, v := range deployment.Spec.Template.Spec.Containers[0].Args {
if strings.Contains(v, "--publish-service") {
continue
}
if strings.Contains(v, "--update-status") {
continue
}
args = append(args, v)
}
args = append(args, fmt.Sprintf("--apiserver-host=http://%s:%d", address.String(), port))
args = append(args, "--publish-status-address=1.1.0.0")
// flags --publish-service and --publish-status-address are mutually exclusive
var index int
for k, v := range args {
if strings.Contains(v, "--publish-service") {
index = k
break
}
}
if index > -1 {
args[index] = ""
}
deployment.Spec.Template.Spec.Containers[0].Args = args
_, err := f.KubeClientSet.AppsV1().Deployments(f.Namespace).Update(deployment)