-
Notifications
You must be signed in to change notification settings - Fork 585
config/v1/types_infrastructure.go: add service endpoints to aws platform status #599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,10 @@ type InfrastructureSpec struct { | |
| // The namespace for this config map is openshift-config. | ||
| // +optional | ||
| CloudConfig ConfigMapFileReference `json:"cloudConfig"` | ||
|
|
||
| // platformSpec holds desired information specific to the underlying | ||
| // infrastructure provider. | ||
| PlatformSpec PlatformSpec `json:"platformSpec,omitempty"` | ||
| } | ||
|
|
||
| // InfrastructureStatus describes the infrastructure the cluster is leveraging. | ||
|
|
@@ -65,6 +69,7 @@ type InfrastructureStatus struct { | |
| } | ||
|
|
||
| // PlatformType is a specific supported infrastructure provider. | ||
| // +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud | ||
| type PlatformType string | ||
|
|
||
| const ( | ||
|
|
@@ -110,6 +115,55 @@ const ( | |
| IBMCloudProviderTypeVPC IBMCloudProviderType = "VPC" | ||
| ) | ||
|
|
||
| // PlatformSpec holds the desired state specific to the underlying infrastructure provider | ||
| // of the current cluster. Since these are used at spec-level for the underlying cluster, it | ||
| // is supposed that only one of the spec structs is set. | ||
| type PlatformSpec struct { | ||
| // type 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how will you migrate existing clusters on update?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @deads2k But if you think emptying out the spec to just platform type and empty platform spec is more suitable, which i don't think we should be doing, we (same team that is doing the platformstatus migration) can write the migration to set it. secondary, there is planned change to validations (in openshift kube-apiserver) to make sure the type doesn't change once set. i.e when the platformSpec is once set, it can't change the type. |
||
| // enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", | ||
| // "OpenStack", "VSphere", "oVirt", and "None". Individual components may not support | ||
| // all platforms, and must handle unrecognized platforms as None if they do | ||
| // not support that platform. | ||
| // | ||
| // +unionDiscriminator | ||
| Type PlatformType `json:"type"` | ||
deads2k marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // AWS contains settings specific to the Amazon Web Services infrastructure provider. | ||
| // +optional | ||
| AWS *AWSPlatformSpec `json:"aws,omitempty"` | ||
|
|
||
| // Azure contains settings specific to the Azure infrastructure provider. | ||
| // +optional | ||
| Azure *AzurePlatformSpec `json:"azure,omitempty"` | ||
|
|
||
| // GCP contains settings specific to the Google Cloud Platform infrastructure provider. | ||
| // +optional | ||
| GCP *GCPPlatformSpec `json:"gcp,omitempty"` | ||
|
|
||
| // BareMetal contains settings specific to the BareMetal platform. | ||
| // +optional | ||
| BareMetal *BareMetalPlatformSpec `json:"baremetal,omitempty"` | ||
|
|
||
| // OpenStack contains settings specific to the OpenStack infrastructure provider. | ||
| // +optional | ||
| OpenStack *OpenStackPlatformSpec `json:"openstack,omitempty"` | ||
|
|
||
| // Ovirt contains settings specific to the oVirt infrastructure provider. | ||
| // +optional | ||
| Ovirt *OvirtPlatformSpec `json:"ovirt,omitempty"` | ||
|
|
||
| // VSphere contains settings specific to the VSphere infrastructure provider. | ||
| // +optional | ||
| VSphere *VSpherePlatformSpec `json:"vsphere,omitempty"` | ||
|
|
||
| // IBMCloud contains settings specific to the IBMCloud infrastructure provider. | ||
| // +optional | ||
| IBMCloud *IBMCloudPlatformSpec `json:"ibmcloud,omitempty"` | ||
| } | ||
|
|
||
| // 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. | ||
|
|
@@ -122,6 +176,9 @@ type PlatformStatus struct { | |
| // "OpenStack", "VSphere", "oVirt", and "None". Individual components may not support | ||
| // all platforms, and must handle unrecognized platforms as None if they do | ||
| // not support that platform. | ||
| // | ||
| // This value will be synced with to the `status.platform` and `status.platformStatus.type`. | ||
| // Currently this value cannot be changed once set. | ||
| Type PlatformType `json:"type"` | ||
|
|
||
| // AWS contains settings specific to the Amazon Web Services infrastructure provider. | ||
|
|
@@ -157,12 +214,50 @@ type PlatformStatus struct { | |
| IBMCloud *IBMCloudPlatformStatus `json:"ibmcloud,omitempty"` | ||
| } | ||
|
|
||
| // AWSServiceEndpoint store the configuration of a custom url to | ||
| // override existing defaults of AWS Services. | ||
| type AWSServiceEndpoint struct { | ||
| // name is the name of the AWS service. | ||
| // The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html | ||
| // This must be provided and cannot be empty. | ||
| // | ||
| // +kubebuilder:validation:Pattern=`^[a-z0-9-]+$` | ||
| Name string `json:"name"` | ||
|
|
||
| // url is fully qualified URI with scheme https, that overrides the default generated | ||
| // endpoint for a client. | ||
| // This must be provided and cannot be empty. | ||
| // | ||
| // +kubebuilder:validation:Pattern=`^https://` | ||
| URL string `json:"url"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @damemi do we default to required or optional? Is there any downside to simply specifying everything?
deads2k marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| // AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type AWSPlatformSpec struct { | ||
| // serviceEndpoints list contains custom endpoints which will override default | ||
| // service endpoint of AWS Services. | ||
| // There must be only one ServiceEndpoint for a service. | ||
| // +optional | ||
| ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"` | ||
| } | ||
|
|
||
| // AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider. | ||
| type AWSPlatformStatus struct { | ||
| // region holds the default AWS region for new AWS resources created by the cluster. | ||
| Region string `json:"region"` | ||
|
|
||
| // ServiceEndpoints list contains custom endpoints which will override default | ||
| // service endpoint of AWS Services. | ||
| // There must be only one ServiceEndpoint for a service. | ||
| // +optional | ||
| ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"` | ||
| } | ||
|
|
||
| // AzurePlatformSpec holds the desired state of the Azure infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type AzurePlatformSpec struct{} | ||
|
|
||
| // AzurePlatformStatus holds the current status of the Azure infrastructure provider. | ||
| type AzurePlatformStatus struct { | ||
| // resourceGroupName is the Resource Group for new Azure resources created for the cluster. | ||
|
|
@@ -174,6 +269,10 @@ type AzurePlatformStatus struct { | |
| NetworkResourceGroupName string `json:"networkResourceGroupName,omitempty"` | ||
| } | ||
|
|
||
| // GCPPlatformSpec holds the desired state of the Google Cloud Platform infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type GCPPlatformSpec struct{} | ||
|
|
||
| // GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider. | ||
| type GCPPlatformStatus struct { | ||
| // resourceGroupName is the Project ID for new GCP resources created for the cluster. | ||
|
|
@@ -183,6 +282,10 @@ type GCPPlatformStatus struct { | |
| Region string `json:"region"` | ||
| } | ||
|
|
||
| // BareMetalPlatformSpec holds the desired state of the BareMetal infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type BareMetalPlatformSpec struct{} | ||
|
|
||
| // BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider. | ||
| // For more information about the network architecture used with the BareMetal platform type, see: | ||
| // https://github.com/openshift/installer/blob/master/docs/design/baremetal/networking-infrastructure.md | ||
|
|
@@ -206,6 +309,10 @@ type BareMetalPlatformStatus struct { | |
| NodeDNSIP string `json:"nodeDNSIP,omitempty"` | ||
| } | ||
|
|
||
| // OpenStackPlatformSpec holds the desired state of the OpenStack infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type OpenStackPlatformSpec struct{} | ||
|
|
||
| // OpenStackPlatformStatus holds the current status of the OpenStack infrastructure provider. | ||
| type OpenStackPlatformStatus struct { | ||
| // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used | ||
|
|
@@ -231,6 +338,10 @@ type OpenStackPlatformStatus struct { | |
| NodeDNSIP string `json:"nodeDNSIP,omitempty"` | ||
| } | ||
|
|
||
| // OvirtPlatformSpec holds the desired state of the oVirt infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type OvirtPlatformSpec struct{} | ||
|
|
||
| // OvirtPlatformStatus holds the current status of the oVirt infrastructure provider. | ||
| type OvirtPlatformStatus struct { | ||
| // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used | ||
|
|
@@ -252,6 +363,10 @@ type OvirtPlatformStatus struct { | |
| NodeDNSIP string `json:"nodeDNSIP,omitempty"` | ||
| } | ||
|
|
||
| // VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type VSpherePlatformSpec struct{} | ||
|
|
||
| // VSpherePlatformStatus holds the current status of the vSphere infrastructure provider. | ||
| type VSpherePlatformStatus struct { | ||
| // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used | ||
|
|
@@ -273,6 +388,10 @@ type VSpherePlatformStatus struct { | |
| NodeDNSIP string `json:"nodeDNSIP,omitempty"` | ||
| } | ||
|
|
||
| // IBMCloudPlatformSpec holds the desired state of the IBMCloud infrastructure provider. | ||
| // This only includes fields that can be modified in the cluster. | ||
| type IBMCloudPlatformSpec struct{} | ||
|
|
||
| //IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider. | ||
| type IBMCloudPlatformStatus struct { | ||
| // Location is where the cluster has been deployed | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indicate how these are vetted, validated, and promoted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdym by
these? individual platform specs or something else.