Commit Graph

1305 Commits

Author SHA1 Message Date
Anish Shah
2bf1f2349c validate resize request
We validate resize request by ensuring that pod QoS is unchanged and
only cpu and memory resources and resize policies are mutated.
2024-11-06 01:33:14 +00:00
Kubernetes Prow Robot
bc79d3ba87 Merge pull request #128396 from ritazh/deprecate-EnforceMountableSecretsAnnotation
deprecate EnforceMountableSecretsAnnotation in 1.32
2024-11-05 06:07:40 +00:00
Kubernetes Prow Robot
5572688cef Merge pull request #128342 from gnufied/recovery-expansion-beta
Move RecoverVolumeExpansionFailure feature to beta
2024-11-04 23:15:36 +00:00
Kubernetes Prow Robot
97c79df18f Merge pull request #127981 from jsafrane/selinux-changepolicy
1710: Implement SELinuxChangePolicy
2024-11-04 22:09:29 +00:00
Rita Zhang
e7cdc59555 deprecate EnforceMountableSecretsAnnotation in 1.32
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2024-11-04 13:13:32 -08:00
Kubernetes Prow Robot
6bc0768c62 Merge pull request #127744 from carlory/fix-126662
Tighten validation on the qosClass field of pod status
2024-11-01 22:33:27 +00:00
Jan Safranek
6ca7b959e4 Add SELinuxChangePolicy validation 2024-11-01 12:46:34 +01:00
Jan Safranek
3867cb40ad Regenerated API 2024-11-01 12:45:56 +01:00
Jan Safranek
c73308e90a Introduce SELinuxChangePolicy
Feature gate + the API
2024-11-01 12:45:56 +01:00
carlory
9cb7d58b3c Tighten validation on the qosClass field of pod status 2024-11-01 10:36:03 +08:00
Kubernetes Prow Robot
b337f048db Merge pull request #127094 from sreeram-venkitesh/4818-allow-zero-for-prestop-hook
KEP-4818: Relaxed validation for allowing zero in PreStop hook sleep action
2024-10-31 20:25:26 +00:00
Kubernetes Prow Robot
86b99869cb Merge pull request #128299 from SergeyKanzhelev/updateDHS
Update Device Health fields description for KEP-4680
2024-10-28 22:19:01 +00:00
Sergey Kanzhelev
5cfaf47448 update allocated resources status validation to account for claims 2024-10-26 07:11:06 +00:00
Sergey Kanzhelev
546436eb16 update device health status comments 2024-10-26 07:04:22 +00:00
Hemant Kumar
a9d71bd6e6 Move RecoverVolumeExpansionFailure feature to beta 2024-10-25 13:39:43 -04:00
Kubernetes Prow Robot
0a62f0fd7b Merge pull request #128139 from Jefftree/revert-allowservicelb
Revert removal of feature AllowServiceLBStatusOnNonLB and LockToDefault first
2024-10-24 15:20:54 +01:00
Kubernetes Prow Robot
0e6961e898 Merge pull request #126955 from tallclair/cleanup
Remove corev1.Binding deprecation message
2024-10-23 02:21:19 +01:00
Kubernetes Prow Robot
5f3316fe23 Merge pull request #128119 from saschagrunert/api-validation-err
Clarify API validation error for toleration if `operator` is `Exists` and `value` is not empty
2024-10-21 19:44:59 +01:00
Sreeram Venkitesh
f1f9e7b398 Clean kube_features.go
Added tests, info about new feature gate in error message, fixes from review

Added basic e2e test

Added unit tests

Ran hack/update-featuregates.sh

Tolerate updates to existing resources after disabling feature gate

Added feature gate to versioned_kube_features.go

Fixed existing tests

Use PodValidationOptions for validation instead of using feature gate directly

Relaxed validation for allowing zero in prestop hook sleep action
2024-10-18 22:04:42 +05:30
Robbie Cronin
cdbfbde4aa Add ut coverage for capabilities.Setup (#125395)
* Add ut coverage for capabilities.Setup

* Update pkg/capabilities/capabilities_test.go

Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>

* Add ut coverage for capabilities.Setup

Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>

---------

Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2024-10-17 18:23:03 +01:00
Kubernetes Prow Robot
c6ad6fa951 Merge pull request #125477 from my-git9/namespaceformat
Modify some error words
2024-10-17 17:17:17 +01:00
Jefftree
06321f4a0e Revert "Remove AllowServiceLBStatusOnNonLB gate"
This reverts commit 128e189fcd.
2024-10-16 18:00:42 -04:00
Sascha Grunert
544d8c06c3 Clarify API validation error if operator is Exists
Without this patch the error message for this example:

```
---
apiVersion: v1
kind: Pod
metadata:
  name: test
spec:
  containers:
    - name: agent
      image: debian:latest
  tolerations:
    - key: pool
      operator: Exists
      value: build
      effect: NoSchedule
```

Looks like:

```
The Pod "test" is invalid: spec.tolerations[0].operator: Invalid value:
core.Toleration{Key:"pool", Operator:"Exists", Value:"build",
Effect:"NoSchedule", TolerationSeconds:(*int64)(nil)}: value must be
empty when `operator` is 'Exists'
```

To clarify that the `Value` field is wrong, we now directly point the
`field.Invalid` to it. Now the error message becomes a more clear and
concise one:

```
The Pod "test" is invalid: spec.tolerations[0].operator: Invalid value:
"build": value must be empty when `operator` is 'Exists'
```

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-10-16 11:40:02 +02:00
Aohan Yang
da5738d9aa Set feature gate emulation version during test 2024-10-10 19:26:31 +08:00
Matthieu MOREL
b7248077a9 fix: enable formatter rule from testifylint in module k8s.io/kubernetes
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-26 08:19:54 +02:00
carlory
b3913395c5 drop the option mark from the InvolvedObject field of internal event object 2024-09-25 11:43:52 +08:00
Kubernetes Prow Robot
f9a57ba82d Merge pull request #126760 from ncdc/ncdc/emeritus
Move ncdc to emeritus
2024-09-20 21:01:58 +01:00
Kubernetes Prow Robot
f2700895a4 Merge pull request #127422 from srivastav-abhishek/go-vet-fix
Go vet fixes for gotip
2024-09-20 14:37:58 +01:00
Abhishek Kr Srivastav
95860cff1c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2024-09-20 12:36:38 +05:30
carlory
684fbd6f20 remove AllowImageVolumeSource 2024-09-13 23:45:42 +08:00
Adrian Moisey
8e3adc4df6 KEP-4427 : AllowRelaxedDNSSearchValidation (#127167)
* KEP-4427 : AllowRelaxedDNSSearchValidation

* Add e2e test with feature gate to test KEP-4427 RelaxedDNSSearchValidation

* Add more validatePodDNSConfig test cases

Also update Regex to match the case we want.

Thanks Tim and Antonio!
2024-09-12 09:41:19 +01:00
Joe Betz
2595aa1309 generate 2024-09-03 14:26:26 -04:00
Tim Allclair
adf6baa857 Remove corev1.Binding deprecation message 2024-08-27 16:52:28 -07:00
Andy Goldstein
0e228be96f Use emeritus_*
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2024-08-22 17:48:27 -04:00
Tim Hockin
128e189fcd Remove AllowServiceLBStatusOnNonLB gate 2024-08-21 13:07:52 -07:00
Andy Goldstein
3ab816dcab Move ncdc to emeritus
I am moving myself to emeritus as I am now firmly on the end-user side
of things.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2024-08-17 13:06:45 -04:00
Sergey Kanzhelev
62f96d2748 set AllocatedResourcesStatus in the Pod Status 2024-07-24 00:29:35 +00:00
Sergey Kanzhelev
3790ee2fe8 reset fields when the feature gate was not set 2024-07-24 00:29:35 +00:00
Sergey Kanzhelev
2253b53b58 generated files 2024-07-24 00:29:35 +00:00
Sergey Kanzhelev
16e8911fdc add AllocatedResourcesStatus field to ContainerStatus 2024-07-24 00:29:34 +00:00
Kubernetes Prow Robot
f93fe412c7 Merge pull request #126281 from saschagrunert/oci-volume-docs
[KEP-4639] Mention that `fsGroupChangePolicy` has no effect
2024-07-23 14:40:14 -07:00
Kubernetes Prow Robot
c2fdeca4ab Merge pull request #126145 from carlory/kep-3751-api
[KEP-3751] Promote VolumeAttributesClass to beta
2024-07-23 13:31:05 -07:00
Kubernetes Prow Robot
107f621462 Merge pull request #126108 from gnufied/changes-volume-recovery
Reduce state changes when expansion fails and mark certain failures as infeasible
2024-07-23 13:30:56 -07:00
Kubernetes Prow Robot
05bb5f71f8 Merge pull request #120611 from pohly/dra-resource-quotas
DRA: resource quotas
2024-07-23 12:20:44 -07:00
Kubernetes Prow Robot
a00181d4d4 Merge pull request #121902 from carlory/kep-3751-pv-controller
[kep-3751] pvc bind pv with vac
2024-07-23 11:02:13 -07:00
Patrick Ohly
299ecde5cc DRA quota: add ResourceClaim v1.ResourceQuota limits
Dynamic resource allocation is similar to storage in the sense that users
create ResourceClaim objects to request resources, same as with persistent
volume claims. The actual resource usage is only known when allocating claims,
but some limits can already be enforced at admission time:

- "count/resourceclaims.resource.k8s.io" limits the number of ResourceClaim objects in
  a namespace; this is a generic feature that is already supported also without
  this commit.

- "resourceclaims" is *not* an alias - use "count/resourceclaims.resource.k8s.io"
  instead.

- <device-class-name>.deviceclass.resource.k8s.io/devices limits the number of
  ResourceClaim objects in a namespace such that the number of devices
  requested through those objects with that class does not exceed the limit.

A single request may cause the allocation of multiple devices. For exact
counts, the quota limit is based on the sum of those exact counts. For requests
asking for "all" matching devices, the maximum number of allocated devices per
claim is used as a worst-case upper bound.

Requests asking for "admin access" contribute to the quota.

DRA quota: remove admin mode exception
2024-07-23 18:52:34 +02:00
Patrick Ohly
1f43a80b3c DRA quota: unit test case for resource.k8s.io quota names
The names aren't actually special for validation. They are
acceptable with and without the feature gate, the only difference
is that they don't do anything when the feature is enabled.
2024-07-23 18:52:33 +02:00
Kubernetes Prow Robot
7590cb7adf Merge pull request #125257 from vinayakankugoyal/armor
KEP-24: Update AppArmor feature gates to GA stage.
2024-07-23 09:20:52 -07:00
Sascha Grunert
479a7c34fe ImageVolumeSource: mention that fsGroupChangePolicy has no effect
A small documentation follow-up based on the review:
https://github.com/kubernetes/kubernetes/pull/125660#discussion_r1686859866

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-23 10:15:18 +02:00
carlory
3a6a4830df pvc bind pv with vac 2024-07-23 15:04:11 +08:00