Commit Graph

3826 Commits

Author SHA1 Message Date
Hemant Kumar
2e217e8cea Reduce duplication between helpers for checking featuregate 2023-07-17 15:34:45 -04:00
Hemant Kumar
137474e283 Fix validation options for old pvc
Also update comments on allocatedresourcestatuses fields
2023-07-17 15:30:36 -04:00
Hemant Kumar
f01a1faa8c Update comments about allocatedResourceStatus
Update API types with more comments
2023-07-17 15:30:36 -04:00
Hemant Kumar
6a780f57ce Update generated data 2023-07-17 15:30:36 -04:00
Hemant Kumar
e011187114 Update code to use new generic allocatedResourceStatus field 2023-07-17 15:30:35 -04:00
Aohan Yang
7c6e399b22 Generated code for IP mode field 2023-07-17 16:01:59 +08:00
Aohan Yang
e6863757f4 Add IP mode field 2023-07-17 15:51:40 +08:00
Kubernetes Prow Robot
8a0ea1bd58
Merge pull request #109616 from wzshiming/feat/pod-host-ips
Field `status.hostIPs` added for Pod
2023-07-15 00:31:04 -07:00
Cici Huang
13172cba5c
ValidatingAdmissionPolicy: support namespace access (#118267)
* Support namespace access from cel expression in validatingadmissionpolicy.

* Whitelist the exposed fields in namespace object and add test

* better handling of cluster-scoped resources.

* [API REVIEW] namespaceObject in Expression doc.

* compatibility with composition.

* generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh

* workaround namespace of namespace is unexpectedly set.

* basic test coverage for namespaceObject.

---------

Co-authored-by: Jiahui Feng <jhf@google.com>
2023-07-14 17:53:08 -07:00
Shiming Zhang
3e2a1a7b9c Regenerate 2023-07-14 09:43:16 +08:00
Shiming Zhang
14b09c414a Add DownwardAPI validation for status.hostIPs 2023-07-14 09:35:31 +08:00
Shiming Zhang
bf030fd68a Add validate HostIPs 2023-07-14 09:35:30 +08:00
Shiming Zhang
267e76a66e Add status.hostIPs in validEnvDownwardAPIFieldPathExpressions 2023-07-14 09:35:30 +08:00
Shiming Zhang
c287943bdd Add status.hostIPs in ConvertDownwardAPIFieldLabel 2023-07-14 09:35:30 +08:00
Shiming Zhang
7a81ef6406 Add fuzzer for PodStatus 2023-07-14 09:35:30 +08:00
Shiming Zhang
e061143de7 Add HostIPs field and update PodIPs field 2023-07-14 09:35:30 +08:00
Mike Spreitzer
ce90eb2cc2 Fix validation to use field.Forbidden instead of Required
Co-authored-by: David Eads <deads2k@users.noreply.github.com>
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:02:28 +00:00
Abu Kashem
3754d2da20 apf: allow admin to change the Exempt field only of the exempt pl
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:01:29 +00:00
Abu Kashem
f8e4e8abac apf: add validation to exempt for borrowing
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:01:09 +00:00
Mike Spreitzer
f78d6062eb Update generated code for APF borrowing by exempt
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 01:00:06 +00:00
Mike Spreitzer
a9d8cace1f Fix AutoUpdateAnnotationKey, NominalConcurrencyShares
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-14 00:47:58 +00:00
Abu Kashem
3d3240c8b4 apf: add API changes for borrowing by exempt pl 2023-07-14 00:47:28 +00:00
Jiahui Feng
b635f2a401
ValidatingAdmissionPolicy: Variable Composition (#118642)
* [API REVIEW] Variable Composition

* lazy map.

* variable composition implementation.

* check variables during VAP validation.

* generated: ./hack/update-vendor.sh

* generated: UPDATE_COMPATIBILITY_FIXTURE_DATA

(cd staging/src/k8s.io/api/ && env UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test)

* cost calucation.

* tests for cost calculations.

* e2e test for variables.

* fix doc for Validation.Expression.

* generated: ./hack/update-codegen.sh

* fix missing utilruntime import.

* generated: ./hack/update-openapi-spec.sh
2023-07-13 17:13:28 -07:00
Kubernetes Prow Robot
fc798a8dc1
Merge pull request #118520 from jpbetz/validate-unique
Add merge map key validation to StorageVersions
2023-07-13 14:43:49 -07:00
Kubernetes Prow Robot
a9e40bd7c6
Merge pull request #114307 from rphillips/promote_probe_termination_grace_period
ProbeTerminationGracePeriod promote to GA
2023-07-13 13:41:38 -07:00
Kubernetes Prow Robot
3f1704dfbd
Merge pull request #119296 from pohly/dra-pod-resource-claim-status-validation
dra API: ensure that pod status contains no duplicate resource claims
2023-07-13 12:39:49 -07:00
Patrick Ohly
ddc0d94790 dra API: ensure that pod status contains no duplicate resource claims
This is a follow-up to https://github.com/kubernetes/kubernetes/pull/117351
which just got merged.
2023-07-13 18:41:40 +02:00
dprotaso
610509fedd Update standard app protocols
Add websocket support - see https://github.com/kubernetes/enhancements/pull/3996
2023-07-12 08:28:50 -04:00
Patrick Ohly
0fc62d5ded dra: generated files 2023-07-11 14:23:48 +02:00
Patrick Ohly
444d23bd2f dra: generated name for ResourceClaim from template
Generating the name avoids all potential name collisions. It's not clear how
much of a problem that was because users can avoid them and the deterministic
names for generic ephemeral volumes have not led to reports from users. But
using generated names is not too hard either.

What makes it relatively easy is that the new pod.status.resourceClaimStatus
map stores the generated name for kubelet and node authorizer, i.e. the
information in the pod is sufficient to determine the name of the
ResourceClaim.

The resource claim controller becomes a bit more complex and now needs
permission to modify the pod status. The new failure scenario of "ResourceClaim
created, updating pod status fails" is handled with the help of a new special
"resource.kubernetes.io/pod-claim-name" annotation that together with the owner
reference identifies exactly for what a ResourceClaim was generated, so
updating the pod status can be retried for existing ResourceClaims.

The transition from deterministic names is handled with a special case for that
recovery code path: a ResourceClaim with no annotation and a name that follows
the Kubernetes <= 1.27 naming pattern is assumed to be generated for that pod
claim and gets added to the pod status.

There's no immediate need for it, but just in case that it may become relevant,
the name of the generated ResourceClaim may also be left unset to record that
no claim was needed. Components processing such a pod can skip whatever they
normally would do for the claim. To ensure that they do and also cover other
cases properly ("no known field is set", "must check ownership"),
resourceclaim.Name gets extended.
2023-07-11 14:23:48 +02:00
Gunju Kim
c187b38117 Sidecar: Generated code 2023-07-07 21:39:35 +00:00
Gunju Kim
5d26bcd468 Sidecar: API changes
- Add SidecarContaienrs feature gate
- Add ContainerRestartPolicy type
- Add RestartPolicy field to the Container
- Drop RestartPolicy field if the feature is disabled
- Add validation for the SidecarContainers
- Allow restartable init containaers to have a startup probe
2023-07-07 21:39:34 +00:00
Kubernetes Prow Robot
cd32adebd9
Merge pull request #118386 from Richabanker/enhance-storage-version
Add servedVersions info in StorageVersion API
2023-07-05 19:23:02 -07:00
Kubernetes Prow Robot
c2b7d25ff8
Merge pull request #118691 from giuseppe/drop-check-for-volumes
apis: drop check for volumes with user namespaces
2023-06-29 16:23:56 -07:00
Richa Banker
1c48b7ec14 Add servedVersions info in StorageVersion API 2023-06-29 15:40:54 -07:00
Kubernetes Prow Robot
960830bc66
Merge pull request #118102 from RomanBednar/retro-sc-assignment-ga
graduate RetroactiveDefaultStorageClass feature to GA in 1.28
2023-06-27 20:46:32 -07:00
Giuseppe Scrivano
556d713a4a
apis: drop check for volumes with user namespaces
The second phase of user namespaces support was related to supporting
only stateless pods.  Since the changes were accepted for the KEP, now
the scope is extended to support stateful pods as well.  Remove the
check that blocks creating PODs with volumes when using user namespaces.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-06-22 15:15:42 +02:00
Kubernetes Prow Robot
1de217b095
Merge pull request #118278 from mimowo/fix-pod-failure-policy-comments
Update podFailurePolicy comment from alpha-level to beta
2023-06-12 13:46:49 -07:00
Roman Bednar
ac15d69757 remove RetroactiveDefaultStorageClass feature gate checks 2023-06-07 14:31:16 +02:00
Roman Bednar
6afb363ca1 test: remove RetroactiveDefaultStorageClass feature gate
Since the feature is GA and locked to true, tests can no longer set it
to false. Cleaning up by removing all references to this feature gate
from tests.

Feature gate will be removed in v1.29.
2023-06-07 14:31:16 +02:00
Roman Bednar
97a81a59f6 test: correct validation test error message 2023-06-07 14:31:16 +02:00
Joe Betz
b5db644422 Add merge map key validation to StorageVersions 2023-06-06 20:26:43 -04:00
Kubernetes Prow Robot
0bb17a88fa
Merge pull request #116741 from gjkim42/promote-expanded-dns-config-to-ga
Promote ExpandedDNSConfig feature to the GA stage
2023-05-30 18:19:56 -07:00
Michal Wozniak
926bc9bf8e Update podFailurePolicy comment from alpha-level to beta 2023-05-26 10:24:36 +02:00
Kubernetes Prow Robot
bc6cbdabbe
Merge pull request #117852 from tenzen-y/replace-deprecated-sets
Job: Use generic Set in validation
2023-05-24 14:47:00 -07:00
Kubernetes Prow Robot
b2522655b3
Merge pull request #117047 from charles-chenzz/add_continue
replace deprecated set.String in storage/validation
2023-05-24 02:48:49 -07:00
aleskandro
4c9887e3eb Updating the nodeAffinity of gated pods having nil affinity should be allowed 2023-05-18 07:44:34 +02:00
Joe Betz
f0f92853ad Add api-machinery TL owners permissions for jpbetz 2023-05-15 11:09:54 -04:00
Kubernetes Prow Robot
8479db5876
Merge pull request #117946 from lavalamp/lavalamp-taking-a-break
lavalamp is taking a long break
2023-05-12 14:34:47 -07:00
Yuki Iwai
2e2afc7fd2 Job: Use generic Set in validation
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-05-12 03:26:25 +09:00