Fix default-backend annotation
This commit is contained in:
parent
15ffb51394
commit
2023e56115
3 changed files with 62 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ import (
|
|||
"github.com/imdario/mergo"
|
||||
"k8s.io/ingress-nginx/internal/ingress/annotations/sslcipher"
|
||||
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
|
|
@ -72,7 +73,7 @@ type Ingress struct {
|
|||
ConfigurationSnippet string
|
||||
Connection connection.Config
|
||||
CorsConfig cors.Config
|
||||
DefaultBackend string
|
||||
DefaultBackend *apiv1.Service
|
||||
Denied error
|
||||
ExternalAuth authreq.Config
|
||||
HealthCheck healthcheck.Config
|
||||
|
|
|
|||
|
|
@ -451,6 +451,7 @@ func (n *NGINXController) getBackendServers(ingresses []*extensions.Ingress) ([]
|
|||
loc.GRPC = anns.GRPC
|
||||
loc.LuaRestyWAF = anns.LuaRestyWAF
|
||||
loc.InfluxDB = anns.InfluxDB
|
||||
loc.DefaultBackend = anns.DefaultBackend
|
||||
|
||||
if loc.Redirect.FromToWWW {
|
||||
server.RedirectFromToWWW = true
|
||||
|
|
@ -488,6 +489,7 @@ func (n *NGINXController) getBackendServers(ingresses []*extensions.Ingress) ([]
|
|||
GRPC: anns.GRPC,
|
||||
LuaRestyWAF: anns.LuaRestyWAF,
|
||||
InfluxDB: anns.InfluxDB,
|
||||
DefaultBackend: anns.DefaultBackend,
|
||||
}
|
||||
|
||||
if loc.Redirect.FromToWWW {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue