support watch namespaces matched namespace selector (#7472)
skip caching namespaces at cluster scope if only watching single namespace add --watch-namespace-selector in user guide add e2e test
This commit is contained in:
parent
67e13bf692
commit
7203a0b8bd
26 changed files with 461 additions and 19 deletions
|
|
@ -126,7 +126,7 @@ func (f *Framework) AfterEach() {
|
|||
defer func(kubeClient kubernetes.Interface, ns string) {
|
||||
go func() {
|
||||
defer ginkgo.GinkgoRecover()
|
||||
err := deleteKubeNamespace(kubeClient, ns)
|
||||
err := DeleteKubeNamespace(kubeClient, ns)
|
||||
assert.Nil(ginkgo.GinkgoT(), err, "deleting namespace %v", f.Namespace)
|
||||
}()
|
||||
}(f.KubeClientSet, f.Namespace)
|
||||
|
|
@ -588,6 +588,12 @@ func NewSingleIngress(name, path, host, ns, service string, port int, annotation
|
|||
return newSingleIngressWithRules(name, path, host, ns, service, port, annotations, nil)
|
||||
}
|
||||
|
||||
func NewSingleIngressWithIngressClass(name, path, host, ns, service, ingressClass string, port int, annotations map[string]string) *networking.Ingress {
|
||||
ing := newSingleIngressWithRules(name, path, host, ns, service, port, annotations, nil)
|
||||
ing.Spec.IngressClassName = &ingressClass
|
||||
return ing
|
||||
}
|
||||
|
||||
// NewSingleIngressWithMultiplePaths creates a simple ingress rule with multiple paths
|
||||
func NewSingleIngressWithMultiplePaths(name string, paths []string, host, ns, service string, port int, annotations map[string]string) *networking.Ingress {
|
||||
pathtype := networking.PathTypePrefix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue