Skip to content

Commit c9b4e5b

Browse files
committed
Adds platform-specific specs to Infrastructure in config.openshift.io
1 parent c224882 commit c9b4e5b

File tree

1 file changed

+39
-14
lines changed

1 file changed

+39
-14
lines changed

config/v1/types_infrastructure.go

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ type InfrastructureSpec struct {
2828

2929
// InfrastructureStatus describes the infrastructure the cluster is leveraging.
3030
type InfrastructureStatus struct {
31+
// infrastructureName uniquely identifies a cluster with a human friendly name.
32+
// Once set it should not be changed. Must be of max length 27 and must have only
33+
// alphanumeric or hyphen characters.
34+
InfrastructureName string `json:"infrastructureName"`
35+
3136
// platform is the underlying infrastructure provider for the cluster. This
3237
// value controls whether infrastructure automation such as service load
3338
// balancers, dynamic volume provisioning, machine creation and deletion, and
@@ -38,6 +43,11 @@ type InfrastructureStatus struct {
3843
// not support that platform.
3944
Platform PlatformType `json:"platform,omitempty"`
4045

46+
// platformStatus holds status informations that are specific to the underlying
47+
// infrastructure provider of the cluster.
48+
// +optional
49+
PlatformStatus *PlatformStatus `json:"platformStatus,omitempty"`
50+
4151
// etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering
4252
// etcd servers and clients.
4353
// For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery
@@ -53,28 +63,43 @@ type InfrastructureStatus struct {
5363
type PlatformType string
5464

5565
const (
56-
// AWSPlatform represents Amazon Web Services infrastructure.
57-
AWSPlatform PlatformType = "AWS"
66+
// AWSPlatformType represents Amazon Web Services infrastructure.
67+
AWSPlatformType PlatformType = "AWS"
5868

59-
// AzurePlatform represents Microsoft Azure infrastructure.
60-
AzurePlatform PlatformType = "Azure"
69+
// AzurePlatformType represents Microsoft Azure infrastructure.
70+
AzurePlatformType PlatformType = "Azure"
6171

62-
// GCPPlatform represents Google Cloud Platform infrastructure.
63-
GCPPlatform PlatformType = "GCP"
72+
// GCPPlatformType represents Google Cloud Platform infrastructure.
73+
GCPPlatformType PlatformType = "GCP"
6474

65-
// LibvirtPlatform represents libvirt infrastructure.
66-
LibvirtPlatform PlatformType = "Libvirt"
75+
// LibvirtPlatformType represents libvirt infrastructure.
76+
LibvirtPlatformType PlatformType = "Libvirt"
6777

68-
// OpenStackPlatform represents OpenStack infrastructure.
69-
OpenStackPlatform PlatformType = "OpenStack"
78+
// OpenStackPlatformType represents OpenStack infrastructure.
79+
OpenStackPlatformType PlatformType = "OpenStack"
7080

71-
// NonePlatform means there is no infrastructure provider.
72-
NonePlatform PlatformType = "None"
81+
// NonePlatformType means there is no infrastructure provider.
82+
NonePlatformType PlatformType = "None"
7383

74-
// VSpherePlatform represents VMWare vSphere infrastructure.
75-
VSpherePlatform PlatformType = "VSphere"
84+
// VSpherePlatformType represents VMWare vSphere infrastructure.
85+
VSpherePlatformType PlatformType = "VSphere"
7686
)
7787

88+
// PlatformStatus holds the current status specific to the underlying infrastructure provider
89+
// of the current cluster. Since these are used at status-level for the underlying cluster, it
90+
// is supposed that only one of the status structs is set.
91+
type PlatformStatus struct {
92+
// AWSPlatformStatus contains settings specific to the Amazon Web Services infrastructure provider.
93+
// +optional
94+
AWSPlatformStatus *AWSPlatformStatus `json:"awsPlatformStatus,omitempty"`
95+
}
96+
97+
// AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.
98+
type AWSPlatformStatus struct {
99+
// tags holds key and value pairs that are set as tags in the AWS resources created by the cluster.
100+
Tags map[string]string `json:"tags,omitempty"`
101+
}
102+
78103
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
79104

80105
// InfrastructureList is

0 commit comments

Comments
 (0)