Remove deprecated libraries, update other libs, add ci v1.23 (#8118)

This commit is contained in:
Ricardo Katz 2022-01-09 21:29:12 -03:00 committed by GitHub
parent c917ffacd2
commit 38c73233f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 97 additions and 311 deletions

View file

@ -17,11 +17,10 @@ limitations under the License.
package ipwhitelist
import (
"fmt"
"sort"
"strings"
"github.com/pkg/errors"
networking "k8s.io/api/networking/v1"
"k8s.io/ingress-nginx/internal/net"
@ -75,7 +74,7 @@ func (a ipwhitelist) Parse(ing *networking.Ingress) (interface{}, error) {
ipnets, ips, err := net.ParseIPNets(values...)
if err != nil && len(ips) == 0 {
return &SourceRange{CIDR: defBackend.WhitelistSourceRange}, ing_errors.LocationDenied{
Reason: errors.Wrap(err, "the annotation does not contain a valid IP address or network"),
Reason: fmt.Errorf("the annotation does not contain a valid IP address or network: %w", err),
}
}