From 410d9946edf56ab0bad81164e9203d807fad7a9b Mon Sep 17 00:00:00 2001 From: Dan Mace Date: Wed, 19 Dec 2018 13:17:14 -0500 Subject: [PATCH] Rename Infrastructure.CloudProvider to Platform 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. --- config/v1/types_infrastructure.go | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/config/v1/types_infrastructure.go b/config/v1/types_infrastructure.go index fff867d7211..42efc79db95 100644 --- a/config/v1/types_infrastructure.go +++ b/config/v1/types_infrastructure.go @@ -25,15 +25,31 @@ type InfrastructureSpec struct { } type InfrastructureStatus struct { - // cloudProvider is the IaaS provider that is running the cluster. - // - // Valid values are: - // - aws - // - openstack - // +optional - CloudProvider string `json:"cloudProvider,omitempty"` + // 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 None, no infrastructure automation is + // enabled. + Platform PlatformType `json:"platform,omitempty"` } +// platformType is a specific supported infrastructure provider. +type PlatformType string + +const ( + // awsPlatform represents Amazon AWS. + AWSPlatform PlatformType = "AWS" + + // openStackPlatform represents OpenStack. + OpenStackPlatform PlatformType = "OpenStack" + + // libvirtPlatform represents libvirt. + LibvirtPlatform PlatformType = "Libvirt" + + // nonePlatform means there is no infrastructure provider. + NonePlatform PlatformType = "None" +) + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type InfrastructureList struct {