Commit Graph

5356 Commits

Author SHA1 Message Date
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
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
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
Monis Khan 2d35015235 webhook: use rest.Config instead of kubeconfig file as input
This change updates the generic webhook logic to use a rest.Config
as its input instead of a kubeconfig file.  This exposes all of the
rest.Config knobs to the caller instead of the more limited set
available through the kubeconfig format.  This is useful when this
code is being used as a library outside of core Kubernetes. For
example, a downstream consumer may want to override the webhook's
internals such as its TLS configuration.

Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: fef7d0ef1e1fbff65e8d445256036704bb9dbcbd
2021-07-23 11:15:47 -04:00
Kubernetes Publisher c237789502 Merge pull request #108644 from Jefftree/googleapis-gnostic
googleapis/gnostic -> google/gnostic and update kube-openapi

Kubernetes-commit: b195a64d45e1880878a22d178055f1b4220dcb43
2022-03-17 02:46:20 +00:00
Kubernetes Publisher aef041adda Merge pull request #108419 from DangerOnTheRanger/cel-maxlength-integration
CEL MaxLength integration

Kubernetes-commit: 1d7599b56c827d396707b2d1744e7bc27fd88763
2022-03-16 22:19:28 +00:00
Jefftree 9b81dbc7e0 googleapis/gnostic -> google/gnostic
Kubernetes-commit: 8a1d5947ad34ba275192341baa4e5fef8e6c7f24
2022-03-15 20:36:21 -07:00
Kubernetes Publisher de6ba2aa0a Merge pull request #108394 from ialidzhikov/cleanup/warningheaders
Remove the WarningHeaders feature gate

Kubernetes-commit: 162f8d5bac870d41bbc63dbeb4922b4eab1b8800
2022-03-16 02:19:21 +00:00
Kubernetes Publisher db08da52f2 Merge pull request #108448 from ialidzhikov/cleanup/deserialization-cache-size
apiserver: Remove the deprecated `--deserialization-cache-size` flag

Kubernetes-commit: 6224458dc2440b580012434ea1ed951af98d86f3
2022-03-15 22:17:58 +00:00
Kubernetes Publisher d4fbf7fd3a Merge pull request #108214 from stevekuznetsov/skuznets/lease-manager-fix
storage: etcd: clarify lease manager configurations

Kubernetes-commit: faa027ca2b3605932ae319f13c1a9f150f755a47
2022-03-14 22:18:48 +00:00
Kubernetes Publisher 93a1162c9f Merge pull request #108643 from liggitt/cobra
Update cobra to v1.4.0

Kubernetes-commit: 9d512581b85ae8f2f315e042ed4bfc76d921bfb4
2022-03-11 06:18:04 +00:00
Jordan Liggitt 6ebace3af1 Update cobra to v1.4.0
Kubernetes-commit: 60b9af476f7f01f47396e4ddd491f66931159597
2022-03-10 16:19:43 -05:00
Kubernetes Publisher 66a171df29 Merge pull request #108631 from jupblb/b223652793
Remove apf_fd from httplog

Kubernetes-commit: e9af39914797d40766b166e18dac3a441a2bf5d4
2022-03-10 05:49:35 -08:00
jupblb c0c615eb7a Remove apf_fd from httplog
Since flowDistinguisher may hold data identifying a user accessing the
cluster this can be a source of a PII leak.

Kubernetes-commit: 94c92f78e5b02c27502f3b9d59b4e194e476a6f4
2022-03-10 12:59:00 +01:00
Kubernetes Publisher 433db7935a Merge pull request #108252 from wojtek-t/avoid_object_deep_copies
Avoid deep-copying object when possible on kube-apiserver watch path

Kubernetes-commit: 9946b5364e8199ac832161e17155bd005c391fc5
2022-03-09 10:17:30 +00:00
Kubernetes Publisher 687956beed Merge pull request #108092 from carlory/fix-98035
remove audit.k8s.io/v1[alpha|beta]1 versions

Kubernetes-commit: 19762408612e49401aa46d8396c7032462fe5ab0
2022-03-08 10:17:53 +00:00
ialidzhikov 38f395ca57 apiserver: Remove the deprecated `--deserialization-cache-size` flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>

Kubernetes-commit: ee2530ffd4db0cdc8384f7d4acb014e79bb224e9
2022-03-02 15:33:21 +02:00
ialidzhikov ab1e9afa59 Remove the WarningHeaders feature gate
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>

Kubernetes-commit: 55ee738f5755a27513e83405b5934f1710d96c8e
2022-02-28 19:07:23 +02:00