Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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

// InfrastructureSpec contains settings that apply to the cluster infrastructure.
type InfrastructureSpec struct {
// secret reference?
// configmap reference to file?
}

// InfrastructureStatus describes the infrastructure the cluster is leveraging.
type InfrastructureStatus struct {
// 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.
// enabled. Allowed values are "AWS", "Azure", "GCP", "Libvirt",
// "OpenStack", "VSphere", and "None". Individual components may not support
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need advice for components to indicate their lack of support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do, but that'll be in #1112. I don't want our public api docs to be instructions to our teams (beyond general statements), especially since we don't know the instructions quite yet.

// all platforms, and must handle unrecognized platforms as None if they do
// not support that platform.
Platform PlatformType `json:"platform,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

}

// platformType is a specific supported infrastructure provider.
// PlatformType is a specific supported infrastructure provider.
type PlatformType string

const (
// awsPlatform represents Amazon AWS.
// AWSPlatform represents Amazon Web Services infrastructure.
AWSPlatform PlatformType = "AWS"

// openStackPlatform represents OpenStack.
OpenStackPlatform PlatformType = "OpenStack"
// AzurePlatform represents Microsoft Azure infrastructure.
AzurePlatform PlatformType = "Azure"

// GCPPlatform represents Google Cloud Platform infrastructure.
GCPPlatform PlatformType = "GCP"

// libvirtPlatform represents libvirt.
// LibvirtPlatform represents libvirt infrastructure.
LibvirtPlatform PlatformType = "Libvirt"

// nonePlatform means there is no infrastructure provider.
// OpenStackPlatform represents OpenStack infrastructure.
OpenStackPlatform PlatformType = "OpenStack"

// NonePlatform means there is no infrastructure provider.
NonePlatform PlatformType = "None"

// VSpherePlatform represents VMWare vSphere infrastructure.
VSpherePlatform PlatformType = "VSphere"
)

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

// InfrastructureList is
type InfrastructureList struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
Expand Down
12 changes: 11 additions & 1 deletion config/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.