Stanislav Láznička
e549eeb796
introduce the KubeletEnsureSecretImages featuregate
2025-03-14 10:47:51 +01:00
Maciej Skoczeń
9df0f6b604
Call PreEnqueue plugins before adding pod to backoffQ
2025-03-14 08:47:40 +00:00
Maciej Skoczeń
8d4eaa024d
Add SchedulerPopFromBackoffQ feature gate for KEP-5142
2025-03-14 08:47:39 +00:00
Kubernetes Prow Robot
af3b4cd57a
Merge pull request #130718 from kei01234kei/feature/use_generic_set
...
Use generic set in pkg/controller/nodelifecycle
2025-03-14 01:21:47 -07:00
Francesco Romani
5c17e7bd9c
node: cpumgr: metrics: add uncore cache alignment metrics
...
add missing metric about uncore / L3 / Last-Level cache alignment,
plus its e2e tests.
Exposing uncore alignment requires a bit of refactoring in the static
policy implementation because, differently from full PCPUs alignment
and NUMA alignment, can't be easily and safely inferred by construction.
The main reason for this is that uncore cache alignment is preferred,
not mandatory, thus the cpu allocator can legally use cross-uncore
allocation. Because of that, the final cpuset union step can
create a final cpuset which is not uncore-aligned even though all
its parts are uncore-aligned.
The safest way seems thus to run just a final uncore-alignment check
once the final cpuset is computed.
Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-03-14 09:08:54 +01:00
Francesco Romani
9cfe1863ce
node: e2e: clarify test description
...
fix test name. Cosmetic only.
Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-03-14 09:06:21 +01:00
Francesco Romani
cea7d97d8b
node: cpumgr: use String representation in output
...
get nicer output for free
Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-03-14 09:06:21 +01:00
Francesco Romani
52e0f522ba
node: cpumgr: test: use Equals for comparison
...
There's no need to use the generic reflect.DeepEqual,
we can use the cpuset Equals method in tests,
which is more idiomatic and a tad clearer.
Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-03-14 09:06:20 +01:00
Francesco Romani
a07510fade
node: cpumgr: test: abort on failure
...
abort the test in the unlikely case we fail to create
the Policy object. Exactly because this is unlikely
we should fail loudly.
In my case this happened because unrelated bad parameters,
which was hard to catch
Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-03-14 09:06:20 +01:00
carlory
3e70a1bc9c
remove unneeded e2e features
...
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-14 14:50:35 +08:00
Kubernetes Prow Robot
46aba9dcba
Merge pull request #130805 from Jefftree/cle-int-test-enable-api
...
Enable proper API in CLE integration test
2025-03-13 20:09:46 -07:00
Jefftree
6979567c44
Enable proper API in CLE integration test
2025-03-14 01:59:02 +00:00
Kubernetes Prow Robot
8b08487283
Merge pull request #130354 from siyuanfoundation/forward-api
...
KEP-4330: add forward compatibility for compatibility mode
2025-03-13 18:55:57 -07:00
Kubernetes Prow Robot
b00f88e3b5
Merge pull request #129414 from yongruilin/compatibility-version-featuregate
...
feat: Refactors featuregate lifecycle management script
2025-03-13 18:55:46 -07:00
Joe Betz
f7296b31f0
Add declarative test cases for RC.Spec.MinReadySeconds
2025-03-13 21:26:17 -04: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
1e33616068
Add declarative default for RC.Spec.MinReadySeconds
2025-03-13 21:26:14 -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
Joe Betz
20b69a54bf
Add declarative test cases for RC.Spec.Replicas
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
Kubernetes Prow Robot
bb19eac500
Merge pull request #130800 from rata/userns-stub-windows
...
Fix unit tests on windows
2025-03-13 17:43:53 -07:00
Kubernetes Prow Robot
23d6377028
Merge pull request #130019 from yongruilin/version-intro
...
KEP-4330: extend version information with more detailed version fields
2025-03-13 17:43:46 -07:00
Kubernetes Prow Robot
129661b2c7
Merge pull request #130760 from BenTheElder/cleanup-integration
...
Cleanup CI integration scripts
2025-03-13 16:05:53 -07:00
Kubernetes Prow Robot
32d8e0ce4f
Merge pull request #130732 from thockin/master_replicationcontroller_replicas_pointer
...
Change internal-version RC.Spec.Relicas to a ptr
2025-03-13 16:05:46 -07:00
Siyuan Zhang
a9514b0591
Add update-featuregates to update.sh
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-03-13 15:53:06 -07:00
yongruilin
088daf472b
feat: Refactors featuregate lifecycle management script
...
- rename featuregate_linter to compatibility_lifecycle
- add feature removal verify to follow N+3 rule
- remove unversioned related operation
- rename yaml folder name to "reference"
2025-03-13 21:57:21 +00:00
Kubernetes Prow Robot
a4739df381
Merge pull request #130790 from natasha41575/drop_fake_status_manager
...
remove kubelet fake status manager
2025-03-13 14:56:15 -07:00
Kubernetes Prow Robot
dabb4e2445
Merge pull request #130788 from jpbetz/fix-subresources
...
Fix subresource parsing for declarative validation
2025-03-13 14:56:08 -07:00
Kubernetes Prow Robot
5ff9047a50
Merge pull request #130778 from enj/enj/i/credentialprovider_owners
...
Sync `pkg/credentialprovider/OWNERS` with `k8s.io/client-go/tools/auth/OWNERS`
2025-03-13 14:56:01 -07:00
Kubernetes Prow Robot
54e7d2760d
Merge pull request #130775 from serathius/watchcache-consistent-read
...
Fix detecting consistent read when watchcache starts handling continue
2025-03-13 14:55:54 -07:00
Kubernetes Prow Robot
396c3ebe4c
Merge pull request #130711 from lauralorenz/crashloopbackoff-featuregate-reducedefaultcrashloopbackoffdelay
...
KEP-4603: Add ReduceDefaultCrashLoopBackoffDecay featuregate, feature and unit and e2e tests
2025-03-13 14:55:47 -07:00
yongruilin
14934b481e
refactor: detach Info from apimachinery util version
...
- Remove `info` field from `Version` struct
- Modify `WithInfo` and `Info` methods to be deprecated
- Update version information retrieval to use base version info
- Simplify version information generation in compatibility tests
- Remove unnecessary version info passing in build and test scenarios
2025-03-13 21:44:47 +00:00
yongruilin
a3094ccbe6
feat: extend version information with more detailed version fields
...
- Add new version fields to version.Info struct:
* EmulationMajor and EmulationMinor to track emulated version
* MinCompatibilityMajor and MinCompatibilityMinor for compatibility tracking
- Update related code to populate and use these new fields
- Improve version information documentation and OpenAPI generation
- Modify version routes and documentation to reflect new version information structure
2025-03-13 21:44:31 +00:00
Rodrigo Campos
8d71f74fcd
pkg/kubelet/userns: Remove skip on windows
...
We don't build these tests for Windows, let's remove this skip.
We should have never added that skip, we should have skipped the entire
suite on Windows.
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-03-13 22:25:22 +01:00
Rodrigo Campos
691fd360ba
pkg/kubelet/userns: Wrap error to get mappings
...
I needed to wrap the error for debugging, let's just keep this as it is
useful.
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-03-13 22:25:22 +01:00
Rodrigo Campos
925416bc37
pkg/kubelet/userns: Provide stub implementation for windows
...
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-03-13 22:25:22 +01:00
Kubernetes Prow Robot
020c4b7c65
Merge pull request #130754 from aaron-prindle/validation-gen-add-metric-and-runtime-verification-review-comments-upstream
...
[Declarative Validation] chore: change Info->Error log level related to declarative validation runtime tests and refactor panic wrapper names
2025-03-13 13:28:02 -07:00
Kubernetes Prow Robot
04fb7ac18b
Merge pull request #130536 from tenzen-y/promote-successpolicy-to-ga
...
KEP-3998: Promote JobSuccessPolicy to Stable
2025-03-13 13:27:54 -07:00
Kubernetes Prow Robot
94cc4babc2
Merge pull request #130233 from soltysh/statefulset_api
...
StatefulSet: add explicit validation for .spec.serviceName and mark the field optional
2025-03-13 13:27:46 -07:00
Kubernetes Prow Robot
4666b8cdf6
Merge pull request #130783 from jpbetz/versioned-formats
...
Support emulation versioning of custom resource formats
2025-03-13 11:55:55 -07:00
Kubernetes Prow Robot
be127ae0e2
Merge pull request #130751 from Jefftree/cle-promote-beta
...
[KEP-4355] Promote Coordinated Leader Election to Beta
2025-03-13 11:55:47 -07:00
Rodrigo Campos
74b069d0fa
pkg/kubelet: Fix userns tests on Windows
...
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-03-13 19:39:01 +01:00
Benjamin Elder
1ddfc7bdce
benchmark-dockerized.sh: don't redundantly install gotestsum
...
this is handled centrally by make test which is called by make test-integration which this script calls
only make test's implementation actually calls gotestsum, and it also handles installing if needed
2025-03-13 11:23:53 -07:00
Benjamin Elder
8898868fea
install-ectd.sh: brace PATH and suggest user export
2025-03-13 11:23:53 -07:00
Benjamin Elder
d798d86981
cleanup CI integration scripts
...
- stop setting ARTIFACTS from WORKSPACE, CI handles setting ARTIFACTS and WORKSPACE isn't used anymore (bazel?)
- stop cd-ing GOPATH, CI sets the working dir already and local users won't necessarily have GOPATH
- sop clobbering PATH with hardcoded assumptions, source install-etcd.sh instead (which updates PATH)
- don't redundantly set KUBE_COVER to the default
- pass logging env inline so the command can be pasted locally
- set -x so the command is visible
- add TODO about needing a wrapper script just to call install-etcd
2025-03-13 11:23:53 -07:00
Joe Betz
d9a2dee622
Fix subresource parsing for declarative validation
2025-03-13 13:16:30 -04:00
Kubernetes Prow Robot
9475c92a6e
Merge pull request #130777 from serathius/watchcache-consistency-test
...
Fix typo and pass the environment variable required to enable watchcache consistency checking in GCE tests
2025-03-13 10:13:59 -07:00
Kubernetes Prow Robot
e22153d9e1
Merge pull request #130662 from tenzen-y/fix-incorrect-union-marker
...
chore: Fix incorrect AppArmorProfile.Type marker
2025-03-13 10:13:48 -07:00