fix: i give up

This commit is contained in:
Tore Stendal Lønøy 2023-12-08 22:15:20 +01:00
parent 4606ea39cf
commit 53e1318d2f
No known key found for this signature in database

View file

@ -59,13 +59,13 @@ func NewParser(r resolver.Resolver) parser.IngressAnnotation {
func (a authReqGlobal) Parse(ing *networking.Ingress) (interface{}, error) {
enableGlobalAuth, err := parser.GetBoolAnnotation(enableGlobalAuthAnnotation, ing, a.annotationConfig.Annotations)
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")
if err != nil {
return nil, err
}
enableGlobalAuth, err = strconv.ParseBool(globalAuthDefaultEnable.Data["global-auth-default-enable"])
// enableGlobalAuth = a.r.GetDefaultBackend().GlobalAuthDefaultEnable
}
return enableGlobalAuth, nil