Adds platform-specific specs to Infrastructure in config.openshift.io
@@ -28,6 +28,11 @@ type InfrastructureSpec struct {
// InfrastructureStatus describes the infrastructure the cluster is leveraging.
type InfrastructureStatus struct {
+ // infrastructureName uniquely identifies a cluster with a human friendly name.
+ // Once set it should not be changed. Must be of max length 27 and must have only
+ // alphanumeric or hyphen characters.
+ InfrastructureName string `json:"infrastructureName"`
+
// 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
@@ -38,6 +43,11 @@ type InfrastructureStatus struct {
// not support that platform.
Platform PlatformType `json:"platform,omitempty"`
+ // platformStatus holds status informations that are specific to the underlying
+ // infrastructure provider of the cluster.
+ // +optional
+ PlatformStatus *PlatformStatus `json:"platformStatus,omitempty"`
+
// etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering
// etcd servers and clients.
// 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 {
type PlatformType string
const (
- // AWSPlatform represents Amazon Web Services infrastructure.
- AWSPlatform PlatformType = "AWS"
+ // AWSPlatformType represents Amazon Web Services infrastructure.
+ AWSPlatformType PlatformType = "AWS"
- // AzurePlatform represents Microsoft Azure infrastructure.
- AzurePlatform PlatformType = "Azure"
+ // AzurePlatformType represents Microsoft Azure infrastructure.
+ AzurePlatformType PlatformType = "Azure"
- // GCPPlatform represents Google Cloud Platform infrastructure.
- GCPPlatform PlatformType = "GCP"
+ // GCPPlatformType represents Google Cloud Platform infrastructure.
+ GCPPlatformType PlatformType = "GCP"
- // LibvirtPlatform represents libvirt infrastructure.
- LibvirtPlatform PlatformType = "Libvirt"
+ // LibvirtPlatformType represents libvirt infrastructure.
+ LibvirtPlatformType PlatformType = "Libvirt"
- // OpenStackPlatform represents OpenStack infrastructure.
- OpenStackPlatform PlatformType = "OpenStack"
+ // OpenStackPlatformType represents OpenStack infrastructure.
+ OpenStackPlatformType PlatformType = "OpenStack"
- // NonePlatform means there is no infrastructure provider.
- NonePlatform PlatformType = "None"
+ // NonePlatformType means there is no infrastructure provider.
+ NonePlatformType PlatformType = "None"
- // VSpherePlatform represents VMWare vSphere infrastructure.
- VSpherePlatform PlatformType = "VSphere"
+ // VSpherePlatformType represents VMWare vSphere infrastructure.
+ VSpherePlatformType PlatformType = "VSphere"
)
+// PlatformStatus holds the current status specific to the underlying infrastructure provider
+// of the current cluster. Since these are used at status-level for the underlying cluster, it
+// is supposed that only one of the status structs is set.
+type PlatformStatus struct {
+ // AWSPlatformStatus contains settings specific to the Amazon Web Services infrastructure provider.
+ // +optional
+ AWSPlatformStatus *AWSPlatformStatus `json:"awsPlatformStatus,omitempty"`
+}
+
+// AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.
+type AWSPlatformStatus struct {
+ // tags holds key and value pairs that are set as tags in the AWS resources created by the cluster.
+ Tags map[string]string `json:"tags,omitempty"`
+}
+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// InfrastructureList is
