Commit Graph

4726 Commits

Author SHA1 Message Date
Kubernetes Publisher c55f8b7cef Merge pull request #101707 from enj/enj/i/bad_cadata
client-go transport: assert that final CA data is valid

Kubernetes-commit: 9126048c9c47cc51f15f977da51c6023229a02b5
2021-05-18 11:28:04 +00:00
Abu Kashem 3c7f54740f apf: add plumbing to estimate width" of a request
- add plumbing that allows us to estimated "width" of a request
- the default implementation returns 1 as the "width" of all
  incoming requests, this is in keeping with the current behavior.

Kubernetes-commit: 9b72eb1929a64b9d5a5234090a631ba312fb4d41
2021-05-11 07:03:05 -04:00
Abu Kashem ec22c8bdd8 apf: add "width" for request
all requests have a width of 1 to maintain current behavior.

Kubernetes-commit: b50507d98bd12503592ea62d2be2aadef49bdf70
2021-05-11 07:03:05 -04:00
Kir Kolyshkin c2901b339f vendor: bump runc to rc94
One notable change is cgroup manager's Set now accept Resources rather
than Cgroup (see https://github.com/opencontainers/runc/pull/2906).
Modify the code accordingly.

Also update runc dependencies (as hinted by hack/lint-depdendencies.sh):

	github.com/cilium/ebpf v0.5.0
	github.com/containerd/console v1.0.2
	github.com/coreos/go-systemd/v22 v22.3.1
	github.com/godbus/dbus/v5 v5.0.4
	github.com/moby/sys/mountinfo v0.4.1
	golang.org/x/sys v0.0.0-20210426230700-d19ff857e887
	github.com/google/go-cmp v0.5.4
	github.com/kr/pretty v0.2.1
	github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kubernetes-commit: b49744f177087173d43d7771588d83b9df5a3c0b
2021-05-10 18:12:04 -07:00
sanwishe 1b6c1bf2dd Structured Logging migration: for package staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates
Signed-off-by: sanwishe <jiang.mingzhi35@zte.com.cn>

Kubernetes-commit: 6eb645088c41f5f9309ad27a3fe80ccebd18460d
2021-05-10 20:08:14 +08:00
Maciej Borsz 770eb2bc44 Update watcher.go
Kubernetes-commit: 532e35ba31e4df0a2df7dd5f2930035ce9379559
2021-05-07 16:07:34 +02:00
wojtekt 5290a24345 Implement support for watch initialization in P&F
Kubernetes-commit: 0cc217647ca8be0820973b970124a072c27b6575
2021-05-07 12:49:06 +02:00
pacoxu e11aa23b6b wait for poststarthook/max-in-flight-filter to be initialized asynchronously
Signed-off-by: pacoxu <paco.xu@daocloud.io>

Kubernetes-commit: 3c4eb55b4acd4bc4740b15a58fc7da0d5b516300
2021-05-07 15:17:03 +08:00
Monis Khan 5289a15a1a client-go transport: assert that final CA data is valid
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 440ea3ef49e0ac77353ceeaebc2aad6c995d5b35
2021-05-03 10:11:54 -04:00
Kubernetes Publisher 0abfd35982 Merge pull request #95396 from stlaz/x509_cn_error_metrics
webhooks,aggregation: add metrics to count certs missing SAN

Kubernetes-commit: 96e4e953978416e164e001abd2c607ce357fdd46
2021-05-18 11:28:01 +00:00
Kubernetes Publisher ba14a28ef3 Merge pull request #101484 from tkashem/apf-queueset-use-list
apf: use a list instead of slice for queueset

Kubernetes-commit: a108dc498be8c745cbf01ae072389fbae11fb970
2021-05-18 11:27:58 +00:00
Kubernetes Publisher b10515a636 Merge pull request #100218 from aojea/unitflakes1
unit test using metrics must reset the global registry

Kubernetes-commit: 6850e0abf24fd115cd26853559247861820b5670
2021-05-18 11:27:56 +00:00
Kubernetes Publisher 664c22f9f6 Merge pull request #101509 from thinpark/park
[k8s.io/apiserver/pkg/endpoints/discovery/]: improve readability

Kubernetes-commit: ce5ce8e290ae140bc8d4838a377f99052d592191
2021-05-18 11:27:53 +00:00
Jordan Liggitt 8dd82c2391 Add WarningsOnCreate,WarningsOnUpdate
Kubernetes-commit: 8c8a4cf3e4a18e97359ce750530a4fa27bbd3b88
2021-04-30 21:46:54 -04:00
pacoxu d636703205 Default StreamingProxyRedirects to disabled
Signed-off-by: pacoxu <paco.xu@daocloud.io>

Kubernetes-commit: 2eb90f9b80982d31efa971450ea7ac60359f9442
2021-04-30 14:07:43 +08:00
Kubernetes Publisher b9ce58c2ef Merge pull request #101611 from p0lyn0mial/fix-fieldmanager-admission-metadata
let objects without metadata pass through the managedFields admission controller

Kubernetes-commit: db2c109a14e9847da5fde58deb723dd8402aaa2c
2021-04-29 06:50:50 -07:00
Lukasz Szaszkiewicz a9e68c9b32 let objects without metadata pass through the managedFields admission controller
Not all objects provide metadata. There might be extention servers that allow for creating objects without the metadata field.

This PR changes the managedFileds admission to deal with objects without the metadata field.
Object without that field will be passed directly to the wrapped admission controller for further validation.

Kubernetes-commit: 3dbaf305ae1e52105a338987f3770ff104def68b
2021-04-29 14:08:36 +02:00
Kubernetes Publisher 28df761863 Merge pull request #101532 from stevekuznetsov/skuznets/wrap-admission-error-reasons
apiserver: wrap errors in admission with context

Kubernetes-commit: 50e319767cc4aad5c6ff56a8d002c406cdcc3e0e
2021-05-18 11:27:49 +00:00
Mengxue Zhang 15750850e0 specify pod name and hostname in indexed job
Kubernetes-commit: e64e34e0298d27d4099b632f5b7c1ba38fc66561
2021-04-29 03:33:36 +00:00
Steve Kuznetsov 8c01d7fe18 apiserver: wrap errors in admission with context
When the API server encounters an error during admission webhook
handling, lower-level errors are bubbled up without any additional
context added. This leads to fairly opaque and unintelligible errors. It
is not clear to users if the API server itself is having an error (for
instance, fetching the REST client) or if the request to the webhook
failed in some way.

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

Kubernetes-commit: ae9e71ba68cb1dd00bb5ed2635bac9aab2abbafe
2021-04-27 11:19:01 -07:00
Kubernetes Publisher f9a92cec2f Merge pull request #95387 from JAORMX/logperms
Ensure audit log permissions are restricted

Kubernetes-commit: b81a36021f0a6d3d4944c3aba779e0174955515c
2021-05-18 11:27:46 +00:00
Kubernetes Publisher 16ed1713d9 Merge pull request #100139 from Jefftree/ssa-ga2
Promote SSA GA

Kubernetes-commit: 6067d8556a017102fcd92c6a06738524c36847a9
2021-05-18 11:27:44 +00:00
Kubernetes Publisher 9427d805d6 Merge pull request #99452 from xiaoanyunfei/bugfix/legacy_user-agent
add user-agent for audit log format legacy

Kubernetes-commit: 0da2e97ac112baaf9c2d8d723f7c4805f57dd363
2021-05-18 11:27:40 +00:00
Kubernetes Publisher b8afabd522 Merge pull request #101357 from feiskyer/update-vendor
Update Azure Go SDK version to v53.1.0

Kubernetes-commit: 253685779f15d2bf1ebf8354474761752edd8d6e
2021-05-18 11:27:38 +00:00
Zhou Peng c233874954 [k8s.io/apiserver/pkg/endpoints/discovery/]: improve readability
Do not wrap code here

Signed-off-by: Zhou Peng <p@ctriple.cn>

Kubernetes-commit: 95f7b4d8544eeba0bc06122b1a35db1ab603f19d
2021-04-27 13:55:31 +08:00
Chao Xu 8f650d1e76 Move the comment to the right line
Kubernetes-commit: 6001c70c7274d88b566ac3ff40e4f8900cc23c54
2021-04-23 00:05:15 +00:00
Chao Xu 218926b065 Switch the order of adding SNICert and creating LoopbackClientConfig
Kubernetes-commit: 1df4503b859a2b7b2b7f9c5bcf400f61cc29d349
2021-04-22 23:17:39 +00:00
Pengfei Ni df1dd422c7 Update Azure Go SDK version to v53.1.0
Kubernetes-commit: bee44da7a258bbe3996ad3cc38d905ae9a28271e
2021-04-22 11:45:39 +08:00
Kubernetes Publisher e25550bce3 Merge pull request #101119 from BinacsLee/binacs-cmd-reuse-function
code cleanup: Abstract repetitive codes in `cmd` as a function

Kubernetes-commit: ed4fa17d01545b33562aea91b7f3487a872bf8fb
2021-05-18 11:27:35 +00:00
BinacsLee 9e0dad9438 code cleanup: Abstract repetitive codes in cmd as a function
Kubernetes-commit: 75dde4dce4d5e9825490d9e77329b73501529a39
2021-04-22 22:34:50 +08:00
Kubernetes Publisher 1a1fa2aa6b Merge pull request #98377 from nodo/scale-ownership-tracking-deployment
Track ownership of scale subresource

Kubernetes-commit: f1e51ceb3c58da272bc0fc68e200db6fd12121dd
2021-05-18 11:27:31 +00:00
Andrea Nodari ca3910bf4a Add nil path to mapping when a CR has no "scale" subresource
This is to prevent the ScaleHandler to drop the entry. In this way
entries just get ignored.

Kubernetes-commit: 5b666a61a170f61c7e223085478b24a03612fa99
2021-04-18 13:55:15 +02:00
mozillazg eca89e844c Fix staticcheck failures for vendor/k8s.io/apiserver/pkg/registry/rest/resttest
Kubernetes-commit: 92ece853be2969fd8f9716434c8fb062e1ebef9b
2021-04-17 16:07:19 +08:00
Dinghua Li a2b831d599 Extend the max of admission latency buckets to 10s.
Kubernetes-commit: 2dbdfd0902e2625d40f338fdbb814ada63720d32
2021-04-17 00:59:25 +00:00
Dinghua Li bbc089727a Add a namespace label to admission metrics.
Kubernetes-commit: e7db88b0b65cf685ccae804ff2d073169ed9637e
2021-04-17 00:58:11 +00:00
caozhiyuan 5a479e600e fix hardcoding and format error log
Kubernetes-commit: c468a02718402bf42ffc0cd8cdbdf805fdf903a2
2021-04-14 20:19:41 +08:00
卢振兴10069964 549cbbf8de fix broken link in some files
Kubernetes-commit: b29a5fb0746f772b38da570cd8fdc77396ffca31
2021-04-13 08:43:24 +08:00
Abu Kashem b84fa01322 add more context to post timeout request activities
Kubernetes-commit: 66587afb60b10569aa4ed35d53a4a91fcc40abd2
2021-04-09 12:09:35 -04:00
Andrea Nodari a178a9c5d1 Drop managed fields entries with unknown fields
This is aligned to the behaviour of server-side apply on main resources.

Kubernetes-commit: c10dd884c494734d12aceb41daaccd1d8da9356b
2021-04-09 17:17:23 +02:00
Andrea Nodari 9c3786c066 Do not add managed fields if a scale entry doesn't own replicas
This happens when a request changes the .status.replicas but not
.spec.replicas

Kubernetes-commit: 8e4b5c849b67b3a12dbd63391a4e75234382ba2c
2021-04-04 19:05:45 +02:00
Jordan Liggitt 689a6cc12f Graduate WarningHeader feature to GA
Kubernetes-commit: e3ea169d7d8b2c1417ef5a71ee1015f186ca0e3c
2021-04-01 02:51:48 -04:00
Jordan Liggitt 754e90a0a3 Promote apiserver_requested_deprecated_apis metric to stable
Kubernetes-commit: 7877539e3095669629e81633019836d2cdb7c368
2021-05-11 16:24:58 -04:00
Abu Kashem 4e12e0cd34 apf: use a list instead of slice for queueset
Kubernetes-commit: 69f9bc181f155ded7c5d5cc0ca9f026a6b42f431
2021-03-29 11:31:12 -04:00
Antonio Ojea 04c8c14809 admission metrics reset metrics after tests
Kubernetes-commit: b1a81d2fb8b4528172a8de6de01b53526b7b2277
2021-03-13 21:26:22 +01:00
JUN YANG 2a99e7e764 Fix misspelling of condition.
Signed-off-by: JUN YANG <yang.jun22@zte.com.cn>

Kubernetes-commit: 6c566f6dfa5b76d105ce24b3b0cb7f5e3d50d018
2021-03-14 00:17:58 +08:00
Andrea Nodari 8c0975e184 Check request info when updating managed fields during scale
- Test all versions to make sure each resource version is in the
  mappings
- Fail when request info contains an unrecognized version. We have tests
  that guarantee that all known versions are in the mappings. If we
  get a version in request info that is not there we should fail fast to
  prevent inconsistent behaviour (e.g. for some reason the mappings is
  not up to date).

Ensure all known versions are in mappings

Kubernetes-commit: 09649e58b5a1368929e194991a763afc8011795e
2021-03-11 16:51:46 +01:00
Antoine Pelisse ddd271ff4e Use ScaleHandler for all scalable resources
Kubernetes-commit: 816e80206c169006de9d0a76cd385ee31c5aff39
2021-03-11 11:05:05 -08:00
Jefftree 285024a6b7 Promote SSA GA
Kubernetes-commit: 94cf48a2d16d7eaa915b7f685746a0e63870d5ff
2021-03-11 06:40:43 -08:00
David Eads 526d12c09b prevent mutation of deletion options during delete collection
Kubernetes-commit: 649b87aaf85dbb6e8190bf7d16c5dc903b5ecedc
2021-03-10 15:41:03 -05:00
Margo Crawford 6c62752c02 This introduces an Impersonate-Uid header to server side code.
UserInfo contains a uid field alongside groups, username and extra.
This change makes it possible to pass a UID through as an impersonation header like you
can with Impersonate-Group, Impersonate-User and Impersonate-Extra.

This PR contains:

* Changes to impersonation.go to parse the Impersonate-Uid header and authorize uid impersonation
* Unit tests for allowed and disallowed impersonation cases
* An integration test that creates a CertificateSigningRequest using impersonation,
  and ensures that the API server populates the correct impersonated spec.uid upon creation.

Kubernetes-commit: 74f5ed6b17287100b339a2b3a43fd4c6fb200978
2021-03-04 15:19:52 -08:00