Commit Graph

4037 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
53c8efbe71 Merge pull request #125743 from benluddy/extract-roundtrip-to-unstructured
Extract RoundtripToUnstructured to apimachinery apitesting library.
2024-07-08 08:22:49 -07:00
Michael Fraenkel
cd949bafa4 use MakePodSpec consistently (#125805)
cleaning up some tests after MakePod/MakePodSpec were introduced
2024-06-30 10:28:36 -07:00
Kubernetes Prow Robot
93d56511e6 Merge pull request #125021 from aojea/servicecidrbeta
KEP-1880 Multiple Service CIDRs: Graduate to Beta (2/2)
2024-06-30 08:53:25 -07:00
Antonio Ojea
0e1f9dadd6 modify components to use the networking v1beta1 API 2024-06-30 09:48:46 +00:00
Michael Fraenkel
a7264f95ff pod terminationGracePeriodSeconds is always valid (#124461)
* Pod terminationGracePeriodSeconds is always valid

Validation of a pod spec will always use the pod's
TerminationGracePeriodSeconds value.

A set of pod test-helpers have been created to help construct Pods.

* remove unused func

* reduction

* reduce 2

* simplify test

* report invalid grace period

* update SupplementalGroupPolicy tests
2024-06-29 18:09:29 -07:00
Kubernetes Prow Robot
ac9aec9f9b Merge pull request #125116 from pohly/dra-one-of-source
DRA: remove "source" indirection from v1 Pod API
2024-06-28 12:46:45 -07:00
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
Antonio Ojea
b04ca186d8 replace the iptree on the ipallocator
ServiceCIDRs are protected by finalizers and the CIDRs fields are
inmutable once set, only the readiness state impact the allocator
as it can only allocate IPs if any of the ServiceCIDR is ready.

The Add/Update events triggers a reconcilation of the current state
of the ServiceCIDR present in the informers with the existing IP
allocators.

The Delete events are handled directly to update or delete the
corresponing IP allocator.
2024-06-27 11:33:36 +00:00
Antonio Ojea
b5cfccbca7 replace iptree on the servicecidr controller 2024-06-27 11:33:36 +00:00
Antonio Ojea
f06b355daf replace iptree on the repairip controller 2024-06-27 11:33:35 +00:00
Ben Luddy
532471618e Extract RoundtripToUnstructured to apimachinery apitesting library.
This will allow the same scenarios to be exercised on types defined in staging modules, like
apiextensions-apiserver, without importing them all from the root module.
2024-06-26 15:02:58 -04:00
Ben Luddy
38f87df0e3 Enable JSON-compatible base64 encoding of []byte for CBOR.
The encoding/json package marshals []byte to a JSON string containing the base64 encoding of the
input slice's bytes, and unmarshals JSON strings to []byte by assuming the JSON string contains a
valid base64 text.

As a binary format, CBOR is capable of representing arbitrary byte sequences without converting them
to a text encoding, but it also needs to interoperate with the existing JSON serializer. It does
this using the "expected later encoding" tags defined in RFC 8949, which indicate a specific text
encoding to be used when interoperating with text-based protocols. The actual conversion to or from
a text encoding is deferred until necessary, so no conversion is performed during roundtrips of
[]byte to CBOR.
2024-06-25 21:05:26 -04: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