Merge pull request #3198 from aledbf/only-dynamic
Only support dynamic configuration
This commit is contained in:
commit
3edf11b85f
12 changed files with 134 additions and 328 deletions
|
|
@ -16,22 +16,13 @@ limitations under the License.
|
|||
|
||||
package annotations
|
||||
|
||||
/*
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/parnurzeal/gorequest"
|
||||
|
||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
"k8s.io/ingress-nginx/test/e2e/framework"
|
||||
)
|
||||
|
||||
|
||||
// TODO(elvinefendi) merge this with Affinity tests in test/e2e/lua/dynamic_configuration.go
|
||||
var _ = framework.IngressNginxDescribe("Annotations - Affinity", func() {
|
||||
f := framework.NewDefaultFramework("affinity")
|
||||
|
|
@ -196,3 +187,4 @@ var _ = framework.IngressNginxDescribe("Annotations - Affinity", func() {
|
|||
Expect(resp.Header.Get("Set-Cookie")).Should(ContainSubstring("Path=/;"))
|
||||
})
|
||||
})
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -438,19 +438,3 @@ func newSingleIngress(name, path, host, ns, service string, port int, annotation
|
|||
|
||||
return ing
|
||||
}
|
||||
|
||||
// DisableDynamicConfiguration disables dynamic configuration
|
||||
func (f *Framework) DisableDynamicConfiguration() error {
|
||||
return UpdateDeployment(f.KubeClientSet, f.IngressController.Namespace, "nginx-ingress-controller", 1,
|
||||
func(deployment *appsv1beta1.Deployment) error {
|
||||
args := deployment.Spec.Template.Spec.Containers[0].Args
|
||||
args = append(args, "--enable-dynamic-configuration=false")
|
||||
deployment.Spec.Template.Spec.Containers[0].Args = args
|
||||
_, err := f.KubeClientSet.AppsV1beta1().Deployments(f.IngressController.Namespace).Update(deployment)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
By("skipping Nginx reload")
|
||||
Expect(restOfLogs).ToNot(ContainSubstring(logRequireBackendReload))
|
||||
Expect(restOfLogs).ToNot(ContainSubstring(logBackendReloadSuccess))
|
||||
Expect(restOfLogs).To(ContainSubstring(logSkipBackendReload))
|
||||
})
|
||||
|
||||
Context("given an ingress with TLS correctly configured", func() {
|
||||
|
|
@ -181,7 +180,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
By("skipping Nginx reload")
|
||||
Expect(restOfLogs).ToNot(ContainSubstring(logRequireBackendReload))
|
||||
Expect(restOfLogs).ToNot(ContainSubstring(logBackendReloadSuccess))
|
||||
Expect(restOfLogs).To(ContainSubstring(logSkipBackendReload))
|
||||
})
|
||||
|
||||
It("falls back to using default certificate when secret gets deleted without reloading", func() {
|
||||
|
|
@ -217,7 +215,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
By("skipping Nginx reload")
|
||||
Expect(restOfLogs).ToNot(ContainSubstring(logRequireBackendReload))
|
||||
Expect(restOfLogs).ToNot(ContainSubstring(logBackendReloadSuccess))
|
||||
Expect(restOfLogs).To(ContainSubstring(logSkipBackendReload))
|
||||
})
|
||||
|
||||
It("picks up a non-certificate only change", func() {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ const (
|
|||
logDynamicConfigFailure = "Dynamic reconfiguration failed"
|
||||
logRequireBackendReload = "Configuration changes detected, backend reload required"
|
||||
logBackendReloadSuccess = "Backend successfully reloaded"
|
||||
logSkipBackendReload = "Changes handled by the dynamic configuration, skipping backend reload"
|
||||
logInitialConfigSync = "Initial synchronization of the NGINX configuration"
|
||||
waitForLuaSync = 5 * time.Second
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue