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
MGMT-15690: Add support for external platform #5738
MGMT-15690: Add support for external platform #5738
Conversation
Skipping CI for Draft Pull Request. |
/test unit-test edge-e2e-metal-assisted edge-e2e-oci-assisted |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adriengentil 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 |
/test edge-unit-test |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5738 +/- ##
==========================================
+ Coverage 68.00% 69.38% +1.37%
==========================================
Files 233 234 +1
Lines 34324 36233 +1909
==========================================
+ Hits 23342 25140 +1798
- Misses 8915 8968 +53
- Partials 2067 2125 +58
|
935ee0c
to
6995910
Compare
@adriengentil: This pull request references MGMT-15690 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set. In response to this:
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. |
@adriengentil: This pull request references MGMT-15690 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set. In response to this:
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. |
@adriengentil: This pull request references MGMT-15690 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set. In response to this:
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. |
/cc @pawanpinjarkar |
Created a SNO cluster with:
Install config is updated accordingly:
And the infrastructure object of the cluster using the external integration without CCM is created as expected:
|
/test edge-e2e-oci-assisted |
6995910
to
8e08cb3
Compare
/retest |
/test edge-subsystem-aws edge-subsystem-kubeapi-aws |
internal/bminventory/inventory.go
Outdated
@@ -2543,6 +2543,17 @@ func (b *bareMetalInventory) updatePlatformParams(params installer.V2UpdateClust | |||
if params.ClusterUpdateParams.Platform != nil && common.PlatformTypeValue(params.ClusterUpdateParams.Platform.Type) != "" { | |||
updates["platform_type"] = params.ClusterUpdateParams.Platform.Type | |||
updates["platform_is_external"] = swag.BoolValue(params.ClusterUpdateParams.Platform.IsExternal) | |||
if *params.ClusterUpdateParams.Platform.Type == models.PlatformTypeExternal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometime we use common.PlatformTypeValue(params.ClusterUpdateParams.Platform.Type) and sometimes we use *params.ClusterUpdateParams.Platform.Type - why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
common.PlatformTypeValue()
returns an empty string when Platform.Type
is nil
. At this point of the code we know the type is not nil
, so it's safe to look at the content the variable.
internal/bminventory/inventory.go
Outdated
@@ -2543,6 +2543,17 @@ func (b *bareMetalInventory) updatePlatformParams(params installer.V2UpdateClust | |||
if params.ClusterUpdateParams.Platform != nil && common.PlatformTypeValue(params.ClusterUpdateParams.Platform.Type) != "" { | |||
updates["platform_type"] = params.ClusterUpdateParams.Platform.Type | |||
updates["platform_is_external"] = swag.BoolValue(params.ClusterUpdateParams.Platform.IsExternal) | |||
if *params.ClusterUpdateParams.Platform.Type == models.PlatformTypeExternal { | |||
if params.ClusterUpdateParams.Platform.External != nil && params.ClusterUpdateParams.Platform.External.PlatformName != nil { | |||
updates["platform_external_platform_name"] = params.ClusterUpdateParams.Platform.External.PlatformName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have consts for platform_external_platform_name, platform_external_cloud_controller_manager?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, those are columns names in DB, looks like we never defined any consts for them in the past 🤔
@@ -6221,6 +6225,28 @@ definitions: | |||
- vsphere | |||
- none | |||
- oci | |||
- external |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that we are going to remove oci, @avishayt ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will come in a follow-up PR, I need to plug the oci code to the external/platformName=oci, then I will be able to remove the oci platform type
@@ -5413,6 +5414,9 @@ definitions: | |||
properties: | |||
type: | |||
$ref: '#/definitions/platform_type' | |||
external: | |||
$ref: '#/definitions/platform_external' | |||
x-nullable: true | |||
is_external: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have another PR to remove is_external, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will remove oci
platform type and is_external
at the same time
@adriengentil: This pull request references MGMT-15690 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set. In response to this:
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. |
@adriengentil I successfully tested SNO IPV4 cluster installation for the external platform with the below config in the install-config via dev-scripts.
Ref installer PR openshift/installer#7585 |
/retest |
/retest |
@avishayt @gamli75 @rccrdpccl are we good to go with this PR? |
/override ci/prow/edge-e2e-nutanix-assisted ci/prow/edge-e2e-nutanix-assisted-4-14 ci/prow/edge-e2e-vsphere-assisted |
@adriengentil: Overrode contexts on behalf of adriengentil: ci/prow/edge-e2e-nutanix-assisted, ci/prow/edge-e2e-nutanix-assisted-4-14, ci/prow/edge-e2e-vsphere-assisted In response to this:
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. |
/lgtm Unhold whenever we're ready :) |
/unhold |
/retest |
@adriengentil: all tests passed! Full PR test history. Your PR dashboard. 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. |
external
and new structExternal
underPlatform
in order to configure itExternal
struct and ability to create/update it:platformName
: is required and must not be emptycloudControllerManager
: set to an empty string (CCM disabled) if not set explicitlyI will plug external platform/platformName=oci with the existing
oci
integration in a follow-up PR.