Skip to content

[FG:PodObservedGenerationTracking] Kubelet sets pod status.observedGeneration when updating the pod status#130352

Merged
k8s-ci-robot merged 7 commits intokubernetes:masterfrom
natasha41575:kubelet-pod-observedgen
Mar 7, 2025
Merged

[FG:PodObservedGenerationTracking] Kubelet sets pod status.observedGeneration when updating the pod status#130352
k8s-ci-robot merged 7 commits intokubernetes:masterfrom
natasha41575:kubelet-pod-observedgen

Conversation

@natasha41575
Copy link
Copy Markdown
Contributor

@natasha41575 natasha41575 commented Feb 21, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR updates the kubelet to set pod.status.observedGeneration as described in https://kep.k8s.io/5067.

Which issue(s) this PR fixes:

Pod generation KEP: https://kep.k8s.io/5067

Special notes for your reviewer:

In the KEP, it was decided that for conditions.ObservedGeneration need only to be added to the API for alpha; actual implementation of them is only required for graduation for beta.

Does this PR introduce a user-facing change?

When the `PodObservedGenerationTracking` feature gate is set, the kubelet will populate `status.observedGeneration` to reflect the pod's latest `metadata.generation` that it has observed.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://kep.k8s.io/5067

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/code-generation area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/kubelet area/test kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 21, 2025
@natasha41575 natasha41575 changed the title [[FG:PodObservedGenerationTracking] Kubelet sets pod status.observedGeneration [[FG:PodObservedGenerationTracking] Kubelet sets pod status.observedGeneration when updating the pod status Feb 21, 2025
@natasha41575 natasha41575 changed the title [[FG:PodObservedGenerationTracking] Kubelet sets pod status.observedGeneration when updating the pod status [FG:PodObservedGenerationTracking] Kubelet sets pod status.observedGeneration when updating the pod status Feb 21, 2025
Comment thread staging/src/k8s.io/api/core/v1/types.go Outdated
@natasha41575 natasha41575 force-pushed the kubelet-pod-observedgen branch from 2571a7b to a0d3203 Compare February 21, 2025 19:44
@natasha41575 natasha41575 marked this pull request as ready for review February 21, 2025 19:52
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 21, 2025
@natasha41575
Copy link
Copy Markdown
Contributor Author

/assign @tallclair

@tallclair
Copy link
Copy Markdown
Member

/lgtm
/approve

For Kubelet changes. I think you still need a scheduler review.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: f80f6f34380051872e8814bcba06a59e53d38b3c

@jpbetz
Copy link
Copy Markdown
Contributor

jpbetz commented Mar 4, 2025

/approve
For apply Configuration changes

// Owner: sig-node
// Marks tests that require a cluster with PodObservedGenerationTracking
PodObservedGenerationTracking = framework.WithFeature(framework.ValidFeatures.Add("PodObservedGenerationTracking"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not be needed, depending on whether #130580 gets merged.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, I'll keep an eye on it. Thanks!

@dgrisonnet
Copy link
Copy Markdown
Member

/remove-sig instrumentation

@Rajalakshmi-Girish
Copy link
Copy Markdown
Contributor

Hello @natasha41575
Thanks for actively working on the PR.

Friendly reminder that code freeze is starting at 02:00 UTC Friday 21st March 2025 (about 2 weeks from now), and while there is still time, we want to ensure that each PR has a chance to be merged on time.

Please make sure the PR has both lgtm and approved labels before the code freeze. Thanks!

@yongruilin
Copy link
Copy Markdown
Contributor

/triage accepted

@natasha41575
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@natasha41575
Copy link
Copy Markdown
Contributor Author

/retest

@liggitt
Copy link
Copy Markdown
Member

liggitt commented Mar 7, 2025

@jpbetz @cici37 FYI, CEL integration test is flaking:

    crd_validation_expressions_test.go:722: expect error to contain 
ule compiler initialization error: failed to convert to declType for CEL validation rules" but get: <nil>
--- FAIL: TestCustomResourceValidatorsWithSchemaConversion (7.45s)

@natasha41575
Copy link
Copy Markdown
Contributor Author

@liggitt tests are all passing after the rebase!

@liggitt
Copy link
Copy Markdown
Member

liggitt commented Mar 7, 2025

/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 44108f946e4060fab857aa9067110174575a7a02

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpbetz, liggitt, natasha41575, tallclair

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/code-generation area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/kubectl area/kubelet area/release-eng Issues or PRs related to the Release Engineering subproject area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

Status: API review completed, 1.33
Archived in project
Archived in project
Archived in project
Archived in project

Development

Successfully merging this pull request may close these issues.