Commit Graph

3197 Commits

Author SHA1 Message Date
Monis Khan
735bbc135c
Clean up formatting
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-03-30 16:38:15 -04:00
Taahir Ahmed
51f759aa05 ClusterTrustBundles: kube-apiserver integration tests 2023-03-15 20:19:48 -07:00
Taahir Ahmed
6a75e7c40c ClusterTrustBundles: Define types
This commit is the main API piece of KEP-3257 (ClusterTrustBundles).

This commit:

* Adds the certificates.k8s.io/v1alpha1 API group
* Adds the ClusterTrustBundle type.
* Registers the new type in kube-apiserver.
* Implements the type-specfic validation specified for
  ClusterTrustBundles:
  - spec.pemTrustAnchors must always be non-empty.
  - spec.signerName must be either empty or a valid signer name.
  - Changing spec.signerName is disallowed.
* Implements the "attest" admission check to restrict actions on
  ClusterTrustBundles that include a signer name.

Because it wasn't specified in the KEP, I chose to make attempts to
update the signer name be validation errors, rather than silently
ignored.

I have tested this out by launching these changes in kind and
manipulating ClusterTrustBundle objects in the resulting cluster using
kubectl.
2023-03-15 20:10:18 -07:00
Patrick Ohly
fec5233668 api: resource.k8s.io PodScheduling -> PodSchedulingContext
The name "PodScheduling" was unusual because in contrast to most other names,
it was impossible to put an article in front of it. Now PodSchedulingContext is
used instead.
2023-03-14 10:18:08 +01:00
Jiahui Feng
501976cc34 fix broken tests after dependency injection. 2023-03-13 14:40:47 -07:00
Kubernetes Prow Robot
cd56332d06
Merge pull request #116501 from mattcary/ss-beta
Graduate StatefulSetAutoDelete to beta
2023-03-13 19:31:20 -07:00
Matthew Cary
1d6df8233c Graduate StatefulSetAutoDelete to beta
Change-Id: Iee385580d313c69fbb8a893eb5c165aa0b75725d
2023-03-13 17:09:29 -07:00
Kubernetes Prow Robot
9c5eebaf3f
Merge pull request #115879 from mtardy/scdeny-warning
`SecurityContextDeny` admission plugin: add warning on creation
2023-03-13 07:02:48 -07:00
mtardy
36a2156033 Add a SecurityContextDeny feature gate disabled by default
Put plugin registration behind the feature gate.
2023-03-13 10:18:08 +01:00
Todd Neal
4096c9209c dedupe pod resource request calculation 2023-03-09 17:15:53 -06:00
Maksim Nabokikh
c1431af4f8
KEP-3325: Promote SelfSubjectReview to Beta (#116274)
* Promote SelfSubjectReview to Beta

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Fix whoami API

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Fixes according to code review

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

---------

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2023-03-08 15:42:33 -08:00
torredil
6aebda9b1e Remove AWS legacy cloud provider + EBS in-tree storage plugin
Signed-off-by: torredil <torredil@amazon.com>
2023-03-06 14:01:15 +00:00
Vinay Kulkarni
76962b0fa7 In-place Pod Vertical Scaling - API changes
1. Define ContainerResizePolicy and add it to Container struct.
 2. Add ResourcesAllocated and Resources fields to ContainerStatus struct.
 3. Define ResourcesResizeStatus and add it to PodStatus struct.
 4. Add InPlacePodVerticalScaling feature gate and drop disabled fields.
 5. ResizePolicy validation & defaulting and Resources mutability for CPU/Memory.
 6. Various fixes from code review feedback (originally committed on Apr 12, 2022)
KEP: /enhancements/keps/sig-node/1287-in-place-update-pod-resources
2023-02-24 17:18:04 +00:00
mtardy
5049382a81 Scdeny admission plugin: add warning on register 2023-02-19 13:09:21 +01:00
SataQiu
b9e5f5ad2f using const systemNodeRoleName instead of string system:node 2023-02-13 14:22:28 +08:00
Kubernetes Prow Robot
76e881d4d5
Merge pull request #114817 from TommyStarK/plugin-pkg-admission/replace-deprecated-pointer-function
plugin/pkg/admission: Replace deprecated pointer function
2023-01-04 14:30:44 -08:00
TommyStarK
d570ab8bc5 plugin/pkg/admission: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-04 14:12:32 +01:00
SataQiu
bc4a13bd74 remove heapster rule from system:controller:horizontal-pod-autoscaler clusterrole 2023-01-04 16:28:42 +08:00
Jordan Liggitt
78cb3862f1
Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05:00
Daniel Smith
8100efc7b3 Enable propagration of HasSynced
* Add tracker types and tests
* Modify ResourceEventHandler interface's OnAdd member
* Add additional ResourceEventHandlerDetailedFuncs struct
* Fix SharedInformer to let users track HasSynced for their handlers
* Fix in-tree controllers which weren't computing HasSynced correctly
* Deprecate the cache.Pop function
2022-12-14 18:43:33 +00:00
Kubernetes Prow Robot
6edb35d63e
Merge pull request #114116 from jsafrane/fix-pvc-autodelete
Fix OwnerReferencesPermissionEnforcement complaints when autodeleting PVCs
2022-12-10 06:04:40 -08:00
Kubernetes Prow Robot
8814b99bfa
Merge pull request #111576 from inosato/remove-ioutil-from-auth-plugin
Remove ioutil from auth plugin
2022-12-09 15:42:07 -08:00
Kubernetes Prow Robot
da8a78ebd2
Merge pull request #113267 from hoskeri/cleanup-kubelet-admin-role
Remove unused RBAC rule from system:kubelet-api-admin
2022-12-09 14:33:33 -08:00
Jan Safranek
ebc5b208ae Fix OwnerReferencesPermissionEnforcement complaints when autodeleting PVCs
When StatefulSetAutoDeletePVC feature gate is enabled, StatefulSet
controller updates ownerReferences on managed PVCs. To be able to pass
OwnerReferencesPermissionEnforcement admission, it must have permissions to
delete PVCs.
2022-11-24 14:46:45 +01:00
Kubernetes Prow Robot
d1c0171aed
Merge pull request #111023 from pohly/dynamic-resource-allocation
dynamic resource allocation
2022-11-11 16:21:56 -08:00
Ed Bartosh
ae0f38437c kubelet: add support for dynamic resource allocation
Dependencies need to be updated to use
github.com/container-orchestrated-devices/container-device-interface.

It's not decided yet whether we will implement Topology support
for DRA or not. Not having any toppology-related code
will help to avoid wrong impression that DRA is used as a hint
provider for the Topology Manager.
2022-11-11 21:58:03 +01:00
Patrick Ohly
d2ff210c20 scheduler: add dynamic resource allocation plugin
The plugin handles the interaction with ResourceClaims that are referenced by a
Pod.
2022-11-11 21:58:03 +01:00
Jan Safranek
6005c3b512 Remove OpenStack cloud provider
And keep OpenStack Cinder CSI translation
2022-11-11 12:04:55 +01:00
Patrick Ohly
0133df3929 kube-controller-manager: add ResourceClaim controller
The controller uses the exact same logic as the generic ephemeral inline volume
controller, just for inline ResourceClaimTemplate -> ResourceClaim.

In addition, it supports removal of pods from the ReservedFor field when those
pods are known to not need the claim anymore. At the moment, only this special
case is supported. Removal of arbitrary objects would imply granting full read
access to all types to determine whether a) an object is gone and b) if the
current incarnation is the one which is listed in ReservedFor. This may get
added later.
2022-11-10 20:23:50 +01:00
Jan Safranek
5b284a50b7 Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae9.
2022-11-10 18:25:30 +01:00
Michal Wozniak
ac4da3f437 Add the "patch" permission to the "pods/status" unconditionally 2022-11-09 11:56:27 +01:00
Michal Wozniak
c803892bd8 Enable the feature into beta 2022-11-09 09:02:40 +01:00
Jordan Liggitt
dac0306596
Deflake limitrange singleflight test 2022-11-08 09:28:21 -05:00
Kubernetes Prow Robot
595ea32411
Merge pull request #113314 from cici37/celIntegration
CEL validation in Admission chain
2022-11-07 17:08:33 -08:00
Cici Huang
c8a089de46 Update admission initializers.
Moved RestMapper and add DynamicClient
2022-11-07 21:24:46 +00:00
Michal Wozniak
6f54848fa0 Fix disruption controller permissions to allow patching pod's status 2022-11-03 10:19:22 +01:00
Abhijit Hoskeri
9f2ac979ae Remove unused RBAC rule from system:kubelet-api-admin
cd54bd94e9 removes the
handlers for /spec from the kubelet server.

Cleanup the RBAC rules as well.

Change-Id: Id6befbcacec27ad383e336b7189289f55c1c0a68
2022-10-21 11:57:07 -07:00
aimuz
bd441d0a58
Fixed: 22422 use singleflight to alleviate simultaneous calls to
Signed-off-by: aimuz <mr.imuz@gmail.com>
2022-10-22 00:16:27 +08:00
danishprakash
f10f4d372c
pv_controller: update tests for multiple storageclasses
Signed-off-by: danishprakash <grafitykoncept@gmail.com>
2022-10-19 09:33:44 +05:30
danishprakash
f12325add3
pkg/admission/storageclass: pick random storageclass if >1 present
Signed-off-by: danishprakash <grafitykoncept@gmail.com>
2022-10-19 09:30:48 +05:30
Kubernetes Prow Robot
525280d285
Merge pull request #112643 from SergeyKanzhelev/removeDynamicKubeletConfig
remove DynamicKubeletConfig feature gate from the code
2022-10-12 01:33:00 -07:00
Jordan Liggitt
dd0910691f
Move root approvers to subdirs 2022-10-10 13:43:03 -04:00
Jordan Liggitt
b8b86bb2e1
Sort subdir OWNERS files 2022-10-10 08:31:43 -04:00
Jordan Liggitt
04b178b49b
Make root approval non-recursive 2022-10-10 08:26:53 -04:00
Han Kang
db13f51db9 enable health check SLI metrics for apiserver
Change-Id: I1b43e6dfea35b8c3bfdf5daaa8b42adff2fbc786
2022-09-27 09:58:54 -07:00
Sergey Kanzhelev
39e49a91d7 remove DynamicKubeletConfig feature gate from the code 2022-09-23 23:14:19 +00:00
Michal Wozniak
bb561e0324 Fix controller policy and improve logging of related errors
Improve error logging from timed workers which are used for pod eviction

Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com>
2022-09-23 16:53:32 +02:00
m.nabokikh
00dfba473b Add auth API to get self subject attributes
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2022-09-14 18:00:26 +02:00
cndoit18
ec43037d0f style: remove redundant judgment
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2022-08-25 12:07:36 +08:00
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -04:00