Skip to content

Conversation

@ironcladlou
Copy link
Contributor

@ironcladlou ironcladlou commented Dec 19, 2018

Rename the Infrastructure CloudProvider field to Platform in an effort to more
clearly establish the value is not directly mapped to Kubernetes cloud provider
constants. Kubernetes cloud provider names may be derived from the value.

/cc @openshift/sig-network-edge @openshift/installer @derekwaynecarr @deads2k @rajatchopra @flaper87 @smarterclayton @abhinavdahiya @staebler

@abhinavdahiya
Copy link
Contributor

The field name Platform is more synonymous with what installer installs. And clubbing that info into CloudProvider is loss of information.

/approve


type InfrastructureStatus struct {
// cloudProvider is the IaaS provider that is running the cluster.
// Platform is the IaaS provider that is running the cluster.
Copy link
Contributor

@smarterclayton smarterclayton Dec 19, 2018

Choose a reason for hiding this comment

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

It's not actually an IaaS provider. Let's fix the message too here. (remember, you must use lower case names for fields)

platform is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If unset, no infrastructure automation is enabled.

However, we also need to correct the constants to be consistent with our API rules (should be AWS, OpenStack) and we should have an explicit None option. That can be a follow up, but must happen before 4.0.

Copy link
Contributor

Choose a reason for hiding this comment

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

Eventually we also need to document the rules for changes are (are users allowed to change this, what happens if it is wrong, etc).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took a stab at implementing this feedback, PTAL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@smarterclayton ping, would love to wrap this up today if possible

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 19, 2018
@ironcladlou ironcladlou force-pushed the cloud-provider-refactor branch from be384e8 to 8d79f80 Compare December 20, 2018 15:06

// openStackPlatform represents OpenStack.
OpenStackPlatform PlatformType = "openstack"

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add libvirt too? We already at least have machine management

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@ironcladlou ironcladlou force-pushed the cloud-provider-refactor branch from 8d79f80 to 586402d Compare December 20, 2018 15:32
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 20, 2018
@abhinavdahiya
Copy link
Contributor

ping @smarterclayton @deads2k @knobunc

@ironcladlou
Copy link
Contributor Author

ping @deads2k @smarterclayton

LibvirtPlatform PlatformType = "libvirt"

// nonePlatform means there is no infrastructure provider.
NonePlatform PlatformType = "none"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be using Kube style constants unless we have a reason not to. None, LibVirt, AWS, OpenStack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks for the feedback

Copy link
Contributor

@smarterclayton smarterclayton left a comment

Choose a reason for hiding this comment

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

One comment about constants

Rename the Infrastructure CloudProvider field to Platform in an effort to more
clearly establish the value is not directly mapped to Kubernetes cloud provider
constants. Kubernetes cloud provider names may be derived from the value.
@ironcladlou ironcladlou force-pushed the cloud-provider-refactor branch from 586402d to 410d994 Compare January 8, 2019 00:55
@ironcladlou
Copy link
Contributor Author

All feedback addressed, PTAL

@smarterclayton
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, ironcladlou, smarterclayton

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-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2019
@ironcladlou
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit aab033b into openshift:master Jan 8, 2019
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants