fix: i give up
This commit is contained in:
parent
4606ea39cf
commit
53e1318d2f
1 changed files with 1 additions and 1 deletions
|
@ -59,13 +59,13 @@ func NewParser(r resolver.Resolver) parser.IngressAnnotation {
|
||||||
func (a authReqGlobal) Parse(ing *networking.Ingress) (interface{}, error) {
|
func (a authReqGlobal) Parse(ing *networking.Ingress) (interface{}, error) {
|
||||||
enableGlobalAuth, err := parser.GetBoolAnnotation(enableGlobalAuthAnnotation, ing, a.annotationConfig.Annotations)
|
enableGlobalAuth, err := parser.GetBoolAnnotation(enableGlobalAuthAnnotation, ing, a.annotationConfig.Annotations)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// This is definitely not the correct way but I dont understand how to do it correctly
|
||||||
globalAuthDefaultEnable, err := a.r.GetConfigMap("ingress-nginx/ingress-nginx-controller")
|
globalAuthDefaultEnable, err := a.r.GetConfigMap("ingress-nginx/ingress-nginx-controller")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
enableGlobalAuth, err = strconv.ParseBool(globalAuthDefaultEnable.Data["global-auth-default-enable"])
|
enableGlobalAuth, err = strconv.ParseBool(globalAuthDefaultEnable.Data["global-auth-default-enable"])
|
||||||
// enableGlobalAuth = a.r.GetDefaultBackend().GlobalAuthDefaultEnable
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return enableGlobalAuth, nil
|
return enableGlobalAuth, nil
|
||||||
|
|
Loading…
Reference in a new issue