Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure we keep observedGeneration up-to-date even when resource has completed #1869

Conversation

jonathan-innis
Copy link
Member

@jonathan-innis jonathan-innis commented Dec 7, 2024

Fixes aws/karpenter-provider-aws#7494

Description

This ensures that we always set the observedGeneration for the status condition to the latest generation even for status conditions on NodeClaims that have already been marked as True.

NodeClaims with v1.0.8 Installed

➜  karpenter-provider-aws git:(main) k get nodeclaims
NAME            TYPE         CAPACITY    ZONE         NODE                                            READY   AGE
default-5x87w   c6gd.large   on-demand   us-west-2d   ip-192-168-98-14.us-west-2.compute.internal     True    83s
default-cmsrt   c6gd.large   on-demand   us-west-2a   ip-192-168-55-87.us-west-2.compute.internal     True    83s
default-hl8xp   c6gd.large   on-demand   us-west-2a   ip-192-168-142-174.us-west-2.compute.internal   True    83s
default-mfkxj   c6gd.large   on-demand   us-west-2b   ip-192-168-66-198.us-west-2.compute.internal    True    83s
default-w25n4   c6gd.large   on-demand   us-west-2d   ip-192-168-6-65.us-west-2.compute.internal      True    83s

NodeClaims after upgrade to v1.1.0

➜  karpenter-provider-aws git:(main) k get nodeclaims
NAME            TYPE         CAPACITY    ZONE         NODE                                            READY     AGE
default-5x87w   c6gd.large   on-demand   us-west-2d   ip-192-168-98-14.us-west-2.compute.internal     Unknown   3m31s
default-cmsrt   c6gd.large   on-demand   us-west-2a   ip-192-168-55-87.us-west-2.compute.internal     Unknown   3m31s
default-hl8xp   c6gd.large   on-demand   us-west-2a   ip-192-168-142-174.us-west-2.compute.internal   Unknown   3m31s
default-mfkxj   c6gd.large   on-demand   us-west-2b   ip-192-168-66-198.us-west-2.compute.internal    Unknown   3m31s
default-w25n4   c6gd.large   on-demand   us-west-2d   ip-192-168-6-65.us-west-2.compute.internal      Unknown   3m31s

NodeClaims after upgrading to this bugfix

➜  karpenter-provider-aws git:(main) k get nodeclaims
NAME            TYPE         CAPACITY    ZONE         NODE                                            READY   AGE
default-5x87w   c6gd.large   on-demand   us-west-2d   ip-192-168-98-14.us-west-2.compute.internal     True    6m14s
default-cmsrt   c6gd.large   on-demand   us-west-2a   ip-192-168-55-87.us-west-2.compute.internal     True    6m14s
default-hl8xp   c6gd.large   on-demand   us-west-2a   ip-192-168-142-174.us-west-2.compute.internal   True    6m14s
default-mfkxj   c6gd.large   on-demand   us-west-2b   ip-192-168-66-198.us-west-2.compute.internal    True    6m14s
default-w25n4   c6gd.large   on-demand   us-west-2d   ip-192-168-6-65.us-west-2.compute.internal      True    6m14s

How was this change tested?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot
Copy link
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonathan-innis

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 7, 2024
@coveralls
Copy link

coveralls commented Dec 7, 2024

Pull Request Test Coverage Report for Build 12208520167

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 80.664%

Totals Coverage Status
Change from base Build 12203807145: 0.1%
Covered Lines: 8919
Relevant Lines: 11057

💛 - Coveralls

@jonathan-innis jonathan-innis force-pushed the ensure-observed-generation-updated branch from 61c5c03 to 875967b Compare December 7, 2024 01:04
@jonathan-innis jonathan-innis marked this pull request as ready for review December 7, 2024 01:04
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 7, 2024
Copy link
Contributor

@engedaam engedaam left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 7, 2024
@k8s-ci-robot k8s-ci-robot merged commit e339ada into kubernetes-sigs:main Dec 7, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Existing nodeclaims READY status becomes Unknown
4 participants