Skip to content

Unstructured OpenstackProviderSpec#2202

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mce-2.3from
2uasimojo:HIVE-2308/unstructured-mce-2.3
Feb 7, 2024
Merged

Unstructured OpenstackProviderSpec#2202
openshift-merge-bot[bot] merged 1 commit intoopenshift:mce-2.3from
2uasimojo:HIVE-2308/unstructured-mce-2.3

Conversation

@2uasimojo
Copy link
Copy Markdown
Member

@2uasimojo 2uasimojo commented Feb 6, 2024

This is a manual backport of #2196 to address the move of OpenstackProviderSpec from cluster-api-provider-openstack to openstack/api/machine.

We need to decode OpenstackProviderSpec to steal the osImage from the master machines so we can use that value for new workers. Rather than importing both schemata, trying to figure out which version we're talking to, and decoding against the correct one, this commit unmarshals the providerSpec as raw JSON into an Unstructured object and explicitly paths into it map-wise.

On the creation side, we're told that the spoke cluster itself will understand the new thing even if it's an old version (MAPI also unmarshals the JSON raw). So it should be fine to continue using the existing version of vendored installer code to generate MachineSets.

HIVE-2308

This is a manual backport of openshift#2196 to address the move of
OpenstackProviderSpec from cluster-api-provider-openstack to
openstack/api/machine.

We need to decode OpenstackProviderSpec to steal the osImage from the
master machines so we can use that value for new workers. Rather than
importing both schemata, trying to figure out which version we're
talking to, and decoding against the correct one, this commit unmarshals
the providerSpec as raw JSON into an Unstructured object and explicitly
paths into it map-wise.

On the creation side, we're told that the spoke cluster itself will
understand the new thing even if it's an old version (MAPI also
unmarshals the JSON raw). So it should be fine to continue using the
existing version of vendored installer code to generate MachineSets.

HIVE-2308
@openshift-ci openshift-ci Bot requested review from abutcher and jstuever February 6, 2024 22:45
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2024
@2uasimojo
Copy link
Copy Markdown
Member Author

/assign @lleshchi

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 7, 2024

@2uasimojo: all tests passed!

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 7, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (6c369c0) 57.72% compared to head (a9d6267) 57.81%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           mce-2.3    #2202      +/-   ##
===========================================
+ Coverage    57.72%   57.81%   +0.09%     
===========================================
  Files          186      186              
  Lines        25231    25226       -5     
===========================================
+ Hits         14564    14585      +21     
+ Misses        9428     9401      -27     
- Partials      1239     1240       +1     
Files Coverage Δ
...g/controller/machinepool/machinepool_controller.go 48.97% <0.00%> (+0.13%) ⬆️
pkg/controller/machinepool/openstackactuator.go 19.44% <78.26%> (+19.44%) ⬆️

@lleshchi
Copy link
Copy Markdown
Contributor

lleshchi commented Feb 7, 2024

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2024
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, lleshchi

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

@openshift-merge-bot openshift-merge-bot Bot merged commit 027b2e6 into openshift:mce-2.3 Feb 7, 2024
@2uasimojo 2uasimojo deleted the HIVE-2308/unstructured-mce-2.3 branch February 7, 2024 16:02
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants