Commit Graph

120890 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
0f817dcd65
Merge pull request #122584 from xigang/resource_reserved
kubelet: cleanup system-reserved and kube-reserved flag usage
2024-01-23 18:10:27 +01:00
zhangchao
7972f0309c Fix service account token projected volume validation
Signed-off-by: zhangchao <zchao9100@gmail.com>
2024-01-23 23:03:37 +08:00
carlory
35004e8f77 Fix AtomicWriter may not create user visible files after kubelet was restarted 2024-01-23 22:14:40 +08:00
Dan Winship
1d59d6b6c6 Use validation.IsValidIP in a few more places
Rather than using netutils.ParseIPSloppy directly.

Also fix the field paths in the errors for pod.spec.hostAliases to
include the array index.
2024-01-23 09:10:35 -05:00
Dan Winship
519dd6887d Make validation.IsValidIP return a field.ErrorList for consistency 2024-01-23 09:08:27 -05:00
Dan Winship
f999b24fad Expand IsValidIP unit tests
Add more test cases, and merge the IsValidIP, IsValidIPv4Address and
IsValidIPv6Address tests together. (Any string that passes IsValidIP
should pass either IsValidIPv4Address or IsValidIPv6Address but not
both, and any string that fails IsValidIP should fail both
IsValidIPv4Address and IsValidIPv6Address.)
2024-01-23 09:08:27 -05:00
Dan Winship
8fc691be94 Drop validation.IsValidSocketAddr
It's not used anywhere, and if someone was going to validate an
IP:port somewhere, they should think about exactly what they want
rather than just using this function. (E.g., validation should be
slightly different for an IP:port to bind to vs an IP:port to connect
to.)
2024-01-23 09:08:27 -05:00
Dan Winship
09abfa46be Update knftables, with new sigs.k8s.io module name 2024-01-23 08:09:05 -05:00
Kubernetes Prow Robot
bd6c1fcc20
Merge pull request #122929 from kerthcet/cleanup/perf
Quick break for performance
2024-01-23 13:49:49 +01:00
charles-chenzz
367bbd01d7 update testcase on podreadytostartcontainercondition 2024-01-23 18:29:35 +06:00
kerthcet
8371e4cf93 quick break when met
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-01-23 19:40:15 +08:00
Ivo Gosemann
740b4c456d
k8s.io/client-go: add OverridingClientConfig overriding RawConfig 2024-01-23 11:13:40 +01:00
Ivo Gosemann
db80aa56ed
k8s.io/client-go: add ClientConfig option to override raw config 2024-01-23 09:30:42 +01:00
Jordan Liggitt
e92a4debcb
Fix lint warning about unchecked error 2024-01-22 20:45:26 -08:00
Jordan Liggitt
d2c1a23a8a
Add stub methods for kube-proxy on non-linux/windows 2024-01-22 20:45:26 -08:00
Jordan Liggitt
8b22cb4696
Revert "Make verify-typecheck.sh only check valid targets for a platform"
This reverts commit e48aa09340.
2024-01-22 20:45:25 -08:00
Kubernetes Prow Robot
3aa8c59fec
Merge pull request #122906 from danwinship/kubeadm-kubeconfig-fix-2
Fix to previous EnsureAdminClusterRoleBindingImpl fix
2024-01-23 05:17:52 +01:00
Mike Spreitzer
b88fefad1f Add note about directory structure
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2024-01-22 15:36:35 -05:00
bells17
62eb7cb4f9 make update: add update-golangci-lint-config 2024-01-23 03:09:13 +09:00
Kubernetes Prow Robot
445869a59b
Merge pull request #122873 from p0lyn0mial/upstream-reflector-usewatchlist-pointer
client-go/reflector: make UseWatchList a pointer
2024-01-22 18:20:58 +01:00
Kubernetes Prow Robot
745a364422
Merge pull request #120866 from bzsuni/cleanup/sets/api
use generic Set in api
2024-01-22 18:20:48 +01:00
Alexander Constantinescu
31de75f62c KEP 3836 - promote to beta 2024-01-22 17:47:41 +01:00
Quan Tian
0ef42133a1 Reduce verbose logs in MetaAllocator
"Finished sync for CIDRs" was logged every 10 mins even there was no
change.

Signed-off-by: Quan Tian <qtian@vmware.com>
2024-01-23 00:07:10 +08:00
Kubernetes Prow Robot
9c1c603fbe
Merge pull request #121145 from Rei1010/apiClean
e2e_api: stop using deprecated framework.ExpectNotEqual
2024-01-22 16:31:09 +01:00
Kubernetes Prow Robot
7c0c4fb104
Merge pull request #122876 from danwinship/dead-scheduler-config
Remove some dead options in KubeSchedulerConfiguration
2024-01-22 15:05:30 +01:00
Dan Winship
b46455ddfe Fix to previous EnsureAdminClusterRoleBindingImpl fix
The previous fix changed the behavior of
EnsureAdminClusterRoleBindingImpl under the assumption that the unit
test was correct and the real-world behavior was wrong, but in fact,
the real-world behavior was already correct, and the unit test was
expecting the wrong result because of the difference in behavior
between real and fake clients.
2024-01-22 08:23:41 -05:00
Kubernetes Prow Robot
a07b1aaa5b
Merge pull request #122893 from danwinship/kubeadm-rolebinding-failure
Fix EnsureAdminClusterRoleBindingImpl error handling
2024-01-21 19:18:47 +01:00
Dan Winship
b18caee5df Fix EnsureAdminClusterRoleBindingImpl error handling
The code assumed Create() returned nil on error, but that's only true
for the fake clients in unit tests.
2024-01-21 10:53:52 -05:00
Daman Arora
25a40b1c7c pkg/proxy/nftables: handle traffic to node ports with no endpoints
NFTables proxy will no longer install drop and reject rules for node
port services with no endpoints in chains associated with forward and
output hooks.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-01-21 20:07:56 +05:30
Daman Arora
4b40299133 pkg/proxy/nftables: handle traffic to cluster ip
NFTables proxy will now drop traffic directed towards unallocated
ClusterIPs and reject traffic directed towards invalid ports of
Cluster IPs.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-01-21 19:58:37 +05:30
Daman Arora
01d7de5464 pkg/proxy/nftables: rename constant names for nftable objects
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-01-21 13:12:18 +05:30
Daman Arora
80ca91c90c pkg/proxy/nftables: refactor packet tracer address matching
Use bool instead of not-equal-operator as string in
tracer.addressMatches of helpers_test.go

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-01-21 12:53:55 +05:30
Daman Arora
d23483dd7c pkg/proxy/config: rename import aliases
* coreinformers -> v1informers
* discovery -> discoveryv1
* discoveryinformers -> discoveryv1informers

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-01-21 12:36:39 +05:30
Daman Arora
212c5dd216 pkg/proxy/config: use blank identifier instead of ignoring error
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-01-21 12:28:52 +05:30
Patrick Ohly
43539c855f e2e framework: unify logging, support skipping helpers
ginkgo.GinkgoHelper is a recent addition to ginkgo which allows functions to
mark themselves as helper. This then changes which callstack gets reported for
failures. It makes sense to support the same mechanism also for logging.

There's also no reason why framework.Logf should produce output that is in a
different format than klog log entries. Having time stamps formatted
differently makes it hard to read test output which uses a mixture of both.
Another user-visible advantage is that the error log entry from
framework.ExpectNoError now references the test source code.

With textlogger there is a simple replacement for klog that can be reconfigured
to let the caller handle stack unwinding. klog itself doesn't support that
and should be modified to support it (feature freeze).

Emitting printf-style output via that logger would work, but become less
readable because the message string would get quoted instead of printing it
verbatim as before. So instead, the traditional klog header gets reproduced
in the framework code. In this example, the first line is from klog, the second
from Logf:

    I0111 11:00:54.088957  332873 factory.go:193] Registered Plugin "containerd"
    ...
      I0111 11:00:54.987534 332873 util.go:506] >>> kubeConfig: /var/run/kubernetes/admin.kubeconfig

Indention is a bit different because the initial output is printed before
installing the logger which writes through ginkgo.GinkgoWriter.

One welcome side effect is that now "go vet" detects mismatched parameters for
framework.Logf because fmt.Sprintf is called without mangling the format
string. Some of the calls were incorrect.
2024-01-20 18:23:31 +01:00
Patrick Ohly
dd0cee4895 e2e node runner: remove dependency on e2e/framework
A stand-alone binary shouldn't import the test/e2e/framework, which is targeted
towards usage in a Ginkgo test suite. This currently works, but will break once
test/e2e/framework becomes more opinionated about how to configure logging.

The simplest solution is to duplicate the one short function that the binary
was calling in the framework.
2024-01-20 18:23:31 +01:00
Qi Ni
3bf2bf8191 chore: Cleanup in-tree credential provider azure and cloud provider azure 2024-01-20 15:18:31 +08:00
Kubernetes Prow Robot
418ae605ec
Merge pull request #122879 from liggitt/verbose-local-up
Make local-up-cluster non-verbose by default
2024-01-20 03:50:35 +01:00
Kubernetes Prow Robot
fbb2e6293f
Merge pull request #122871 from oxxenix/minor-fix
Print error message regardless verbosity value
2024-01-19 21:04:18 +01:00
Dan Winship
ed289f875e Remove some dead options in KubeSchedulerConfiguration
The v1beta1 API had MetricsBindAddress and HealthzBindAddress fields
but they were removed in v1, and then never got removed from the
unversioned type when the v1beta1 API went away.
2024-01-19 13:47:23 -05:00
Kubernetes Prow Robot
2d4100335e
Merge pull request #122866 from pohly/e2e-klog-fatal
e2e: replace klog.Fatal with assertion
2024-01-19 19:22:14 +01:00
Ivan Valdes
6d65c063ca
describer: improve job and pod template output
* Add Node-Selectors and Tolerations to pod template's describe output.
* Add Suspend, BackoffLimit and TTLSecondsAfterFinished to job's describe
  output.
2024-01-19 10:17:42 -08:00
Kubernetes Prow Robot
42c89fdc25
Merge pull request #122727 from carlory/fix-122376
Fix flaking test: CSI Mock workload info CSI PodInfoOnMount Update
2024-01-19 17:29:21 +01:00
Jordan Liggitt
6ae264464c
Make local-up-cluster non-verbose by default 2024-01-19 08:27:28 -08:00
Kubernetes Prow Robot
48b68582b8
Merge pull request #122869 from pohly/e2e-flaky-enforcement
e2e: enforce usage of WithFlaky instead of [Flaky]
2024-01-19 15:11:26 +01:00
Lukasz Szaszkiewicz
41e706600a client-go/reflector: make UseWatchList a pointer
until #115478(use streaming against the etcd storage)
is resolved the cacher need a way to disable the streaming.
2024-01-19 14:40:18 +01:00
Lubomir I. Ivanov
0ba903fd57 kubeadm: enable parallel pulls of images
- Update the logic in checks.go to separate serial and parallel image
pulls.
- Add a new CRI function PullImagesInParallel() with a private
implementation.
- Unit test the private implementation.
- Update other unit tests in checks_test.go.
2024-01-19 14:26:21 +02:00
Lubomir I. Ivanov
510df7eab1 kubeadm: add validation of ImagePullPolicy in the API
The validation is currently performed on runtime during the
ImagePull preflight check. Given this is an API add the validation
under apis/kubeadm.
2024-01-19 14:26:21 +02:00
Lubomir I. Ivanov
754ffa3477 kubeadm: add ImagePullSerial field to v1beta4 NodeRegistationOptions
ImagePullSerial specifies if image pulling performed
by kubeadm must be done serially or in parallel.
Default: true
2024-01-19 14:26:20 +02:00
Oksana Baranova
a4afaeda37 print error message regardless verbosity level
Signed-off-by: Oksana Baranova <oksana.baranova@intel.com>
2024-01-19 13:57:27 +02:00