Commit Graph

4026 Commits

Author SHA1 Message Date
Patrick Ohly
bde9b64cdf DRA: remove "source" indirection from v1 Pod API
This makes the API nicer:

    resourceClaims:
    - name: with-template
      resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      resourceClaimName: test-shared-claim

Previously, this was:

    resourceClaims:
    - name: with-template
      source:
        resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      source:
        resourceClaimName: test-shared-claim

A more long-term benefit is that other, future alternatives
might not make sense under the "source" umbrella.

This is a breaking change. It's justified because DRA is still
alpha and will have several other API breaks in 1.31.
2024-06-27 17:53:24 +02:00
Kubernetes Prow Robot
f30a87d517
Merge pull request #122832 from benluddy/cbor-fuzz-native-to-unstructured-via
KEP-4222: Add roundtrip tests to Unstructured via CBOR and JSON.
2024-05-30 15:00:31 -07:00
Shingo Omura
552fd7e850
KEP-3619: Fine-grained SupplementalGroups control (#117842)
* Add `Linux{Sandbox,Container}SecurityContext.SupplementalGroupsPolicy` and `ContainerStatus.user` in cri-api

* Add `PodSecurityContext.SupplementalGroupsPolicy`, `ContainerStatus.User` and its featuregate

* Implement DropDisabledPodFields for PodSecurityContext.SupplementalGroupsPolicy and ContainerStatus.User fields

* Implement kubelet so to wire between SecurityContext.SupplementalGroupsPolicy/ContainerStatus.User and cri-api in kubelet

* Clarify `SupplementalGroupsPolicy` is an OS depdendent field.

* Make `ContainerStatus.User` is initially attached user identity to the first process in the ContainerStatus

It is because, the process identity can be dynamic if the initially attached identity
has enough privilege calling setuid/setgid/setgroups syscalls in Linux.

* Rewording suggestion applied

* Add TODO comment for updating SupplementalGroupsPolicy default value in v1.34

* Added validations for SupplementalGroupsPolicy and ContainerUser

* No need featuregate check in validation when adding new field with no default value

* fix typo: identitiy -> identity
2024-05-29 15:40:29 -07:00
Ben Luddy
0600269c1a
Fuzz roundtrip to Unstructured via both JSON and CBOR. 2024-05-29 17:48:10 -04:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
Akihiro Suda
ce1918875f
pod: dropDisabledFields: recognize RecursiveReadOnlyMounts
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-09 09:48:12 +09:00
Kubernetes Prow Robot
cc6d9b3037
Merge pull request #123789 from tallclair/apparmor-warnings
Warn on deprecated AppArmor annotation use
2024-03-07 11:53:54 -08:00
Tim Allclair
7bd78b06e9 Warn on deprecated AppArmor annotation use 2024-03-07 09:51:48 -08:00
HirazawaUi
2867be47b3 followup to allow special characters 2024-03-08 00:08:43 +08:00
Kubernetes Prow Robot
bd25605619
Merge pull request #123435 from tallclair/apparmor-ga
AppArmor fields API
2024-03-06 15:35:14 -08:00
Tim Allclair
2d86cbf261 Separate feature-gate for AppArmor fields 2024-03-06 10:46:32 -08:00
Tim Allclair
0eb5f52d06 Rename AppArmor annotation constants with Deprecated 2024-03-06 10:46:31 -08:00
Kubernetes Prow Robot
2b521e5f8e
Merge pull request #123405 from cici37/vapGA
[KEP-3488]Promote ValidatingAdmissionPolicy to GA
2024-03-05 18:29:53 -08:00
Kubernetes Prow Robot
87f9b3891e
Merge pull request #123385 from HirazawaUi/allow-special-characters
Allow almost all printable ASCII characters in environment variables
2024-03-05 17:31:06 -08:00
cici37
de506ce7ac Promote ValidatingAdmissionPolicy to GA. 2024-03-05 16:00:21 -08:00
Tim Allclair
94927afb50 AppArmor API changes 2024-03-05 12:02:43 -08:00
HirazawaUi
e56240b2e1 add validation method at the top level 2024-03-05 17:09:10 +08:00
Kubernetes Prow Robot
6929a11f69
Merge pull request #123481 from sanposhiho/mindomain-stable
graduate MinDomainsInPodTopologySpread to stable
2024-03-04 17:18:53 -08:00
Kubernetes Prow Robot
e4a14fe0f5
Merge pull request #123575 from Huang-Wei/pod-scheduling-readiness-stable
Graduate PodSchedulingReadiness to stable
2024-03-03 22:29:38 -08:00
Wei Huang
01db4ae9e7
Graduate PodSchedulingReadiness to stable 2024-02-28 23:18:44 -08:00
Shiming Zhang
d303cec118 Update test 2024-02-29 11:48:18 +08:00
Kensei Nakada
58a826a59a graduate MinDomainsInPodTopologySpread to stable 2024-02-28 10:42:29 +00:00
AxeZhan
c74ec3df09 graduate PodLifecycleSleepAction to beta 2024-02-19 19:40:52 +08:00
Kubernetes Prow Robot
fc4d6ac8ea
Merge pull request #121731 from Taction/service-account-token-projected-volume-validation
Fix service account token projected volume validation
2024-01-24 19:51:43 +01:00
liyuerich
e490439262 drop deprecated pointer package
Signed-off-by: liyuerich <yue.li@daocloud.io>
2024-01-24 19:44:07 +08:00
zhangchao
7972f0309c Fix service account token projected volume validation
Signed-off-by: zhangchao <zchao9100@gmail.com>
2024-01-23 23:03:37 +08:00
Kubernetes Prow Robot
745a364422
Merge pull request #120866 from bzsuni/cleanup/sets/api
use generic Set in api
2024-01-22 18:20:48 +01:00
Kubernetes Prow Robot
63eb5028ba
Merge pull request #122339 from carlory/warnning-on-relaim-policy
warning on relaim policy when it is Recycle
2023-12-29 04:39:14 +01:00
Jordan Liggitt
b6e34187ca
Update duplicate env var warning 2023-12-18 10:06:30 -05:00
carlory
85d08833bf warnning on relaim policy when it is Recycle 2023-12-15 17:50:37 +08:00
Taahir Ahmed
1ebe5774d0 kubelet: Support ClusterTrustBundlePEM projections 2023-11-03 11:40:48 -07:00
Taahir Ahmed
ecfdc8fda5 Define ClusterTrustBundlePEM projected volume
This commit defines the ClusterTrustBundlePEM projected volume types.
These types have been renamed from the KEP (PEMTrustAnchors) in order to
leave open the possibility of a similar projection drawing from a
yet-to-exist namespaced-scoped TrustBundle object, which came up during
KEP discussion.

* Add the projection field to internal and v1 APIs.
* Add validation to ensure that usages of the project must specify a
  name and path.
* Add TODO covering admission control to forbid mirror pods from using
  the projection.

Part of KEP-3257.
2023-11-03 11:40:48 -07:00
Humble Chirammal
3890546265 Update APIs and adjust tests
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-11-01 09:28:36 +05:30
carlory
ae90a69677 volumeattributesclass and core api changes 2023-10-31 11:18:56 +08:00
Abu Kashem
430c226709
apiserver: fix lint issue, defaulting and validation test for flowcontrol v1 2023-10-30 08:18:40 -04:00
Paco Xu
36d6917ae1 valid error for creation and update from valid to invalid only
- using an option AllowNamespacedSysctlsForHostNetAndHostIPC

Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-10-28 06:58:54 +08:00
Kubernetes Prow Robot
c73ab5162b
Merge pull request #116507 from sourcelliu/podrequest
Improve performance of method PodRequests
2023-10-26 15:58:16 +02:00
Kensei Nakada
d5d3c26337 feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity 2023-10-18 11:28:02 +00:00
AxeZhan
3a96afdfef implementation 2023-10-15 13:57:48 +08:00
Kubernetes Prow Robot
622509830c
Merge pull request #120716 from xrstf/fix-typos
Fix typos
2023-09-30 00:25:56 -07:00
bzsuni
aa9b2b1696 use generic Set in api
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2023-09-25 19:04:08 +08:00
Christoph Mewes
6e3ebdc68e fix typo Conext => Context 2023-09-17 11:18:43 +02:00
Quan Tian
0fb1f59a88 Improve service unit test failure report
Mark the helper functions with t.Helper() so that if t.Errorf() in these
functions gets called, it will report that the failure occurred on the
line number of the caller of the helper, rather than the line number of
the helper itself, which makes it hard to identify which case causes the
failure.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-09-01 23:18:45 +08:00
Quan Tian
2b69daa960 Allow specifying ExternalTrafficPolicy for ClusterIP Services with ExternalIPs
When defining a ClusterIP Service, we can specify externalIP, and the
traffic policy of externalIP is subject to externalTrafficPolicy.
However, the policy can't be set when type is not NodePort or
LoadBalancer, and will default to Cluster when kube-proxy processes the
Service.

This commit updates the defaulting and validation of Service to allow
specifying ExternalTrafficPolicy for ClusterIP Services with
ExternalIPs.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-08-30 23:56:47 +08:00
Patrick Ohly
2472291790 api: introduce separate VolumeResourceRequirements struct
PVC and containers shared the same ResourceRequirements struct to define their
API. When resource claims were added, that struct got extended, which
accidentally also changed the PVC API. To avoid such a mistake from happening
again, PVC now uses its own VolumeResourceRequirements struct.

The `Claims` field gets removed because risk of breaking someone is low:
theoretically, YAML files which have a claims field for volumes now
get rejected when validating against the OpenAPI. Such files
have never made sense and should be fixed.

Code that uses the struct definitions needs to be updated.
2023-08-21 15:31:28 +02:00
Monis Khan
10fe3da87d
Delete PSP API types and generated clients
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-08-07 16:44:13 -04:00
Tim Hockin
182a4f858a
API warn non-ExternalName services w/ externalName 2023-07-26 15:57:57 -07:00
Tim Hockin
7bd0a857e3
API warn ExternalName services with externalIPs 2023-07-26 15:52:49 -07:00
Kubernetes Prow Robot
18f8cb8398
Merge pull request #118644 from alexzielenski/apiserver/policy/namespaceParamRef
KEP-3488: Promote ValidatingAdmissionPolicy to Beta
2023-07-21 17:44:08 -07:00
Roman Bednar
aa65bab426 implement pv last phase transition time 2023-07-21 20:42:25 +02:00