yongruilin
016e821718
run codegen
2026-01-06 20:18:06 +00:00
Itamar Holder
af66766bf5
Add auto-generated code and boilerplate
...
Signed-off-by: Itamar Holder <iholder@redhat.com >
2025-11-18 14:14:41 +02:00
ndixita
b8777c3263
Generated files from API changes
2025-11-11 18:15:21 +00:00
Heba
aceb89debc
KEP-5471: Extend tolerations operators ( #134665 )
...
* Add numeric operations to tolerations
Signed-off-by: Heba Elayoty <heelayot@microsoft.com >
* code review feedback
Signed-off-by: Heba Elayoty <heelayot@microsoft.com >
* add default feature gate
Signed-off-by: Heba Elayoty <heelayot@microsoft.com >
* Add integration tests
Signed-off-by: Heba Elayoty <heelayot@microsoft.com >
* Add toleration value validation
Signed-off-by: Heba Elayoty <heelayot@microsoft.com >
* Add validate options for new operators
Signed-off-by: helayoty <heelayot@microsoft.com >
* Remove log
Signed-off-by: helayoty <heelayot@microsoft.com >
* Update feature gate check
Signed-off-by: helayoty <heelayot@microsoft.com >
* emove IsValidNumericString func
Signed-off-by: helayoty <heelayot@microsoft.com >
* Implement IsDecimalInteger
Signed-off-by: helayoty <heelayot@microsoft.com >
* code review feedback
Signed-off-by: helayoty <heelayot@microsoft.com >
* Add logs to v1/toleration
Signed-off-by: Heba Elayoty <heelayot@microsoft.com >
Signed-off-by: helayoty <heelayot@microsoft.com >
* Update integration tests and address code review feedback
Signed-off-by: helayoty <heelayot@microsoft.com >
* Add feature gate to the scheduler framework
Signed-off-by: helayoty <heelayot@microsoft.com >
* Remove extra test
Signed-off-by: helayoty <heelayot@microsoft.com >
* Fix integration test
Signed-off-by: helayoty <heelayot@microsoft.com >
* pass feature gate via TolerationsTolerateTaint
Signed-off-by: helayoty <heelayot@microsoft.com >
---------
Signed-off-by: Heba Elayoty <heelayot@microsoft.com >
Signed-off-by: helayoty <heelayot@microsoft.com >
2025-11-10 12:42:54 -08:00
Maciej Skoczeń
078f462a95
api: Workload API and Pod WorkloadReference generated files
2025-11-06 09:36:44 +00:00
Kubernetes Prow Robot
b869afe68d
Merge pull request #133389 from pravk03/node-capabilities
...
Introduce node declared features framework
2025-11-06 01:32:54 -08:00
yongruilin
47fb373c31
run update-codegen.sh
2025-11-06 00:54:52 +00:00
Praveen Krishna
3c22291a4b
autogenerated files from "make update"
2025-11-06 00:50:03 +00:00
tinatingyu
59e075e8d3
Promote PodCertificateRequests to v1beta1
2025-11-02 05:33:44 +00:00
Dan Winship
715228f478
Remove LoadBalancerIPMode feature gate
2025-10-24 09:12:03 -04:00
Tim Allclair
debe026b21
Fix unit tests to work with explicit depndencies
2025-10-15 15:04:26 -07:00
Aaron Prindle
dfd7b230b4
feat: make it so that all ShortCircuit validators are run for short circuiting check
2025-10-07 22:47:42 +00:00
yongruilin
6b11e6433c
run update-codegen to for ReplicationController
2025-10-01 20:42:23 +00:00
Tim Hockin
229c6b13ca
Validate ReplicationController.metadata.name
...
This relies on `+k8s:subfield` and validation cohorts. The
`k8s:optional` ensures that we don't run the name validation if name is
empty, because core apimachinery will already flag it as Required().
This demonstrates some of the DV value - docs and clients are now (in
theory) able to see what RC's name format is.
Co-Authored-by: Yongrui Lin <yongrlin@outlook.com >
2025-10-01 19:45:37 +00:00
Tim Hockin
b6fdbe4a6a
Emit ratchet check for fields with a type func
...
This could go inside the type func but then we end up with a double
ratchet sometimes.
Co-Authored-By: Yongrui Lin <yongrlin@outlook.com >
2025-09-09 21:58:55 +00:00
yongruilin
8130cf82b5
run "hack/update-codegen.sh valid"
2025-09-09 16:54:46 +00:00
yliao
3068b60b83
extended resource backed by DRA: codegen
2025-07-29 17:17:20 +00:00
Kubernetes Prow Robot
3fd1251165
Merge pull request #131089 from KevinTMtz/pod-level-hugepage-cgroups
...
[PodLevelResources] Propagate Pod level hugepage cgroup to containers
2025-07-24 19:08:26 -07:00
Kevin Torres
9f5b09eb7b
Unit test pod level hugepage Default and Validation logic
2025-07-24 21:29:04 +00:00
Kevin Torres
845e94d370
Validation logic and Defaulting update for pod level hugepages
...
The hugepage aggregated container limits cannot be greater than pod-level limits.
This was already enforced with the defaulted requests from the specfied
limits, however it did not make it clear about both hugepage requests and limits.
2025-07-24 21:29:01 +00:00
Yuan Wang
af595a44ae
Add container restart rules to API
2025-07-24 16:49:52 +00:00
HirazawaUi
8b3814c4ab
Add the HostnameOverride field to the Pod API
2025-07-23 20:28:12 +08:00
Bing Hongtao
6f3b6b91f0
KEP-3721: Support for env files ( #132626 )
...
* Add FileKeyRef field and struct to the Pod API
* Add the implementation code in the kubelet.
* Add validation code
* Add basic functionality e2e tests
* add codes for drop disabled pod fields
* update go.mod
2025-07-22 13:40:42 -07:00
Taahir Ahmed
6d4000f844
Pod Certificates: make update
...
Change-Id: Ib258c1f3bf238f41cfa1d6de8e8d0de5b8379a06
2025-07-21 21:49:57 +00:00
Kubernetes Prow Robot
bdb7a01946
Merge pull request #132890 from atiratree/replicaset-conversion
...
add Replicaset -> ReplicationController conversion test
2025-07-14 22:32:29 -07:00
yongruilin
419e70b763
run update-codegen
...
Co-authored-by: Tim Hockin <thockin@google.com >
Co-authored-by: Aaron Prindle <aprindle@google.com >
Co-authored-by: Joe Betz <jpbetz@google.com >
2025-07-12 21:18:59 +00:00
Filip Křepinský
65e0cff3c5
add Replicaset -> ReplicationController conversion test
...
and ensure we account for fields that are only supported by ReplicaSet
2025-07-11 14:55:15 +02:00
PatrickLaabs
f966647b4d
chore: depr. pointer pkg replacement for pkg/apis
2025-07-07 12:54:05 +02:00
yongruilin
1574001a1c
run update-codegen.sh
2025-06-11 23:44:52 +00:00
Joe Betz
1d17ca9b7e
generate code
2025-05-24 00:03:35 -04:00
Joe Betz
d2fa246b06
Update codegen
2025-05-06 09:00:38 -04:00
Joe Betz
164fefa948
Update codegen
2025-05-05 22:06:59 -04:00
Sreeram
d6d9a354d7
Generated files
2025-03-25 02:06:29 +05:30
Kubernetes Prow Robot
838f3c0852
Merge pull request #130577 from KevinTMtz/pod-level-hugepages
...
[PodLevelResources] Pod Level Hugepage Resources
2025-03-20 15:34:38 -07:00
Kevin Torres
b9e0d4ad66
Unit tests for pod level hugepage resources
2025-03-20 17:54:39 +00:00
Kevin Torres
aa17082a16
Default pod level hugepage limits
2025-03-20 17:54:39 +00:00
Itamar Holder
4bdaf6cbbd
add auto-generated files: ./hack/update-codegen.sh
...
Signed-off-by: Itamar Holder <iholder@redhat.com >
2025-03-16 11:59:28 +02:00
Tim Hockin
311e589534
Emit comments before validation code
2025-03-14 08:17:34 -07:00
Joe Betz
177193ed19
Mark RC.Spec.MinReadySeconds as k8s:optional
...
+k8s:optional should be used everywhere +optional is.
This does not change the vailidation of the field, but it
is a good practice, and code generator recognizes the fields
tags and outputs this comment above the field validation
as a result: "optional value-type fields with zero-value
defaults are purely documentation".
2025-03-13 21:26:17 -04:00
Tim Hockin
1059dbdee1
Declaratively validate minimum value of RC.Spec.MinReadySeconds
...
# Conflicts:
# staging/src/k8s.io/api/core/v1/types.go
2025-03-13 21:24:50 -04:00
Tim Hockin
0f4786536f
Declaratively validate RC.Spec.Replicas optionality
...
The existing test run both declarative and manual validation and it
still passes.
2025-03-13 21:24:50 -04:00
Tim Hockin
21b3da7e5a
Add declarative default for RC.Spec.Replicas
...
Remove manual default:
```
$ git diff
diff --git a/pkg/apis/core/v1/defaults.go b/pkg/apis/core/v1/defaults.go
index e66de8bb432..1dd28dd35fb 100644
--- a/pkg/apis/core/v1/defaults.go
+++ b/pkg/apis/core/v1/defaults.go
@@ -60,10 +60,6 @@ func SetDefaults_ReplicationController(obj *v1.ReplicationController) {
obj.Labels = labels
}
}
- if obj.Spec.Replicas == nil {
- obj.Spec.Replicas = new(int32)
- *obj.Spec.Replicas = 1
- }
}
func SetDefaults_Volume(obj *v1.Volume) {
if ptr.AllPtrFieldsNil(&obj.VolumeSource) {
```
The test fails:
```
$ go test ./pkg/apis/core/v1 | grep -v gate | grep -v SetEmulationVersion
--- FAIL: TestSetDefaultReplicationControllerReplicas (0.00s)
defaults_test.go:1608: expected: 1 replicas, got: 0
FAIL
FAIL k8s.io/kubernetes/pkg/apis/core/v1 0.269s
FAIL
```
Declare the default, update codegen and re-run the test:
```
$ git diff
diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go
index 406ab56a002..7e5136fe9f6 100644
--- a/staging/src/k8s.io/api/core/v1/types.go
+++ b/staging/src/k8s.io/api/core/v1/types.go
@@ -5101,6 +5101,7 @@ type ReplicationControllerSpec struct {
// Defaults to 1.
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
// +optional
+ // +default=1
// +k8s:minimum=0
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
$ ./hack/update-codegen.sh default
+++ [1219 08:58:43] Generating defaulter code for 102 targets
$ git diff
diff --git a/pkg/apis/core/v1/zz_generated.defaults.go b/pkg/apis/core/v1/zz_generated.defaults.go
index 3b6eb4f0a93..567c49053aa 100644
--- a/pkg/apis/core/v1/zz_generated.defaults.go
+++ b/pkg/apis/core/v1/zz_generated.defaults.go
@@ -878,6 +878,10 @@ func SetObjectDefaults_PodTemplateList(in *corev1.PodTemplateList) {
func SetObjectDefaults_ReplicationController(in *corev1.ReplicationController) {
SetDefaults_ReplicationController(in)
+ if in.Spec.Replicas == nil {
+ var ptrVar1 int32 = 1
+ in.Spec.Replicas = &ptrVar1
+ }
if in.Spec.Template != nil {
SetDefaults_PodSpec(&in.Spec.Template.Spec)
for i := range in.Spec.Template.Spec.Volumes {
$ go test ./pkg/apis/core/v1 | grep -v gate | grep -v SetEmulationVersion
ok k8s.io/kubernetes/pkg/apis/core/v1 (cached)
```
2025-03-13 21:24:48 -04:00
Tim Hockin
e08bbf254c
Declaratively validate minimum value of RC.Spec.Replicas
2025-03-13 21:23:18 -04:00
Tim Hockin
7315d0a687
Change internal-version RC.Spec.Replicas to a ptr
...
This is needed to make declaratve validation clean. Past me thought
this was clever (pointer versioned, non-pointer internal) but it is just
confusing.
2025-03-13 08:47:19 -07:00
Tim Hockin
e856356225
Enable validation-gen on core/v1
...
This enables generation but does not activate the strategy calling of
declarative.
2025-03-12 18:05:20 -04:00
Tim Hockin
e54719bb66
Use randfill, do API renames
2025-03-08 15:18:00 -08:00
Natasha Sarkar
6edd921746
run 'make update'
2025-03-06 20:08:06 +00:00
Kubernetes Prow Robot
46f0b3fc13
Merge pull request #128920 from tallclair/ippr-defaults
...
[FG:InPlacePodVerticalScaling] Remove ResizePolicy defaulting
2024-12-14 03:04:25 +01:00
Patrick Ohly
8a908e0c0b
remove import doc comments
...
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:
- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.
This commit was generated with
sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')
Everything was included, except for
package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
Tim Allclair
da4dc0aec7
Stop defaulting container ResizePolicy
2024-11-21 09:51:31 -08:00