Skip to content

✨ v1beta2 contract: define v1beta2 condition type and reason const - #6187

Open
andclt wants to merge 1 commit into
kubernetes-sigs:mainfrom
andclt:v1beta2-condition-constants
Open

✨ v1beta2 contract: define v1beta2 condition type and reason const#6187
andclt wants to merge 1 commit into
kubernetes-sigs:mainfrom
andclt:v1beta2-condition-constants

Conversation

@andclt

@andclt andclt commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Defines new v1beta2 condition type and reason constants as plain string type (not clusterv1beta1.ConditionType) for use with []metav1.Condition. This is part of CAPA's migration to the CAPI v1beta2 provider contract (Phase 1).

New constants follow CAPV's naming convention:

  • Condition types: {Resource}{ConditionName}Condition — e.g. AWSClusterVpcReadyCondition = "VpcReady"
  • Summary/ready conditions: {Resource}ReadyCondition = clusterv1.ReadyCondition
  • Reason constants: reuse clusterv1.ReadyReason, clusterv1.NotReadyReason, clusterv1.DeletingReason where applicable; provider-specific reasons as {Resource}{Reason}Reason

New v1beta2_condition_consts.go files are added in each API package covering all resources: AWSCluster, AWSMachine, AWSMachinePool, AWSManagedMachinePool, AWSFargateProfile, AWSManagedControlPlane, ROSAControlPlane, ROSAMachinePool, ROSACluster, ROSANetwork, ROSARoleConfig, ROSAOCMRoleConfig, EKSConfig, and NodeadmConfig.

These constants are purely additive and sit alongside the existing clusterv1beta1.ConditionType constants. They will be consumed by controllers in a later sub-task (#6103: dual-write).

Which issue(s) this PR fixes (optional, in fixes #(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #6101

Special notes for your reviewer:

  • Constants are additive only, no controller or reconciliation logic changes.
  • Old constants with VpcEndpointsReadyCondition had the string value with the suffix Condition ("VpcEndpointsReadyCondition"). The new constant uses "VpcEndpointsReady".
  • Old S3BucketReadyCondition used value "S3BucketCreated". The new constant uses "S3BucketReady".

AI Usage:

Claude Code was used to assist with drafting the constant definitions and doc comments.

Checklist:

  • squashed commits
  • includes documentation
  • includes AI generated content
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

release-note
Define v1beta2 condition type and reason constants for all CAPA provider resources, following CAPV's naming convention, as part of the CAPI v1beta2 contract migration.

@kubernetes-prow kubernetes-prow Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 17, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @andclt. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@andclt andclt changed the title 🌱 v1beta2 contract: define v1beta2 condition type and reason const ✨ v1beta2 contract: define v1beta2 condition type and reason const Aug 17, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from AndiDog and serngawy August 17, 2026 15:01
@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 17, 2026
@andclt
andclt marked this pull request as ready for review August 18, 2026 13:02
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 18, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from nrb August 18, 2026 13:02
AWSClusterLoadBalancerReadyCondition = "LoadBalancerReady"

// AWSClusterS3BucketReadyCondition reports on the successful reconciliation of an S3 bucket.
AWSClusterS3BucketReadyCondition = "S3BucketReady"

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.

The old constant used S3BucketCreated, I've changed it to S3BucketReady for consistency


// AWSClusterVpcEndpointsReadyCondition reports on the successful reconciliation of VPC endpoints.
// Only applicable to managed clusters.
AWSClusterVpcEndpointsReadyCondition = "VpcEndpointsReady"

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.

the old constant used VpcEndpointsReadyCondition has value, dropped Condition suffix for consistency

@richardcase

Copy link
Copy Markdown
Member

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 21, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

@andclt: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-apidiff-main 8159d96 link false /test pull-cluster-api-provider-aws-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1beta2 contract: define v1beta2 condition type and reason constants

2 participants