Add e2e test for non ingressclass enabled ingress (#7785)
This commit is contained in:
parent
a6ef52da9d
commit
97e39e79e2
4 changed files with 93 additions and 4 deletions
|
|
@ -110,15 +110,12 @@ func main() {
|
|||
_, err = kubeClient.NetworkingV1().IngressClasses().List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
if !errors.IsNotFound(err) {
|
||||
if errors.IsUnauthorized(err) {
|
||||
klog.Fatalf("Error searching IngressClass: Please verify your RBAC and allow Ingress Controller to list and get Ingress Classes: %v", err)
|
||||
} else if errors.IsForbidden(err) {
|
||||
if errors.IsForbidden(err) {
|
||||
klog.Warningf("No permissions to list and get Ingress Classes: %v, IngressClass feature will be disabled", err)
|
||||
conf.IngressClassConfiguration.IgnoreIngressClass = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
conf.Client = kubeClient
|
||||
|
||||
err = k8s.GetIngressPod(kubeClient)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue