Commit Graph

5971 Commits

Author SHA1 Message Date
Kubernetes Publisher 96bc51835b Merge pull request #108934 from stevekuznetsov/skuznets/time-out-test
pkg/storage/etcd3: update test to time out, not panic

Kubernetes-commit: da7f184344d841807c2da88a92ee96e1de32d97b
2022-03-24 21:21:56 +00:00
Kubernetes Publisher 5e6d6631a4 Merge pull request #108569 from mborsz/cont
Implement page size progressing for rare selectors

Kubernetes-commit: cc5bf4a3f480099a6230eb6a33141d4f6d8b1d16
2022-03-24 17:19:39 +00:00
Kubernetes Publisher 610f96c654 Merge pull request #106591 from Kartik494/bumpetcd
Updated Etcd Version to 3.5.1 in go.mod

Kubernetes-commit: 83ee27569e38c057eaed080dc972c8de6aa639c6
2022-03-24 17:19:37 +00:00
Kubernetes Publisher 1f257cb5e8 Merge pull request #108927 from wojtek-t/unify_pf_metrics
Record dropped requests in apiserver_request_total metric

Kubernetes-commit: d9819f05d0154677aee3e643c5498511fabce38a
2022-03-24 17:19:35 +00:00
Kubernetes Publisher 8f16924121 Merge pull request #108553 from kerthcet/fix/race-detected-in-TestErrConnKilled
fix: race detected in TestErrConnKilled

Kubernetes-commit: c956b1a2c40267ace3e626f4ffef546ec396b78d
2022-03-24 17:19:34 +00:00
Kubernetes Publisher b9e1bc9a37 Merge pull request #108936 from stevekuznetsov/skuznets/more-correct-diff
pkg/storage/etcd3: use correct diff in tests

Kubernetes-commit: efdb80dcc61846a802aa233be1374628c5fd84ed
2022-03-24 13:25:08 +00:00
Kubernetes Publisher d6ba1acfea Merge pull request #108935 from stevekuznetsov/skuznets/too-large-rv
pkg/storage/etcd3: refactor "too large" resourceVersions

Kubernetes-commit: 4e6000a40c267e66d9a0b6018cbb6b867cfa811c
2022-03-24 13:25:06 +00:00
Kubernetes Publisher 2b17c30425 Merge pull request #108725 from pohly/klog-flush-and-exit
klog v2.60.1

Kubernetes-commit: 56f45c5c811ba23934915b1a1330d87c58bddf07
2022-03-24 09:22:39 +00:00
Kubernetes Publisher e2e25c864a Merge pull request #108717 from lavalamp/remove-clustername
Remove ClusterName

Kubernetes-commit: bb67b5e9e830fba239c1e7957e5dcbefdce92a37
2022-03-24 09:22:37 +00:00
Stanislav Laznicka cd3019f777 webhooks, aggregation: add metrics to count certs with SHA1 signatures
Extends the certificate attribute deprecation RoundTrippers wrapper with
a checker that counts certificates with sha-1 signatures in server responses.

Non-root non-self-signed SHA-1 certificate signatures were deprecated in
Golang 1.18.

Kubernetes-commit: 499ee65a9b0cd45d41716b513fae0d537f7f9c88
2022-03-24 01:08:02 -04:00
Stanislav Laznicka a0f7d7ad7c webhooks: regenerate certificates for additional sha-1 signatures
Kubernetes-commit: b2c6de170b0b880ccca0ae783bae09559f8dff04
2022-03-25 16:52:40 +01:00
Stanislav Laznicka d98bb60d70 webhooks: gencerts.sh: add intermediate and server certs with sha-1 signatures
Kubernetes-commit: fee08cc580e5147d11f3f12a37452f8a86cee3b8
2022-03-25 16:52:07 +01:00
Kubernetes Publisher 97b274d46f Merge pull request #108191 from ravisantoshgudimetla/wire-cert-contexts
Wire cert contexts

Kubernetes-commit: 14e8db067e93154b2561129724fccabe676876d8
2022-03-24 01:38:46 +00:00
Steve Kuznetsov 42854c1734 pkg/storage/etcd3: be more precise in watch test
Previously, this test assumed that:
 - a global watch would return only an event for the key in question
 - only the delete event in question would be returned

Neither of these assumptions are correct for an etcd backend as long
as any other clients are interacting with the system. This commit
makes the watch more specific and extracts the correct event.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: 2631c0a0f959bd67aa455045dce33e77150ab5f8
2022-03-23 12:59:53 -08:00
Steve Kuznetsov 41c1f65bf6 pkg/storage/etcd3: correctly validate resourceVersions
In a number of tests, the underlying storage backend interaction will
return the revision (logical clock underpinning the MVCC implementation)
at the call-time of the RPC. Previously, the tests validated that this
returned revision was exactly equal to some previously seen revision.
This assertion is only true in systems where no other events are
advancing the logical clock. For instance, when using a single etcd
cluster as a shared fixture for these tests, the assertion is not valid
any longer. By checking that the returned revision is no older than the
previously seen revision, the validation logic is correct in all cases.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: eba25cdbbcc5d35e707516194f64d8ed363c2773
2022-03-23 12:44:49 -08:00
Steve Kuznetsov edb0c0eba4 pkg/storage/etcd3: use correct diff in tests
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: 8903372e8b8d32f8b244f5087e3f2907b86f03bd
2022-03-23 12:33:57 -08:00
Steve Kuznetsov de7922ba23 pkg/storage/etcd3: refactor "too large" resourceVersions
When tests attempt to validate behavior in the case that a client asks
for a resource version that is "too large" for the underlying storage,
the previous implementation would simply add 1 to the latest revision
seen. This is only appropriate for storage backends that
  a) provide a continuous monotonic logical clock
  b) have no other events occurring while the test runs

For instance, when using a singe etcd backend as a shared fixture for
these tests, adding 1 to a previously-seen revision is not suffcient to
ensure that the resulting revision is "too large". By instead using the
largest possible integer value, we can be certain of this.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: b973cdc57cc6ee57684455cdb76db13a8c82cefa
2022-03-23 12:27:16 -08:00
Steve Kuznetsov 25c879eec5 pkg/storage/etcd3: update test to time out, not panic
Without these select statements, this test runs until the package-global
timeout and causes a panic. This change makes the test fail faster and
more legibly.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: fc33d0176a5afb81927430d075165152f953c54e
2022-03-23 12:22:35 -08:00
kerthcet 6316e03e25 fix: race detected in TestErrConnKilled
Signed-off-by: kerthcet <kerthcet@gmail.com>

Kubernetes-commit: dd75d3b9ecca72968bcb7ce50b39ec00e7415b41
2022-03-24 01:48:49 +08:00
Wojciech Tyczyński abc4243fac Record dropped requests in apiserver_request_total metric
Kubernetes-commit: 14396349954be57abea7162d7fe091e58a80ec4b
2022-03-23 16:16:36 +01:00
kartik494 cdbd4fe359 Updated Etcd Version to 3.5.1 in go.mod
Kubernetes-commit: 4285fb547e95ba2850769deaab2b7846af0dc5ec
2022-03-23 11:34:25 +05:30
Kensei Nakada dd6c8444f7 fix the doc about generateName conflict
Kubernetes-commit: 0865b9eca3f36ecb1fe9664c77d5017ca3c79b29
2022-03-23 01:08:37 +00:00
Jiahui Feng d3152849fc add test case for enabled OpenAPIEnums
Kubernetes-commit: 1f493f6f91d0ead75eabd14874900fe6e9ae15f0
2022-03-22 17:58:16 -07:00
Jiahui Feng eb6593d713 OpenAPIEnums: to beta
Kubernetes-commit: cc3643cf791167745c9dfcd7377b7e6a723e152a
2022-03-22 16:36:17 -07:00
Kubernetes Publisher 78e10a1e85 Merge pull request #108383 from tkashem/revert
Revert the revert of #107456 - "apf: change controller to use SSA for patches"

Kubernetes-commit: 9a8defda15e4c34e9c198975968d9619f48a0786
2022-03-22 09:14:03 +00:00
Ross Peoples 8e59f7a725 TimeZone support for CronJobs
Kubernetes-commit: 98837de446fa4fbf441b69eb04da1ca5b66c2095
2022-03-21 11:27:10 -05:00
Kubernetes Publisher 0af8755754 Merge pull request #108826 from astraw99/fix-exist-err
Fix function name of `IsNodeExist` error

Kubernetes-commit: f14d1c9b1ef2b3b332d6b83d10da27fe3855acad
2022-03-21 13:15:51 +00:00
Ikko Ashimine f0eede2023 fix typo in genericapiserver.go
runnning -> running

Kubernetes-commit: a3f66a45977f95274ede281a6994350352b5fd36
2022-03-20 23:29:01 +09:00
astraw99 b0232c830b Fix function name of IsExist err
Kubernetes-commit: 79471695c2a16cb7c1fb17adff7765f07e2c9057
2022-03-19 23:06:51 +08:00
Kubernetes Publisher 4c7efc059c Merge pull request #106155 from enj/enj/i/webhook_rest_config
webhook: use rest.Config instead of kubeconfig file as input

Kubernetes-commit: cd6af9e64b65cb198d633f7c161942b5b9fa155b
2022-03-19 17:46:29 +00:00
Daniel Smith 4861b9e3df review comments
Kubernetes-commit: 17e74b3936c341d2b6eed55570c0ffaabd52d3ad
2022-03-17 21:31:54 +00:00
Daniel Smith 7b0bc4f4b3 remove unneeded references
Kubernetes-commit: 2831f9a343ec405efce60d09da482a654971018e
2022-03-17 18:35:00 +00:00
Daniel Smith cbbb5800c3 find and replace
Kubernetes-commit: e405ae9ec8592bf028e351bab44de420908bac0d
2022-03-17 18:50:38 +00:00
Stephen Kitt 62872e972a Upgrade to blang/semver/v4 v4.0.0
This is the first version to be fully go-mod-compatible.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 080c6c711ebf527d5494732b4b41d074ab02733f
2022-03-17 11:16:06 +01:00
Anish Ramasekar e442eafb33 feat: prepare KMS data encryption for migration to AES-GCM
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
Co-authored-by: Monis Khan <mok@vmware.com>
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 90b42f91fd904b71fd52ca9ae55a5de73e6b779a
2022-03-16 17:54:10 +00:00
David Eads 25c5c2ccf3 Handle panic during validating admission webhook admission
Validating admission webhook evaluation can fail, if uncaught this
crashes a kube-apiserver.  Add handling to catch panic while preserving
the behavior of "must not fail".

Kubernetes-commit: d412bf92b3b02bda93707c6aaba945f28bf60c72
2022-03-16 13:47:32 -04:00
Patrick Ohly 723d4d11c9 klog v2.60.1
The new release supports FlushAndExit and contextual logging.

Kubernetes-commit: 09aa1071cdde5ebc2c931c994fbb1e974c2a1515
2022-03-16 09:03:45 +01:00
Maciej Borsz f4edb394b0 Implement page size progressing for rare selectors.
Kubernetes-commit: a2ad9f9e4aba6aae6657a3189bdced6dbc8ba4b5
2022-03-07 15:44:59 +00:00
Ravi Gudimetla 1ee261d219 API Server Changes
This commit includes all the changes needed for APIServer. Instead of modifying the existing signatures for the methods which either generate or return stopChannel, we generate a context from the channel and use the generated context to be passed to the controllers which are started in APIServer. This ensures we don't have to touch APIServer dependencies.

Kubernetes-commit: 8b84a793b39fed2a62af0876b2eda461a68008c9
2022-03-07 09:20:45 -05:00
Antonio Ojea 00730c9649 apiserver cacher: don't accept requests if stopped
The cacher blocks requests until it is ready, however, the
ready variable doesn't differentiate if the cacher was stopped.

The cacher is using a condition variable based on sync.Cond to
handle the readiness, however, this was not taking into account
if it was not ready because it was waiting to be ready or it was
stopped.

Add a new condition to the condition variable to handle the
stop condition, and returning an error to signal the goroutines
that they should stop waiting and bail out.

Kubernetes-commit: 2cb3a56e83ae33464edb174b1b6373ba50600759
2022-03-03 12:01:59 +01:00
Tim Bannister 8b7169efd9 Update generated docs
Kubernetes-commit: de55f39f655816ecee9ab0b2c3842930cfe332a6
2022-03-01 23:42:36 +00:00
Abu Kashem 11ce69f338 Revert "Merge pull request #107797 from tkashem/revert-107456"
This reverts commit 83ca74541216405323ddfb67f5f80ad5717da826, reversing
changes made to 1c216c6ec86e700170620fe4c75fa3a2a2817530.

Kubernetes-commit: b0b460921b81b260473d5c393d85beeb5a03e834
2022-02-27 13:40:28 -05:00
Maciej Wyrzuc 253e375283 Copy request in timeout handler
Kubernetes-commit: 44705c71401d327c6d596597adc55596973e89d0
2022-02-24 13:42:32 +00:00
Patrick Ohly ba3b8e9322 enhance and fix log calls
Some of these changes are cosmetic (repeatedly calling klog.V instead of
reusing the result), others address real issues:

- Logging a message only above a certain verbosity threshold without
  recording that verbosity level (if klog.V().Enabled() { klog.Info... }):
  this matters when using a logging backend which records the verbosity
  level.

- Passing a format string with parameters to a logging function that
  doesn't do string formatting.

All of these locations where found by the enhanced logcheck tool from
https://github.com/kubernetes/klog/pull/297.

In some cases it reports false positives, but those can be suppressed with
source code comments.

Kubernetes-commit: edffc700a43e610f641907290a5152ca593bad79
2022-02-16 12:17:47 +01:00
Abu Kashem af86802d1a apiserver: stop http server after pre shutdown hooks
Kubernetes-commit: 8d96cc2dfbd650544660e41c5e8efc8d1e1033a3
2022-02-09 16:40:57 -05:00
Abu Kashem 8b827c16cb track latency for http.ResponseWriter.Write
Kubernetes-commit: 1d1a44cf129e1904217a1ed5a09f92c0a28ce11f
2022-02-04 11:36:23 -05:00
Abu Kashem 1b651c5994 add latency tracker for storage and transform
Kubernetes-commit: eca90856940e9251ecf3fde95c5e4d2d16f5ad68
2022-02-01 18:13:03 -05:00
zk ad01c712d9 Update etcdRequestLatency metrics bucket size
Kubernetes-commit: fb372d07982463984dfdab7cf24d937b91b0bb83
2022-01-09 23:45:09 +08:00
Wojciech Tyczyński 8f7c120935 Eliminate MaintainObservations function in P&F
Kubernetes-commit: badf436ac4451590e5e84e537f2234e3632ea3b4
2021-11-25 12:44:50 +01:00
Sally O'Malley 4f9e133507 kubelet tracing
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Co-authored-by: David Ashpole <dashpole@google.com>

Kubernetes-commit: 47e7d8034ff3be8e198dde6a671d05a11c30e333
2021-10-10 09:17:27 -04:00