Commit Graph

17726 Commits

Author SHA1 Message Date
Hao Ruan
08210a1cb5 Generated files 2023-01-19 22:14:40 +08:00
Hao Ruan
b64dcf862d Fix the name violation in apiextensions.k8s.io/v1,CustomResourceConversion, remove the failures file 2023-01-19 22:08:29 +08:00
Tim Hockin
76785d07ee update kubelet go.mod 2023-01-18 23:59:55 -08:00
Tim Hockin
01e1da77e2 Fix kubelet-plugin-registration to add missing dir
include v1

This is far too manual for my tastes, which will be fixed subsequently.
2023-01-18 23:38:20 -08:00
Tim Hockin
4e48506245 Fix generated-pod-resources to add missing dir
include v1alpha1

This is too manual - will be fixed subsequently
2023-01-18 23:38:18 -08:00
Patrick Ohly
d6480dacd6 k8s.io/component-base/logs: match full help text in unit test
The test was meant to fail when there are unexpected additional lines like the
"panic calling String method" messages. But `assert.Regexp` does a search for
the regexp, not a full string match, and thus succeeded even if those lines are
present. A full match needs to be requested explicitly with ^ and $.
2023-01-19 08:29:31 +01:00
Joseph Anttila Hall
5c01971f2a Bump konnectivity-client to v0.1.1
Fixes memory leaks.
Upgrades GRPC and ProtoBuf versions.
2023-01-19 04:35:31 +00:00
Kubernetes Prow Robot
33e9242843 Merge pull request #108095 from lzhecheng/fix-update-route-if-nodeip-change
Route controller should update routes with NodeIP changed
2023-01-18 19:02:33 -08:00
Kubernetes Prow Robot
af54e18a46 Merge pull request #115187 from thockin/codegen-3-examples-cleanup
Fix apiserver example2 to update gen'ed protobufs
2023-01-18 17:54:49 -08:00
Kubernetes Prow Robot
c2d18a6d14 Merge pull request #115184 from thockin/codegen-1-clientset-doc-go
Don't generate clientset/doc.go in client-gen
2023-01-18 17:54:41 -08:00
Kubernetes Prow Robot
8bee5dca1d Merge pull request #115140 from smarterclayton/wait_context
wait: Use a context implementation for ContextForChannel
2023-01-18 17:54:33 -08:00
Tim Hockin
9a491f79a8 Fix apiserver example2 to update gen'ed protobufs
regen apiserver example2
2023-01-18 15:00:55 -08:00
Tim Hockin
dc88f34ce3 Remove obsolete generated listers
These are not regenerated by any input.  The OWNERS files were the last
things left for these 2 directories
2023-01-18 14:54:22 -08:00
Tim Hockin
37ca6b0fac Remove obsolete generated applyconfigs
These are not regenerated by any input.
2023-01-18 14:54:21 -08:00
Tim Hockin
e127fffea0 Remove deprecated generated clients 2023-01-18 14:54:20 -08:00
Tim Hockin
95bf7b0afe Don't generate clientset/doc.go in client-gen
It seems valuable to be able to provide hand-written docs for these
first-level directories, and if don't want them, the generated doc.go
files are not actually very helpful.

This commit also adds new doc.go files for client-go listers/ and
informers/.
2023-01-18 14:50:22 -08:00
Tim Hockin
f95a840c12 Fix client-go doc.go - not generated
As per liggitt, lavalamp, and jpbetz
2023-01-18 14:50:21 -08:00
Kubernetes Prow Robot
06ad425809 Merge pull request #115147 from alexzielenski/apiserver/policy/multiple-paramkind-bug
ValidatingAdmissionPolicy: fix bug preventing multiple policies from using same paramKind
2023-01-18 14:49:01 -08:00
Kubernetes Prow Robot
eff6b9f648 Merge pull request #114680 from pohly/log-go-flag-support
k8s.io/component-base/logs: fix usage through Go flag package
2023-01-18 14:48:54 -08:00
Mike Danese
f61c4245c1 vendor: removed unused dep github.com/elazarl/goproxy 2023-01-18 18:31:50 +00:00
Mike Danese
6bdb8ed566 switch spdy round trip tests to simple http proxy
github.com/elazarl/goproxy does not properly handle upgrades over HTTP
proxy. The problem is this misinterpretation:

6691876326/vendor/github.com/elazarl/goproxy/proxy.go (L89-L95)

These should be stripped but recalculated then added back:

https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/net/http/httputil/reverseproxy.go;l=292-297;drc=f6d844510d5f1e3b3098eba255d9b633d45eac3b

Let's just stop using goproxy, and use the stdlib instead. The
functionality we need is straightforward to implement and goproxy is
overkill.
2023-01-18 18:31:50 +00:00
Kubernetes Prow Robot
cc68c06f9c Merge pull request #115163 from SataQiu/lock-AdvancedAuditing-gate-20230118
Lock the AdvancedAuditing feature gate to true
2023-01-18 07:12:41 -08:00
Clayton Coleman
95051a63b3 wait: Use a context implementation for ContextForChannel
ContextForChannel uses a goroutine to transform a channel close to
a context cancel. However, this exposes a synchronization issue if
we want to unify the underlying implementation between contextless
and with context - a ConditionFunc that closes the channel today
expects the behavior that no subsequent conditions will be invoked
(we have a test in wait_test.go TestUntilReturnsImmediately that
verifies this expectation). We can't unify the implementation
without ensuring this property holds.

To do that this commit changes from the goroutine propagation to
implementing context.Context and using stopCh as the Done(). We
then implement Err() by returning context.Canceled and stub the
other methods. Since our context cannot be explicitly cancelled
by users, we cease to return the cancelFn and callers that need
that behavior must wrap the context as normal.

This should be invisible to clients - they would already observe
the same behavior from the context, and the existing error
behavior of Poll* is preserved (which ignores ctx.Err()).

As a side effect, one less goroutine is created making it more
efficient.
2023-01-18 10:00:47 -05:00
Patrick Ohly
4add08dcce k8s.io/component-base/logs: relax flagset unit tests
A full string comparison might fail when the underlying libraries change how
they format the help text. A regex match is less strict, but still makes some
assumptions about the implementation.
2023-01-18 14:45:54 +01:00
Kubernetes Prow Robot
d3f881f750 Merge pull request #115093 from xuzhenglun/too-large-resource-version-1.16
Fix bug in reflector not detecting "Too large resource version" error before 1.17.0
2023-01-18 03:12:46 -08:00
SataQiu
c25095b223 the AdvancedAuditing featuregate has been GA since v1.12, and is locked to ture in v1.27 2023-01-18 18:50:15 +08:00
Kubernetes Prow Robot
46f3821bf4 Merge pull request #114586 from andrewsykim/apiserver-lease-rename
Rename apiserver identity lease labels to apiserver.kubernetes.io/identity
2023-01-17 21:36:34 -08:00
Kubernetes Prow Robot
106332252b Merge pull request #115129 from liggitt/gotools-1.20
bump honnef.co/go/tools to support go1.20
2023-01-17 20:28:33 -08:00
Sean Sullivan
84b226409a Refactor validation files into openapi/validation 2023-01-17 18:02:41 -08:00
Alexander Zielenski
ecd267d097 fix bug with param controllers being removed if used by more than one policy 2023-01-17 16:26:18 -08:00
Kubernetes Prow Robot
20c17da142 Merge pull request #114446 from lengrongfu/feat/clean_up
clean up master-service-namespace
2023-01-17 16:06:35 -08:00
Kubernetes Prow Robot
7e0923899f Merge pull request #114527 from alexzielenski/apiserver/policy/lockfree-refactor
refactor policy admission Validator to be lock free
2023-01-17 12:48:33 -08:00
Kubernetes Prow Robot
c913e6ce62 Merge pull request #114542 from pacoxu/EphemeralContainers
cleanup: EphemeralContainers feature gate related codes
2023-01-17 11:18:34 -08:00
Kubernetes Prow Robot
b01afdca66 Merge pull request #115116 from smarterclayton/hide_wait
wait: Make WaitFor and WaitForWithContext private
2023-01-17 10:10:45 -08:00
Kubernetes Prow Robot
f7b02260f6 Merge pull request #114922 from ibihim/kmsv2-interface-move
[KMSv2] apiserver/kmsv2: mv Service interface into kmsv2
2023-01-17 10:10:33 -08:00
Jordan Liggitt
7a41b950cc Fix shadowing lint error 2023-01-17 12:09:24 -05:00
Patrick Ohly
8251a63269 k8s.io/component-base/logs: unit test for command line help output
Both pflag and standard FlagSet are covered.
2023-01-17 17:32:50 +01:00
Clayton Coleman
1dfe2225ac wait: Make WaitFor and WaitForContext private
These methods are unused within the Kubernetes codebase and will be
replaced with a more general method that unifies Wait, Poll*, and
ExponentialBackoff within this package. A zero duration interval
passed to any of the other methods will provide equivalent function.
2023-01-17 08:39:15 -05:00
Kubernetes Prow Robot
1b95370225 Merge pull request #114886 from a7i/kubectl-hpa-v2
kubectl: use autoscaling v2 for hpa
2023-01-17 02:54:33 -08:00
Patrick Ohly
a41424d4c8 k8s.io/component-base/logs: allow overriding os.Stdout and os.Stderr
This is useful for tests which need to discard or capture the output.
2023-01-17 10:25:57 +01:00
Patrick Ohly
9b86f457e9 k8s.io/component-base/logs: support changing verbosity of JSON output
The GlogSetter method is used by three components to change verbosity at
runtime through HTTP APIs. This used to work only for text output with klog
calls, but not for text output through the klog logger or for JSON output.

Now loggers can also provide a callback for changing their verbosity at
runtime. Implementing that implies that the Create factory method has to be
extended, which is an API break for the Go package, but not an API break for
the configuration file and command line flags, which is what matters for the
"api/v1" component API.
2023-01-17 10:25:54 +01:00
Patrick Ohly
8881b71822 k8s.io/component-base/logs/json: fix package name
Having the sub-package using the same name as the parent package makes no
sense. This seems to be a cut-and-paste error.
2023-01-17 10:20:59 +01:00
Krzysztof Ostrowski
b7701b00ea apiserver/kmsv2: mv Service interface into kmsv2
Signed-off-by: Krzysztof Ostrowski <kostrows@redhat.com>
2023-01-17 10:05:16 +01:00
Clayton Coleman
34bfdc3635 wait: ExponentialBackoffWithContext should take context-aware fn
The condition methods will eventually all take a context. Since we
have been provided one, alter the accepted condition type and
change the four references in tree.

Collers of ExponentialBackoffWithContext should use a condition
aware function (ConditionWithContextFunc). If the context can be
ignored the helper ConditionFunc.WithContext can be used to convert
an existing function to the new type.
2023-01-16 14:57:57 -05:00
xuzhenglun
11e5e92dc6 Fix bug in reflector not detecting "Too large resource version" error before 1.17.0 2023-01-16 13:45:35 +08:00
Kubernetes Prow Robot
4c4d4ad0a4 Merge pull request #115077 from smarterclayton/reflector_mock_clock
cache: Reflector should have the same injected clock as its informer
2023-01-15 17:24:49 -08:00
Paco Xu
70e56fa71a cleanup: EphemeralContainers feature gate related codes 2023-01-15 21:15:01 +08:00
Davanum Srinivas
d9b98bc36a Update to new release of moby/ipvs
hack/pin-dependency.sh github.com/moby/ipvs v1.1.0

- go to a fixed tag for `vishvananda/netns`
- no more references to `pkg/errors`

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-01-14 16:13:24 -05:00
Clayton Coleman
91b3a81fbd cache: Reflector should have the same injected clock as its informer
While refactoring the backoff manager to simplify and unify the code
in wait a race condition was encountered in
TestSharedInformerWatchDisruption. The new implementation failed
because the fake clock was not propagated to the backoff managers
when the reflector was used in a controller. After ensuring the
mangaers, reflector, controller, and informer shared the same
clock the test needed was updated to avoid the race condition by
advancing the fake clock and adding real sleeps to wait for
asynchronous propagation of the various goroutines in the controller.

Due to the deep structure of informers it is difficult to inject
hooks to avoid having to perform sleeps. At a minimum the FakeClock
interface should allow a caller to determine the number of waiting
timers (to avoid the first sleep).
2023-01-14 14:50:09 -05:00
Kubernetes Prow Robot
3a8e2e399b Merge pull request #114393 from danielvegamyhre/myfeature
Option to ignore existing pods' preferred inter-pod affinities if the incoming pod has no preferred inter-pod affinities
2023-01-13 17:28:15 -08:00