Commit Graph

107549 Commits

Author SHA1 Message Date
Tim Hockin
7726b5f9fc kube-proxy: inline args in most cases 2022-03-30 09:55:34 -07:00
Tim Hockin
c4271c9a6f Rename tests to avoid underscores 2022-03-30 09:55:34 -07:00
Tim Hockin
9ed6b73495 kube-proxy: comment endpoint in SEP jumps 2022-03-30 09:55:34 -07:00
Tim Hockin
0e47dc3a65 kube-proxy: remove old TODO 2022-03-30 09:55:33 -07:00
Tim Hockin
30c1523708 kube-proxy: Renames for readability 2022-03-30 09:55:32 -07:00
Tim Hockin
f1553f58c5 kube-proxy: Remove now unneeded rule
Now that NodePorts jump to EXT, we don't need a specific rule for
loopback source detection.
2022-03-30 09:54:40 -07:00
Tim Hockin
db932a0ab1 kube-proxy: Rework LB VIP capture logic
* Comments
* If there are multiple VIPs, don't declare the fwChain multiple times.
* Don't emit the last -j DROP if there's no source ranges
2022-03-30 09:54:40 -07:00
Tim Hockin
07b2585927 kube-proxy: Rename XLB -> EXT
This changes the "XLB" chain into the "EXT" chain - the "external
destinations" chain.
2022-03-30 09:54:38 -07:00
Tim Hockin
482f3bc4bf kube-proxy: all external jumps to XLB chain
This makes the "destination" policy model clearer.  All external
destination captures now jump to the "XLB chain, which is the main place
that masquerade is done (removing it from most other places).

This is simpler to trace - XLB *always* exists (as long as you have an
external exposure) and never gets bypassed.
2022-03-30 09:52:18 -07:00
Tim Hockin
dd0fc6b354 kube-proxy: print line number for test failures 2022-03-29 18:48:27 -07:00
Tim Hockin
ef959f00af kube-proxy: clean up tests
No functional changes, much whitespace.

Make assertIPTablesRulesEqual() *not* sort the `expected` value - make
the test cases all be pre-sorted.  This will make followup commits
cleaner.

Make the test output cleaner when this fails.

Use dedent everywhere for easier reading.
2022-03-29 18:48:27 -07:00
Tim Hockin
99330d407a kube-proxy: internal renames 2022-03-29 18:48:27 -07:00
Kubernetes Prow Robot
699aeb735f
Merge pull request #109092 from kolyshkin/mock-1.6.0
vendor: bump golang/mock to 1.6.0
2022-03-29 17:36:16 -07:00
Brian Pursley
3fbd5e5e0e
Add printer benchmarks (#109085)
* Code cleanup

- Remove redundant parentheses.
- Remove unnecessary type conversion of string to string.
- Fix wrong function name in comment.

* Add printer benchmarks
2022-03-29 17:36:07 -07:00
Kubernetes Prow Robot
5b8dbfbbcf
Merge pull request #108995 from pohly/log-contextual
contextual logging
2022-03-29 17:35:59 -07:00
Kubernetes Prow Robot
1ff499ac13
Merge pull request #108994 from KnVerey/kustomize-453
Update kubectl kustomize to v4.5.4
2022-03-29 17:35:51 -07:00
Kubernetes Prow Robot
4b3ddcf793
Merge pull request #108909 from saschagrunert/wip-crio
Inject SSH public key into CRI-O serial prow jobs
2022-03-29 17:35:42 -07:00
Kubernetes Prow Robot
b0254c8a0b
Merge pull request #108758 from fengzixu/improvement-volume-health
re-push "add volume kubelet_volume_stats_health_abnormal to kubelet #105585"
2022-03-29 17:35:34 -07:00
Kubernetes Prow Robot
9fe98d8bab
Merge pull request #108736 from NetApp/any-volume-data-source-beta
Update AnyVolumeDataSource feature gate to beta
2022-03-29 17:35:25 -07:00
Kubernetes Prow Robot
92c30bf6bd
Merge pull request #108724 from sanposhiho/cycle-state
use `sync.Map` in CycleState for better performance
2022-03-29 17:35:13 -07:00
Kubernetes Prow Robot
1266744002
Merge pull request #108693 from gnufied/enable-rwx-call-all-nodes
Enable node-expansion to be called on all nodes for RWX volumes
2022-03-29 17:35:05 -07:00
Kubernetes Prow Robot
57a739bdf2
Merge pull request #108691 from andrewsykim/proxy-terminating-endpoints
Apply ProxyTerminatingEndpoints to all traffic policies
2022-03-29 17:34:57 -07:00
Kubernetes Prow Robot
1cddd38956
Merge pull request #108256 from bertinatto/kubelet-attach-detach
Update EnableControllerAttachDetach documentation
2022-03-29 17:34:49 -07:00
Kubernetes Prow Robot
faf7ad6120
Merge pull request #108146 from marosset/windows-kubelet-elevated-check
Fixing logic for kubelet permissions check on windows
2022-03-29 17:34:40 -07:00
Kubernetes Prow Robot
33f56203e3
Merge pull request #108033 from tkashem/pre-shutdown-hook
apiserver: stop http server after pre shutdown hooks
2022-03-29 17:34:32 -07:00
Kubernetes Prow Robot
0f2300575c
Merge pull request #108032 from deejross/kep3140-cronjob-timezone
KEP 3140: TimeZone support for CronJob
2022-03-29 17:34:20 -07:00
Kubernetes Prow Robot
d429c9820e
Merge pull request #106824 from lauchokyip/removeExposeGenerator
Remove generator dependency of expose.go
2022-03-29 17:34:07 -07:00
Kubernetes Prow Robot
dd1e43332a
Merge pull request #107476 from alculquicondor/job-ready
Graduate JobReadyPods to beta
2022-03-29 16:08:06 -07:00
Kubernetes Prow Robot
7c46f40bdf
Merge pull request #109121 from serathius/data-corruption-note
Add note about etcd v3.5.0 data corruption
2022-03-29 13:34:07 -07:00
Fabio Bertinatto
8150cf8d96 Update EnableControllerAttachDetach documentation
The kubelet does not support attach/detach operations on CSI volumes. As
a result, CSI volumes rely on the Attach/Detach controller enabled.
2022-03-29 16:20:06 -03:00
Marek Siarkowicz
73b0af70f9 Add note about etcd v3.5.0 data corruption 2022-03-29 20:58:16 +02:00
Shiming Zhang
61b3c028ba
Field status.hostIPs added for Pod (#101566)
* Add FeatureGate PodHostIPs

* Add HostIPs field and update PodIPs field

* Types conversion

* Add dropDisabledStatusFields

* Add HostIPs for kubelet

* Add fuzzer for PodStatus

* Add status.hostIPs in ConvertDownwardAPIFieldLabel

* Add status.hostIPs in validEnvDownwardAPIFieldPathExpressions

* Downward API support for status.hostIPs

* Add DownwardAPI validation for status.hostIPs

* Add e2e to check that hostIPs works

* Add e2e to check that Downward API works

* Regenerate
2022-03-29 11:46:07 -07:00
Ben Swartzlander
08948ca779 Update AnyVolumeDataSource feature gate to beta
Default to enabled
Fix validation of null-updates/patches when the "old" PVC was persisted by
an older version. Add upgrade integration tests written by liggitt.
2022-03-29 13:39:48 -04:00
Kubernetes Prow Robot
05b59e7717
Merge pull request #107681 from andyzhangx/azuredisk-migration-ga
mark AzureDisk CSI migration as GA
2022-03-29 10:24:55 -07:00
Ross Peoples
d26e6cca72 make update after timeZone support for CronJob 2022-03-29 11:40:46 -05:00
Ross Peoples
dbb3906a09 Fix for timeZone validation and strategy 2022-03-29 11:40:34 -05:00
Katrina Verey
ac37f69f17
Update error message assertions 2022-03-29 12:29:14 -04:00
Katrina Verey
a8e1c67667
Update kubectl kustomize to kyaml/v0.13.6, cmd/config/v0.10.6, api/v0.11.4, kustomize/v4.5.4 2022-03-29 12:29:11 -04:00
Kubernetes Prow Robot
6c96ac04ff
Merge pull request #101218 from gjkim42/add-taint-toleration-check
kubelet: check taint/toleration before accepting pods
2022-03-29 09:16:56 -07:00
Andrew Sy Kim
50d93f7cec test/utils/image: use agnhost image agnhost:2.36 to include --delay-shutdown flag
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-03-29 11:37:43 -04:00
Andrew Sy Kim
01c178c9de test/e2e/network: add e2e tests for ProxyTerminatingEndpoints
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-03-29 11:37:43 -04:00
Andrew Sy Kim
53439020a4 pkg/proxy/ipvs: add unit tests Test_EndpointSliceOnlyReadyAndTerminatingCluster and Test_EndpointSliceReadyAndTerminatingCluster for validating ProxyTerminatingEndpoints when the traffic policy is 'Cluster'
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-03-29 11:37:15 -04:00
Andrew Sy Kim
718a655e42 pkg/proxy/iptables: add and fix existing unit tests based on changes to ProxyTermintingEndpoints
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-03-29 11:37:15 -04:00
Andrew Sy Kim
e2e0b6fca8 pkg/proxy: update CategorizeEndpoints to apply ProxyTerminatingEndpoints to all traffic policies
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-03-29 11:06:58 -04:00
Aldo Culquicondor
8c00f510ef Graduate JobReadyPods to beta
Set podUpdateBatchPeriod to 1s

Change-Id: I8a10fd8f8559adad9df179b664b8c82851607855
2022-03-29 10:07:41 -04:00
Kensei Nakada
136cf57809 use sync.Map in CycleState for better performance 2022-03-29 13:19:50 +00:00
Patrick Ohly
7de1b05e85 logging: add ContextualLogging feature
InitLogs overrides the klog default and turns contextual logging off. This
ensures that it is only enabled in Kubernetes commands that explicitly enable
it via a feature gate. A feature gate for it gets defined in
k8s.io/component-base/logs and is then used by Options.ValidateAndApply.

The effect of disabling contextual logging is very limited according to
benchmarks with kube-scheduler. The feature gets added anyway to satisfy the
PRR recommendation that features should be controllable.

The following commands have support for contextual logging:
- kube-apiserver
- kube-controller-manager
- kubelet
- kube-scheduler
- component-base/logs example

Supporting a feature gate check in ValidateAndApply and not in InitLogs is a
simplification: changing InitLogs to accept a FeatureGate would have implied
changing also component-base/cli.Run. This didn't seem worthwhile because
ValidateAndApply already covers the relevant commands.
2022-03-29 13:29:57 +02:00
Patrick Ohly
b390d018c7 logs: pass verbosity to loggers
When a Logger gets called directly via contextual logging, it has to do its own
verbosity check and therefore needs to know what the intended verbosity level
is.

This used to work previously because all verbosity checks were done in klog
before invoking the Logger.
2022-03-29 12:06:40 +02:00
Patrick Ohly
ef30d845d9 json: test handling of duplicate keys
We want to see in the output when keys are used more than once. This should be
fixed because parsing the log messages as JSON will only preserve one of the
values.
2022-03-29 12:00:26 +02:00
Patrick Ohly
ab318cf89f json: enable WithName logging
The name added to a logger via WithName only gets printed when a key is
chosen. "logger" is used as in the zap examples.

This becomes relevant once we support contextual logging. When logging through
klog the name is always empty.
2022-03-29 12:00:26 +02:00