Skip to content

add distributionVersion field to controlplane #77

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

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

rccrdpccl
Copy link
Contributor

Added spec.distributionVersion field, see kubernetes-sigs/cluster-api#11816
Added status.version field. This should reflect K8s version, which we are extracting from the release image payload

This field changes the controlplane API, so we need to release a new version: v1alpha2

@openshift-ci openshift-ci bot requested review from eranco74 and gamli75 February 11, 2025 14:41
Copy link

openshift-ci bot commented Feb 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rccrdpccl

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

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 11, 2025
@rccrdpccl
Copy link
Contributor Author

/cc @CrystalChun @carbonin

@@ -17,7 +17,7 @@ limitations under the License.
// Package v1beta1 contains API Schema definitions for the controlplane v1beta1 API group
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oops looks like we missed this comment the first time

Suggested change
// Package v1beta1 contains API Schema definitions for the controlplane v1beta1 API group
// Package v1alpha2 contains API Schema definitions for the controlplane v1alpha2 API group

}

func (m *mockOpenShiftVersioner) GetK8sVersionFromReleaseImage(ctx context.Context, releaseImage string, oacp *controlplanev1alpha2.OpenshiftAssistedControlPlane) (*string, error) {
version := "1.30.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the mock/dummy in the test, we are already - I can add an assertion making sure status.version is 1.30.0
the real thing is happening here https://github.com/openshift-assisted/cluster-api-agent/blob/distribution-version/controlplane/internal/controller/openshiftassistedcontrolplane_controller.go#L172

@rccrdpccl rccrdpccl force-pushed the distribution-version branch from b8a3a5f to acd0245 Compare February 11, 2025 16:12
@rccrdpccl
Copy link
Contributor Author

Tests and linter failing because of release golang version (will change before merging), passing in local environment

@rccrdpccl
Copy link
Contributor Author

/retest

2 similar comments
@rccrdpccl
Copy link
Contributor Author

/retest

@rccrdpccl
Copy link
Contributor Author

/retest

@rccrdpccl rccrdpccl merged commit 1a1ac11 into master Feb 13, 2025
3 of 4 checks passed
@rccrdpccl rccrdpccl deleted the distribution-version branch April 9, 2025 14:46
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. 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.

2 participants