Skip to content

Commit 31ed616

Browse files
Merge pull request #182 from smarterclayton/more_constants
infra: Add more constants for platforms and update godoc
2 parents fe2e87b + a0697cd commit 31ed616

2 files changed

Lines changed: 33 additions & 9 deletions

File tree

config/v1/types_infrastructure.go

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
77
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
88

99
// Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster`
10-
// TODO this object is an example of a possible grouping and is subject to change or removal
1110
type Infrastructure struct {
1211
metav1.TypeMeta `json:",inline"`
1312
// Standard object's metadata.
@@ -19,39 +18,54 @@ type Infrastructure struct {
1918
Status InfrastructureStatus `json:"status"`
2019
}
2120

21+
// InfrastructureSpec contains settings that apply to the cluster infrastructure.
2222
type InfrastructureSpec struct {
2323
// secret reference?
2424
// configmap reference to file?
2525
}
2626

27+
// InfrastructureStatus describes the infrastructure the cluster is leveraging.
2728
type InfrastructureStatus struct {
2829
// platform is the underlying infrastructure provider for the cluster. This
2930
// value controls whether infrastructure automation such as service load
3031
// balancers, dynamic volume provisioning, machine creation and deletion, and
3132
// other integrations are enabled. If None, no infrastructure automation is
32-
// enabled.
33+
// enabled. Allowed values are "AWS", "Azure", "GCP", "Libvirt",
34+
// "OpenStack", "VSphere", and "None". Individual components may not support
35+
// all platforms, and must handle unrecognized platforms as None if they do
36+
// not support that platform.
3337
Platform PlatformType `json:"platform,omitempty"`
3438
}
3539

36-
// platformType is a specific supported infrastructure provider.
40+
// PlatformType is a specific supported infrastructure provider.
3741
type PlatformType string
3842

3943
const (
40-
// awsPlatform represents Amazon AWS.
44+
// AWSPlatform represents Amazon Web Services infrastructure.
4145
AWSPlatform PlatformType = "AWS"
4246

43-
// openStackPlatform represents OpenStack.
44-
OpenStackPlatform PlatformType = "OpenStack"
47+
// AzurePlatform represents Microsoft Azure infrastructure.
48+
AzurePlatform PlatformType = "Azure"
49+
50+
// GCPPlatform represents Google Cloud Platform infrastructure.
51+
GCPPlatform PlatformType = "GCP"
4552

46-
// libvirtPlatform represents libvirt.
53+
// LibvirtPlatform represents libvirt infrastructure.
4754
LibvirtPlatform PlatformType = "Libvirt"
4855

49-
// nonePlatform means there is no infrastructure provider.
56+
// OpenStackPlatform represents OpenStack infrastructure.
57+
OpenStackPlatform PlatformType = "OpenStack"
58+
59+
// NonePlatform means there is no infrastructure provider.
5060
NonePlatform PlatformType = "None"
61+
62+
// VSpherePlatform represents VMWare vSphere infrastructure.
63+
VSpherePlatform PlatformType = "VSphere"
5164
)
5265

5366
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
5467

68+
// InfrastructureList is
5569
type InfrastructureList struct {
5670
metav1.TypeMeta `json:",inline"`
5771
// Standard object's metadata.

config/v1/zz_generated.swagger_doc_generated.go

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)