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
20 changes: 18 additions & 2 deletions config/v1/0000_10_config-operator_01_infrastructure.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ spec:
kubevirt:
description: Kubevirt contains settings specific to the kubevirt infrastructure provider.
type: object
nutanix:
description: Nutanix contains settings specific to the Nutanix infrastructure provider.
type: object
openstack:
description: OpenStack contains settings specific to the OpenStack infrastructure provider.
type: object
Expand All @@ -99,7 +102,7 @@ spec:
description: PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider.
type: object
type:
description: 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 enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud" and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.
description: 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 enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.
type: string
enum:
- ""
Expand All @@ -117,6 +120,7 @@ spec:
- EquinixMetal
- PowerVS
- AlibabaCloud
- Nutanix
vsphere:
description: VSphere contains settings specific to the VSphere infrastructure provider.
type: object
Expand Down Expand Up @@ -170,6 +174,7 @@ spec:
- EquinixMetal
- PowerVS
- AlibabaCloud
- Nutanix
platformStatus:
description: platformStatus holds status information specific to the underlying infrastructure provider.
type: object
Expand Down Expand Up @@ -340,6 +345,16 @@ spec:
ingressIP:
description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
type: string
nutanix:
description: Nutanix contains settings specific to the Nutanix infrastructure provider.
type: object
properties:
apiServerInternalIP:
description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.
type: string
ingressIP:
description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
type: string
openstack:
description: OpenStack contains settings specific to the OpenStack infrastructure provider.
type: object
Expand Down Expand Up @@ -402,7 +417,7 @@ spec:
description: 'zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported'
type: string
type:
description: "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 enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. \n This value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set."
description: "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 enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. \n This value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set."
type: string
enum:
- ""
Expand All @@ -420,6 +435,7 @@ spec:
- EquinixMetal
- PowerVS
- AlibabaCloud
- Nutanix
vsphere:
description: VSphere contains settings specific to the VSphere infrastructure provider.
type: object
Expand Down
34 changes: 31 additions & 3 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const (
)

// PlatformType is a specific supported infrastructure provider.
// +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud
// +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud;Nutanix
type PlatformType string

const (
Expand Down Expand Up @@ -169,6 +169,9 @@ const (

// AlibabaCloudPlatformType represents Alibaba Cloud infrastructure.
AlibabaCloudPlatformType PlatformType = "AlibabaCloud"

// NutanixPlatformType represents Nutanix infrastructure.
NutanixPlatformType PlatformType = "Nutanix"
Copy link
Contributor

Choose a reason for hiding this comment

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

This value needs to be added to the +kubebuilder:validation:Enum annotation on the PlatformType type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@staebler Added the value as requested.

)

// IBMCloudProviderType is a specific supported IBM Cloud provider cluster type
Expand All @@ -192,7 +195,7 @@ type PlatformSpec struct {
// other integrations are enabled. If None, no infrastructure automation is
// enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt",
// "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS",
// "AlibabaCloud" and "None". Individual components may not support all platforms,
// "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms,
// and must handle unrecognized platforms as None if they do not support that platform.
//
// +unionDiscriminator
Expand Down Expand Up @@ -245,6 +248,10 @@ type PlatformSpec struct {
// AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.
// +optional
AlibabaCloud *AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"`

// Nutanix contains settings specific to the Nutanix infrastructure provider.
// +optional
Nutanix *NutanixPlatformSpec `json:"nutanix,omitempty"`
}

// PlatformStatus holds the current status specific to the underlying infrastructure provider
Expand All @@ -256,7 +263,7 @@ type PlatformStatus struct {
// balancers, dynamic volume provisioning, machine creation and deletion, and
// other integrations are enabled. If None, no infrastructure automation is
// enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt",
// "OpenStack", "VSphere", "oVirt", "EquinixMetal", "PowerVS", "AlibabaCloud" and "None".
// "OpenStack", "VSphere", "oVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None".
// Individual components may not support all platforms, and must handle
// unrecognized platforms as None if they do not support that platform.
//
Expand Down Expand Up @@ -311,6 +318,10 @@ type PlatformStatus struct {
// AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.
// +optional
AlibabaCloud *AlibabaCloudPlatformStatus `json:"alibabaCloud,omitempty"`

// Nutanix contains settings specific to the Nutanix infrastructure provider.
// +optional
Nutanix *NutanixPlatformStatus `json:"nutanix,omitempty"`
}

// AWSServiceEndpoint store the configuration of a custom url to
Expand Down Expand Up @@ -678,6 +689,23 @@ type AlibabaCloudResourceTag struct {
Value string `json:"value"`
}

// NutanixPlatformSpec holds the desired state of the Nutanix infrastructure provider.
// This only includes fields that can be modified in the cluster.
type NutanixPlatformSpec struct{}

// NutanixPlatformStatus holds the current status of the Nutanix infrastructure provider.
type NutanixPlatformStatus struct {
// apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used
// by components inside the cluster, like kubelets using the infrastructure rather
// than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
// points to. It is the IP for a self-hosted load balancer in front of the API servers.
APIServerInternalIP string `json:"apiServerInternalIP,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this in addition?

Copy link
Contributor

@thunderboltsid thunderboltsid Feb 2, 2022

Choose a reason for hiding this comment

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

@sttts Correct me if I'm wrong but AFAIK on-prem platforms are expected to provide both these fields to the machine config operator. see: https://github.com/openshift/machine-config-operator/pull/2852/files#


// ingressIP is an external IP which routes to the default ingress controller.
// The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
IngressIP string `json:"ingressIP,omitempty"`
}

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

// InfrastructureList is
Expand Down
42 changes: 42 additions & 0 deletions config/v1/zz_generated.deepcopy.go

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

24 changes: 22 additions & 2 deletions 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.