Commit Graph

1392 Commits

Author SHA1 Message Date
Basant Amarkhed
8fb895f3f1 Updating after merging with a conflicting commit 2020-11-14 01:09:46 +00:00
Kubernetes Prow Robot
94b17881fc
Merge pull request #96454 from Sh4d1/revert_92312
Revert "Merge pull request #92312 from Sh4d1/kep_1860"
2020-11-12 16:03:24 -08:00
Kubernetes Prow Robot
765d949bfc
Merge pull request #96440 from robscott/endpointslice-pre-ga
Adding NodeName to EndpointSlice API, deprecation updates
2020-11-12 16:03:13 -08:00
Rob Scott
84e4b30a3e
Updates related to PR feedback
- Remove feature gate consideration from EndpointSlice validation
- Deprecate topology field, note that it will be removed in future
release
- Update kube-proxy to check for NodeName if feature gate is enabled
- Add comments indicating the feature gates that can be used to enable
alpha API fields
- Add comments explaining use of deprecated address type in tests
2020-11-12 12:30:50 -08:00
Sravanth Bangari
6c68ca5a9e Choosing the right source VIP for local endpoints 2020-11-11 23:29:07 -08:00
Rob Scott
506861c0a0
Removing "IP" from supported EndpointSlice address types in kube-proxy 2020-11-11 16:50:45 -08:00
Patrik Cyvoct
d29665cc17
Revert "Merge pull request #92312 from Sh4d1/kep_1860"
This reverts commit ef16faf409, reversing
changes made to 2343b8a68b.
2020-11-11 10:26:53 +01:00
Kubernetes Prow Robot
ef16faf409
Merge pull request #92312 from Sh4d1/kep_1860
Make Kubernetes aware of the LoadBalancer behaviour
2020-11-08 23:34:24 -08:00
Kubernetes Prow Robot
2343b8a68b
Merge pull request #95872 from 22dm/kube-proxy-comment-fix
Fix the kube-proxy document
2020-11-08 19:23:37 -08:00
Patrik Cyvoct
20fc86df25
fix defaulting
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:59 +01:00
Patrik Cyvoct
0768b45e7b
add nil case in proxy
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:58 +01:00
Patrik Cyvoct
11b97e9ef8
fix tests
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:55 +01:00
Patrik Cyvoct
540901779c
fix reviews
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:53 +01:00
Patrik Cyvoct
af7494e896
Update generated
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:52 +01:00
Patrik Cyvoct
7bdf2af648
fix review
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:51 +01:00
Patrik Cyvoct
88330eafef
fix typo
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:50 +01:00
Patrik Cyvoct
0153b96ab8
fix review
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 10:00:27 +01:00
Patrik Cyvoct
d562b6924a
Add tests
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 09:59:59 +01:00
Patrik Cyvoct
47ae7cbf52
Add route type field to loadbalancer status ingress
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-07 09:59:58 +01:00
Kubernetes Prow Robot
48a2bca893
Merge pull request #96251 from ravens/nodeport_udp_conntrack_fix
Correctly fix clearing conntrack entry on endpoint changes (nodeport)
2020-11-06 14:25:37 -08:00
Kubernetes Prow Robot
f1a3e4dcce
Merge pull request #95036 from cmluciano/cml/validateproxycidrs
proxy: validate each CIDR config seperately and check for errors
2020-11-05 13:12:52 -08:00
Kubernetes Prow Robot
0451848d64
Merge pull request #95787 from qingsenLi/k8s201022-format
format incorrectAddresses in klog
2020-11-05 11:50:33 -08:00
Christopher M. Luciano
705ba7b4bc
proxy: validate each CIDR config seperately and check for errors
This commit revises validateProxyNodePortAddress and
validateExcludeCIDRS to report on the exact CIDR that is
invalid within the array of strings. Previously we would just return
the whole block of addresses and now we identify the exact address
within the block to eliminate confusion. I also removed the break from
validateProxyNodeAddress so that we can report on all addresses that
may not be valid.

The tests for each function have also been revised to check the errors
explicitly upon validating. This also will properly catch occasions
where we should be returning multiple errors if more than one CIDR is invalid.

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2020-11-05 13:56:39 -05:00
Yan Grunenberger
fdee7b2faa Correctly fix clearing conntrack entry on endpoint changes (nodeport)
A previous PR (#71573) intended to clear conntrack entry on endpoint
changes when using nodeport by introducing a dedicated function to
remove the stale conntrack entry on the node port and allow traffic to
resume. By doing so, it has introduced a nodeport specific bug where the
conntrack entries related to the ClusterIP does not get clean if
endpoint is changed (issue #96174). We fix by doing ClusterIP cleanup in
all cases.
2020-11-05 09:45:17 +01:00
elweb9858
1bcddb0747 Implementing ExternalTrafficPolicy: local in winkernel kube-proxy via DSR 2020-10-30 15:28:47 -07:00
Khaled Henidak (Kal)
6675eba3ef
dual stack services (#91824)
* api: structure change

* api: defaulting, conversion, and validation

* [FIX] validation: auto remove second ip/family when service changes to SingleStack

* [FIX] api: defaulting, conversion, and validation

* api-server: clusterIPs alloc, printers, storage and strategy

* [FIX] clusterIPs default on read

* alloc: auto remove second ip/family when service changes to SingleStack

* api-server: repair loop handling for clusterIPs

* api-server: force kubernetes default service into single stack

* api-server: tie dualstack feature flag with endpoint feature flag

* controller-manager: feature flag, endpoint, and endpointSlice controllers handling multi family service

* [FIX] controller-manager: feature flag, endpoint, and endpointSlicecontrollers handling multi family service

* kube-proxy: feature-flag, utils, proxier, and meta proxier

* [FIX] kubeproxy: call both proxier at the same time

* kubenet: remove forced pod IP sorting

* kubectl: modify describe to include ClusterIPs, IPFamilies, and IPFamilyPolicy

* e2e: fix tests that depends on IPFamily field AND add dual stack tests

* e2e: fix expected error message for ClusterIP immutability

* add integration tests for dualstack

the third phase of dual stack is a very complex change in the API,
basically it introduces Dual Stack services. Main changes are:

- It pluralizes the Service IPFamily field to IPFamilies,
and removes the singular field.
- It introduces a new field IPFamilyPolicyType that can take
3 values to express the "dual-stack(mad)ness" of the cluster:
SingleStack, PreferDualStack and RequireDualStack
- It pluralizes ClusterIP to ClusterIPs.

The goal is to add coverage to the services API operations,
taking into account the 6 different modes a cluster can have:

- single stack: IP4 or IPv6 (as of today)
- dual stack: IPv4 only, IPv6 only, IPv4 - IPv6, IPv6 - IPv4

* [FIX] add integration tests for dualstack

* generated data

* generated files

Co-authored-by: Antonio Ojea <aojea@redhat.com>
2020-10-26 13:15:59 -07:00
Kubernetes Prow Robot
bdde4fb8f5
Merge pull request #93040 from cmluciano/cml/ipvsschedmodules
ipvs: ensure selected scheduler kernel modules are loaded
2020-10-26 10:25:17 -07:00
liuhongyu
d1525ec808 Fix the kube-proxy comment so that the document can be generated correctly 2020-10-26 23:13:50 +08:00
Christopher M. Luciano
51ed242194
ipvs: check for existence of scheduler module and fail if not found
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2020-10-23 17:17:44 -04:00
Kubernetes Prow Robot
766ae2b81b
Merge pull request #95252 from tssurya/shrink-input-chain
Kube-proxy: Perf-fix: Shrink INPUT chain
2020-10-22 22:16:02 -07:00
qingsenLi
9ad39c9eda format incorrectAddresses in klog 2020-10-22 17:26:29 +08:00
Surya Seetharaman
477b14b3c4 Kube-proxy: Perf-fix: Shrink INPUT chain
In #56164, we had split the reject rules for non-ep existing services
into KUBE-EXTERNAL-SERVICES chain in order to avoid calling KUBE-SERVICES
from INPUT. However in #74394 KUBE-SERVICES was re-added into INPUT.

As noted in #56164, kernel is sensitive to the size of INPUT chain. This
patch refrains from calling the KUBE-SERVICES chain from INPUT and FORWARD,
instead adds the lb reject rule to the KUBE-EXTERNAL-SERVICES chain which will be
called from INPUT and FORWARD.
2020-10-19 11:26:04 +02:00
Antonio Ojea
880baa9f6f kube-proxy: log stale services operations 2020-10-19 09:35:34 +02:00
Lion-Wei
1f7ea16560 kube-proxy ensure KUBE-MARK-DROP exist but not modify their rules 2020-10-16 14:52:07 +08:00
wojtekt
6e4aa0f27d Fix reporting network_programming_latency metrics in kube-proxy 2020-10-07 20:57:14 +02:00
John Howard
b898266cb1 Fix documentation on EndpointSliceCache map
This is not storing by slice name, it is IP. This can be seen from the
code and tests.
2020-10-06 10:24:09 -07:00
Christopher M. Luciano
601c5150ca
proxy: Add tests for kube-proxy config defaulting
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2020-10-02 12:39:46 -04:00
Matthew Cary
299a296c7a update-bazel
Change-Id: Iebc99ee13587f0cd4c43ab85c7295d458d679d1e
2020-09-18 00:44:39 +00:00
Matthew Cary
f2e23afcf1 Adds filtering of hosts to DialContexts.
The provided DialContext wraps existing clients' DialContext in an attempt to
preserve any existing timeout configuration. In some cases, we may replace
infinite timeouts with golang defaults.

- scaleio: tcp connect/keepalive values changed from 0/15 to 30/30
- storageos: no change
2020-09-18 00:07:32 +00:00
Matthew Cary
74dbf274d9 update storageos vendor for FilteredDial change 2020-09-18 00:07:32 +00:00
Amim Knabben
a18e5de51a LockToDefault the ExternalPolicyForExternalIP feature gate 2020-09-16 13:16:33 -04:00
tangwz
a143803066 remove feature gate SupportIPVSProxyMode. 2020-09-10 09:03:00 +08:00
elweb9858
b29379687f Updating winkernel kube-proxy OWNERS file 2020-09-03 14:55:09 -07:00
Kubernetes Prow Robot
b2cba08217
Merge pull request #93979 from dcbw/userspace-proxy-test-waitgroups
proxy/userspace: use waitgroups instead of sketchy atomic ops in testcases
2020-09-02 17:05:40 -07:00
Dan Williams
0cb5e55409 proxy/userspace: clean up and consolidate testcase setup 2020-09-02 16:20:13 -05:00
Dan Williams
1372bd94fe proxy/userspace: use waitgroups instead of sketchy atomic ops in testcases
Instead of relying on atomic ops to increment/decrement at the right time
just use waitgroups to provide hard synchronization points.
2020-09-02 16:20:13 -05:00
Daniel Smith
a86afc12df update scripts 2020-09-02 10:49:40 -07:00
Daniel Smith
75f835aa08 move port definitions to a common location 2020-09-02 10:48:25 -07:00
Kubernetes Prow Robot
163504e9ae
Merge pull request #94107 from robscott/kube-proxy-source-ranges-fix
Updating kube-proxy to trim space from loadBalancerSourceRanges
2020-09-01 18:43:51 -07:00
Kubernetes Prow Robot
6e7086d7ca
Merge pull request #93638 from sbangari/refcountfix3
Avoid dereferencing same endpoint twice on the deletion or update of a service
2020-09-01 16:35:06 -07:00