Commit Graph

44810 Commits

Author SHA1 Message Date
Dan Winship
8906ab390e proxy/iptables: reorganize cluster/local chain creation
Part of reorganizing the syncProxyRules loop to do:
  1. figure out what chains are needed, mark them in activeNATChains
  2. write servicePort jump rules to KUBE-SERVICES/KUBE-NODEPORTS
  3. write servicePort-specific chains (SVC, SVL, EXT, FW, SEP)

This fixes the handling of the SVC and SVL chains. We were already
filling them in at the end of the loop; this fixes it to create them
at the bottom of the loop as well.
2022-07-09 07:05:05 -04:00
Dan Winship
da14a12fe5 proxy/iptables: move endpoint chain rule creation to the end
Part of reorganizing the syncProxyRules loop to do:
  1. figure out what chains are needed, mark them in activeNATChains
  2. write servicePort jump rules to KUBE-SERVICES/KUBE-NODEPORTS
  3. write servicePort-specific chains (SVC, SVL, EXT, FW, SEP)

This fixes the handling of the endpoint chains. Previously they were
handled entirely at the top of the loop. Now we record which ones are
in use at the top but don't create them and fill them in until the
bottom.
2022-07-09 06:51:47 -04:00
Dan Winship
8a5801996b proxy/iptables: belatedly simplify local traffic policy metrics
We figure out early on whether we're going to end up outputting no
endpoints, so update the metrics then.

(Also remove a redundant feature gate check; svcInfo already checks
the ServiceInternalTrafficPolicy feature gate itself and so
svcInfo.InternalPolicyLocal() will always return false if the gate is
not enabled.)
2022-07-09 06:50:16 -04:00
Kubernetes Prow Robot
00ea892a0f
Merge pull request #110564 from j4m3s-s/add-ports-doc-fix
Fix description of Ports in PodSpec
2022-07-08 21:41:46 -07:00
Kubernetes Prow Robot
1d954908ba
Merge pull request #109394 from pohly/storage-capacity-storage-version
Kubernetes 1.25: CSIStorageCapacity: use v1 as storage version
2022-07-08 19:35:51 -07:00
Kubernetes Prow Robot
1d7829a964
Merge pull request #110975 from 0xff-dev/cleanup-unused-func
clean up unused function 'GetServiceHealthCheckPathPort'
2022-07-08 18:03:57 -07:00
Aldo Culquicondor
b492f49c9f Do not skip job requeue in conflict error
Change-Id: Ie97977887a1cc3de58922d73dce92ae1965965bf
2022-07-08 16:14:32 +00:00
Kubernetes Prow Robot
3251d4cff6
Merge pull request #111010 from thockin/remove-refs-to-EndpointSliceNodeName
Remove obsolete refs to gate EndpointSliceNodeName
2022-07-08 05:41:47 -07:00
Patrick Ohly
2e8fa3ee6b CSIStorageCapacity: use v1 as storage version
This can be done because downgrades are only supported down to 1.24 and that
release supports v1.
2022-07-08 10:06:06 +02:00
Kubernetes Prow Robot
80b2848725
Merge pull request #110860 from claudiubelu/utils-cleanup
cleanup: Removes duplicate utils code
2022-07-07 20:36:12 -07:00
Kubernetes Prow Robot
0dc32b10fe
Merge pull request #110774 from kinvolk/rata/kubelet-short-tests
pkg/kubelet: skip long test on short mode
2022-07-07 20:36:05 -07:00
Kubernetes Prow Robot
c05d185901
Merge pull request #110683 from zhoumingcheng/master-v2
add unit test coverage for pkg/kubelet/util/util_unix_test.go
2022-07-07 20:35:57 -07:00
Kubernetes Prow Robot
9509211fe7
Merge pull request #110904 from 249043822/storageversion
Computation of the StorageVersionHash use overridden storage versions in unit test
2022-07-07 19:11:58 -07:00
Kubernetes Prow Robot
2b657a0f3b
Merge pull request #110805 from saschagrunert/seccomp-default-beta
Graduate SeccompDefault feature to beta
2022-07-07 17:54:11 -07:00
ZhangKe10140699
f218f7b262 Computation of the StorageVersionHash use overridden storage versions in unit test 2022-07-08 06:32:27 +08:00
Tim Hockin
c2ee067221 Remove obsolete refs to gate EndpointSliceNodeName 2022-07-07 13:19:59 -07:00
Kubernetes Prow Robot
6adee9d4fb
Merge pull request #110947 from SataQiu/scheduler-20220704
scheduler: do not update sched.nextStartNodeIndex when evaluate nominated node
2022-07-07 07:57:45 -07:00
James Landrein
9da646de4e Fix description of Ports in PodSpec 2022-07-07 10:43:25 +02:00
SataQiu
d3092cd296 scheduler: do not update sched.nextStartNodeIndex when evaluate nominated node 2022-07-07 10:02:28 +08:00
Kubernetes Prow Robot
e8eb7a5e19
Merge pull request #110990 from thockin/svc-typenames-IPFamilyPolicyType
Rename IPFamilyPolicyType => IPFamilyPolicy
2022-07-06 18:39:44 -07:00
Kubernetes Prow Robot
b3be343bc8
Merge pull request #110811 from Abirdcfly/clock
Update golangci-lint to 1.46.2 and fix errors
2022-07-06 16:03:32 -07:00
Tim Hockin
55232e2ef7 Rename IPFamilyPolicyType => IPFamilyPolicy 2022-07-06 15:42:26 -07:00
Kubernetes Prow Robot
666ee0886f
Merge pull request #110703 from aojea/beta_enable_ipranges
enable ServiceIPStaticSubrange beta by default
2022-07-06 14:55:44 -07:00
Kubernetes Prow Robot
4593b2e71a
Merge pull request #110290 from danwinship/kep-3178-local-policy-drop
Don't use KUBE-MARK-DROP for "no local endpoints"
2022-07-06 14:55:33 -07:00
Kubernetes Prow Robot
65361245ed
Merge pull request #110824 from Abirdcfly/simple
cleanup:use copy other than for loop
2022-07-06 12:03:33 -07:00
Kubernetes Prow Robot
6b6558a463
Merge pull request #110948 from alculquicondor/re-enable-job-tracking
Re-enable JobTrackingWithFinalizers
2022-07-06 09:45:33 -07:00
Kubernetes Prow Robot
1ea6eb2d1d
Merge pull request #110954 from kerthcet/fix/deadline-should-be-nil
Fix pod's deadline to nil when cache ttl is set to zero
2022-07-06 07:28:51 -07:00
0xff-dev
729bd22e24 clean up unused function 'GetServiceHealthCheckPathPort' 2022-07-06 16:15:14 +08:00
Kubernetes Prow Robot
bd2776e0c9
Merge pull request #110868 from rikatz/endport-to-ga
Promote endPort in Network Policy to GA
2022-07-05 19:48:49 -07:00
Kubernetes Prow Robot
efa26e5daf
Merge pull request #110876 from zhoumingcheng/master-unit-v6
add unit test coverage for pkg/util/slice
2022-07-05 15:59:20 -07:00
Kubernetes Prow Robot
850a5ffda6
Merge pull request #110901 from ping035627/k8s-220701
Add failure handling of the desiredStateOfWorldPopulator start
2022-07-05 11:27:31 -07:00
Kubernetes Prow Robot
a17215fe84
Merge pull request #110768 from kerthcet/fix/filter-out-unsatisfied-nodes-in-AddPod
Filter out unsatisfied nodes when calling  AddPod in PodTopologySpread
2022-07-05 10:15:19 -07:00
kerthcet
72e8fc1d87 Fix: pod's deadline shoud be nil when cache ttl is 0
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-07-05 23:29:31 +08:00
SataQiu
e74af4bdfa scheduler: remove unused Equal function for HTTPExtender 2022-07-05 13:17:05 +08:00
Aldo Culquicondor
a26920b190 Re-enable JobTrackingWithFinalizers
Change-Id: If9bd960f3da07bbdc4bc59008976e7f2cfd011e9
2022-07-04 15:24:19 -04:00
Kapil Jain
4706dda5da Added code for disable scheduler cache expiry 2022-07-04 23:46:59 +05:30
Kubernetes Prow Robot
89aaf7c02d
Merge pull request #110862 from Abirdcfly/deleteutil
cleanup: delete same utils.go in pkg/apis/storage
2022-07-01 18:23:22 -07:00
Kubernetes Prow Robot
20a7253a0e
Merge pull request #109853 from ping035627/k8s-220506
Cleanup FindPluginBySpec() in VolumePluginMgr
2022-07-01 07:29:22 -07:00
PingWang
c6b4725e55 Add failure handling of the desiredStateOfWorldPopulator start
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2022-07-01 13:56:33 +08:00
kerthcet
5a358f478b Fix: filter out unsatisfied nodes when calling AddPod in PodTopologySpread
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-07-01 11:46:26 +08:00
Yuan Chen
ef0456eb40 Refactor scheduler code 2022-06-30 11:27:25 -07:00
zhoumingcheng
509c487fe8 add unit test coverage for pkg/util/slice
Signed-off-by: zhoumingcheng <zhoumingcheng@beyondcent.com>
2022-06-30 15:21:37 +08:00
Ricardo Katz
5351f6c90a Generated files for endPort promotion 2022-06-30 00:33:43 +00:00
Ricardo Katz
3e7bdbbf30 Promote endPort to GA 2022-06-30 00:33:43 +00:00
Dan Winship
95705350d5 proxy/iptables: Don't use KUBE-MARK-DROP for "no local endpoints"
Rather than marking packets to be dropped in the "nat" table and then
dropping them from the "filter" table later, just use rules in
"filter" to drop the packets we don't like directly.
2022-06-29 16:37:24 -04:00
Dan Winship
283218bd4c proxy/iptables: update TestTracePackets
Re-sync the rules from TestOverallIPTablesRulesWithMultipleServices to
make sure we're testing all the right kinds of rules. Remove a
duplicate copy of the KUBE-MARK-MASQ and KUBE-POSTROUTING rules.

Update the "REJECT" test to use the new svc6 from
TestOverallIPTablesRulesWithMultipleServices. (Previously it had used
a modified version of TOIPTRWMS's svc3.)
2022-06-29 16:33:13 -04:00
Dan Winship
59b7f969e8 proxy/iptables: fix up TestOverallIPTablesRulesWithMultipleServices
svc2b was using the same ClusterIP as svc3; change it and rename the
service to svc5 to make everything clearer.

Move the test of LoadBalancerSourceRanges from svc2 to svc5, so that
svc2 tests the rules for dropping packets due to
externalTrafficPolicy, and svc5 tests the rules for dropping packets
due to LoadBalancerSourceRanges, rather than having them both mixed
together in svc2.

Add svc6 with no endpoints.
2022-06-29 16:33:13 -04:00
Kubernetes Prow Robot
f045fb688f
Merge pull request #110334 from danwinship/iptables-fewer-saves
only clean up iptables chains periodically in large clusters
2022-06-29 09:48:06 -07:00
Dan Winship
7d3ba837f5 proxy/iptables: only clean up chains periodically in large clusters
"iptables-save" takes several seconds to run on machines with lots of
iptables rules, and we only use its result to figure out which chains
are no longer referenced by any rules. While it makes things less
confusing if we delete unused chains immediately, it's not actually
_necessary_ since they never get called during packet processing. So
in large clusters, make it so we only clean up chains periodically
rather than on every sync.
2022-06-29 11:14:38 -04:00
Dan Winship
1cd461bd24 proxy/iptables: abstract the "endpointChainsNumberThreshold" a bit
Turn this into a generic "large cluster mode" that determines whether
we optimize for performance or debuggability.
2022-06-29 11:14:38 -04:00