Commit Graph

17471 Commits

Author SHA1 Message Date
Davanum Srinivas
1da53d637b add kms as to 1.26 rules for multiple components
In 576cca0a5e, we fixed one spot, looks
like we need to do the same for others!

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-12-07 19:27:10 -05:00
Kubernetes Prow Robot
5b4a7805c8 Merge pull request #114288 from xmudrii/pub-bot-1189
Update publishing-bot rules to Go 1.18.9
2022-12-07 11:28:38 -08:00
Luca Comellini
2309c6b498 Bump grpc to v1.51.0
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-12-07 09:48:08 -08:00
Stephen Kitt
56d8302bc8 Use k8s utils pointer instead of Azure autorest/to
Since k/u includes pointer functions which are equivalent to the
autorest/to pointer functions, and the latter are deprecated, it seems
useful to switch to the former:
* to.FooPtr becomes pointer.Foo
* to.Foo becomes pointer.FooDeref with an appropriate default
* to.StringSlicePtr becomes &

This doesn't remove anything from vendor, but it does turn the
dependency into an indirect one, ready to be removed when the rest of
the Azure migration happens.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2022-12-07 18:16:16 +01:00
Kubernetes Prow Robot
09d7286eb5 Merge pull request #114284 from xmudrii/go-1194
releng: Update images, dependencies and version to Go 1.19.4
2022-12-07 07:28:37 -08:00
Nikhita Raghunath
576cca0a5e staging/publishing: add kms as to apiserver 1.26 rules 2022-12-07 17:52:09 +05:30
ialidzhikov
712dea4ae3 Update github.com/aws/aws-sdk-go
from v1.44.116 to v1.44.136
2022-12-07 09:23:24 +02:00
Jordan Liggitt
afe5378db9 Update golang.org/x/net 1e63c2f
Includes fix for CVE-2022-41717
2022-12-06 17:29:11 -05:00
Jordan Liggitt
dfac46de3f Fix table in sync controller comment 2022-12-06 00:16:31 -05:00
Marko Mudrinić
4a07253025 Update publishing-bot rules to Go 1.18.9
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-12-05 12:52:54 +01:00
Marko Mudrinić
4f1a51719b releng: Update images, dependencies and version to Go 1.19.4
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-12-05 12:33:55 +01:00
Jonathan Dobson
02fdbf8013 legacy-cloud-providers: prevent index out-of-range in getNextUnitNumber 2022-12-02 14:44:26 -07:00
Andy Goldstein
784ec157e6 reflector: refactor setting typeDescription & expectedGVK
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-12-02 12:39:58 -05:00
Andy Goldstein
474fc8c523 Reflector: support logging Unstructured type
Add an annotation that can be added to the exampleType passed to
NewReflector to indicate the expected type for the Reflector. This is
useful for types such as unstuctured.Unstructured, which, when used with
a dynamic informer, do not have their TypeMeta filled in.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-12-02 12:22:04 -05:00
Damien Grisonnet
55ec09d377 tools/events: fix data race when emitting series
There was a data race in the recordToSink function that caused changes
to the events cache to be overriden if events were emitted
simultaneously via Eventf calls.

The race lies in the fact that when recording an Event, there might be
multiple calls updating the cache simultaneously. The lock period is
optimized so that after updating the cache with the new Event, the lock
is unlocked until the Event is recorded on the apiserver side and then
the cache is locked again to be updated with the new value returned by
the apiserver.

The are a few problem with the approach:

1. If two identical Events are emitted successively the changes of the
   second Event will override the first one. In code the following
   happen:
   1. Eventf(ev1)
   2. Eventf(ev2)
   3. Lock cache
   4. Set cache[getKey(ev1)] = &ev1
   5. Unlock cache
   6. Lock cache
   7. Update cache[getKey(ev2)] = &ev1 + Series{Count: 1}
   8. Unlock cache
   9. Start attempting to record the first event &ev1 on the apiserver side.

   This can be mitigated by recording a copy of the Event stored in
   cache instead of reusing the pointer from the cache.

2. When the Event has been recorded on the apiserver the cache is
   updated again with the value of the Event returned by the server.
   This update will override any changes made to the cache entry when
   attempting to record the new Event since the cache was unlocked at
   that time. This might lead to some inconsistencies when dealing with
   EventSeries since the count may be overriden or the client might even
   try to record the first isomorphic Event multiple time.

   This could be mitigated with a lock that has a larger scope, but we
   shouldn't want to reflect Event returned by the apiserver in the
   cache in the first place since mutation could mess with the
   aggregation by either allowing users to manipulate values to update
   a different cache entry or even having two cache entries for the same
   Events.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2022-12-02 16:36:09 +01:00
Damien Grisonnet
2f83117bcf tools/events: retry on AlreadyExist for Series
When attempting to record a new Event and a new Serie on the apiserver
at the same time, the patch of the Serie might happen before the Event
is actually created. In that case, we handle the error and try to create
the Event. But the Event might be created during that period of time and
it is treated as an error today. So in order to handle that scenario, we
need to retry when a Create call for a Serie results in an AlreadyExist
error.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2022-12-02 16:25:04 +01:00
Maksym Pavlenko
3c0a78e924 Make mounter interface exportable
In current implementation it's not possible to implement
Mounter interface from a different package because of
private function:

Type cannot implement 'mount.Interface' as it has a non-exported method and is defined in a different package

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-12-02 06:58:43 -08:00
Arda Güçlü
b84f192acc kubectl scale: proceed even if there is invalid resource in multi 2022-12-02 17:23:44 +03:00
Arda Güçlü
76ee3788cc kubectl scale: Add dry-run prefix to indicate result is not applied
Currently, if user executes `kubectl scale --dry-run`, output has no
indicator showing that this is not applied in reality.

This PR adds dry run suffix to the output as well as more integration
tests to verify it.
2022-12-02 16:27:18 +03:00
Arda Güçlü
13be899b42 kubectl scale: Use visitor only once
`kubectl scale` calls visitor two times. Second call fails when
the piped input is passed by returning an
`error: no objects passed to scale` error.

This PR uses the result of first visitor and fixes that piped
input problem. In addition to that, this PR also adds new
scale test to verify.
2022-12-02 16:00:22 +03:00
Arda Güçlü
832644f0b3 kubectl exec: return descriptive error message when multi resource passed
`kubectl exec` command supports getting files as inputs. However,
if the file contains multiple resources, it returns unclear error message;
`cannot attach to *v1.List: selector for *v1.List not implemented`.

Since `exec` command does not support multi resources, this PR
handles that and returns descriptive error message earlier.
2022-12-02 14:05:11 +03:00
Antoine Pelisse
56cac64655 fieldmanager: Make all tests external 2022-11-30 13:54:24 -08:00
Antoine Pelisse
9c447177e8 fieldmanager: Move private setLastApplied to internal.SetLastApplied
Since this is used both in real-code and in test-code, let's put it
somewhere it can be re-used.
2022-11-30 13:54:21 -08:00
Antoine Pelisse
530d25026e fieldmanager: remove dependencies on dummy version conversion for tests 2022-11-30 13:54:21 -08:00
Antoine Pelisse
7217e0308d fieldmanager: Remove unnecessary method for creating TestFieldManager 2022-11-30 13:54:16 -08:00
Brian Pursley
c0dea5e31a i18n: Fix bug where package-level variables are not translated.
Change i18n.T() to load translations if they have not yet been loaded.

Added new integration tests to test help output translation.
2022-11-29 23:09:57 -05:00
Marko Mudrinić
8e973ce871 Fix Go 1.19 version in publishing-bot rules
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-11-29 20:55:12 +01:00
Marko Mudrinić
7b6a3d6a33 Update publishing-bot rule for apimachinery on release-1.26
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-11-29 20:53:14 +01:00
ZhangYu
357d0a8603 staging/src/k8s.io/legacy-cloud-providers/azure: remove unnecessary fmt.Sprintf 2022-11-28 16:56:01 +08:00
Paco Xu
75f89875f8 use etcd 3.5.6-0 after promotion 2022-11-24 09:45:56 +08:00
aimuz
059acc2f5a kubernetes components using leader election to leases
Signed-off-by: aimuz <mr.imuz@gmail.com>
2022-11-23 10:59:08 +08:00
Davanum Srinivas
130bd8cba5 Add missing tags for kms and dynamic-resource-allocation for publishing
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-11-22 21:04:19 -05:00
ztzxt
70415b9562 Fix API refs for batch v1 and v1beta1
Add generatod docs for batch v1

Start types with uppercase letters

Fix batch API docs under pgs/apis

Create generated files for batch v1

Fix batch v1beta1 docs

Generate new files after merge conflict
2022-11-19 12:42:25 +03:00
xin.li
8b4b3d82ab Add test for staging/src/k8s.io/apimachinery/pkg/version/staging/helpers.go
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-11-19 10:46:55 +08:00
Arda Güçlü
1abf94bec3 Remove GetSingularName for subresources 2022-11-18 12:21:19 +03:00
Arda Güçlü
672e0b1e01 Use correct singular name format for subresources 2022-11-18 12:21:19 +03:00
Arda Güçlü
578ddde80e Add singular name for the rest of types 2022-11-18 12:21:13 +03:00
Arda Güçlü
0990ba1cc9 Introduce singularNameProvider for core types
This introduces `singularNameProvider`. This provider will be used
by core types to have their singular names are defined in discovery
endpoint. Thanks to that, core resources singular name always have
higher precedence than CRDs shortcuts or singular names.
2022-11-18 12:21:07 +03:00
Antoine Pelisse
a1f5e36fab Add jpbetz to k8s.io/client-go/applyconfigurations 2022-11-17 15:05:30 -08:00
Antoine Pelisse
b5f2130f24 Add apelisse into some more OWNERS files 2022-11-17 15:05:00 -08:00
Ravi Nalluri
1b5e50008c Add generated docs for discovery and storage types 2022-11-17 12:03:03 -06:00
Ravi Nalluri
2fb2b7698e Update API doc for Storage v1alpha1, v1beta1 types and Discovery v1 types 2022-11-17 10:11:03 -06:00
wujunwei
2afc78bac8 kubectl: remove unnecessary TODO annotations 2022-11-17 09:39:30 +08:00
Ravi Nalluri
fdcf7b3b92 Add generated docs for discovery v1beta1 and storage v1 types 2022-11-16 16:55:33 -06:00
Monis Khan
cb3410e1b7 kms: use different context for server lifecycle and initial load
Signed-off-by: Monis Khan <mok@microsoft.com>
2022-11-16 16:44:23 -05:00
Chirayu Kapoor
693f7aef6e Changed API field references and generated docs for coordination v1 and v1beta1
Signed-off-by: Chirayu Kapoor <dev.csociety@gmail.com>
2022-11-16 22:15:58 +05:30
Kubernetes Prow Robot
6c65bed7ce Merge pull request #113934 from salaxander/publishing-release-126
staging/publishing: add release-1.26 branch
2022-11-16 03:22:49 -08:00
Jordan Liggitt
32ac434d4d Switch deprecated API serving back to gating on beta 2022-11-15 22:02:49 -05:00
Jordan Liggitt
69fad419a7 Limit request retrying to []byte request bodies 2022-11-15 20:25:02 -05:00
Xander Grzywinski
2111eceb6a Add publishing bot rules for 1.26 2022-11-15 13:51:18 -08:00