Lorenz Brun | b682ba5 | 2020-07-08 14:51:36 +0200 | [diff] [blame^] | 1 | Copyright 2020 The Monogon Project Authors. |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License. |
| 14 | |
| 15 | |
| 16 | Fix nfproxy compatibility with our version of Kubernetes/utilproxy |
| 17 | --- com_github_sbezverk_nfproxy.orig/pkg/proxy/proxy_service.go 2020-07-16 14:24:06.901176302 +0200 |
| 18 | +++ com_github_sbezverk_nfproxy/pkg/proxy/proxy_service.go 2020-07-16 14:08:34.118927035 +0200 |
| 19 | @@ -22,7 +22,6 @@ |
| 20 | utilnftables "github.com/google/nftables" |
| 21 | "github.com/sbezverk/nfproxy/pkg/nftables" |
| 22 | v1 "k8s.io/api/core/v1" |
| 23 | - "k8s.io/apimachinery/pkg/types" |
| 24 | "k8s.io/klog" |
| 25 | utilproxy "k8s.io/kubernetes/pkg/proxy/util" |
| 26 | utilnet "k8s.io/utils/net" |
| 27 | @@ -44,8 +43,7 @@ |
| 28 | stickySeconds := int(*svc.Spec.SessionAffinityConfig.ClientIP.TimeoutSeconds) |
| 29 | klog.V(5).Infof("Service %s/%s has SessionAffinity set for %d seconds", svc.Namespace, svc.Name, stickySeconds) |
| 30 | } |
| 31 | - svcName := types.NamespacedName{Namespace: svc.Namespace, Name: svc.Name} |
| 32 | - if utilproxy.ShouldSkipService(svcName, svc) { |
| 33 | + if utilproxy.ShouldSkipService(svc) { |
| 34 | return |
| 35 | } |
| 36 | for i := range svc.Spec.Ports { |