Skip to content

Commit

Permalink
Merge pull request #784 from detiber/metal
Browse files Browse the repository at this point in the history
Add EquinixMetal config api types
  • Loading branch information
openshift-merge-robot authored Feb 9, 2021
2 parents 257d10d + ef12c70 commit 175513f
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 33 deletions.
45 changes: 37 additions & 8 deletions config/v1/0000_10_config-operator_01_infrastructure.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ spec:
description: BareMetal contains settings specific to the BareMetal
platform.
type: object
equinixMetal:
description: EquinixMetal contains settings specific to the Equinix
Metal infrastructure provider.
type: object
gcp:
description: GCP contains settings specific to the Google Cloud
Platform infrastructure provider.
Expand Down Expand Up @@ -134,9 +138,10 @@ spec:
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" and "None". Individual components
may not support all platforms, and must handle unrecognized
platforms as None if they do not support that platform.
"VSphere", "oVirt", "KubeVirt", "EquinixMetal", 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 @@ -151,6 +156,7 @@ spec:
- oVirt
- IBMCloud
- KubeVirt
- EquinixMetal
vsphere:
description: VSphere contains settings specific to the VSphere
infrastructure provider.
Expand Down Expand Up @@ -227,6 +233,7 @@ spec:
- oVirt
- IBMCloud
- KubeVirt
- EquinixMetal
platformStatus:
description: platformStatus holds status information specific to the
underlying infrastructure provider.
Expand Down Expand Up @@ -318,6 +325,26 @@ spec:
DNS, a DNS service is hosted as a static pod to serve those
hostnames to the nodes in the cluster.
type: string
equinixMetal:
description: EquinixMetal contains settings specific to the Equinix
Metal 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
gcp:
description: GCP contains settings specific to the Google Cloud
Platform infrastructure provider.
Expand Down Expand Up @@ -431,11 +458,12 @@ spec:
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\", 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."
\"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", 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 @@ -450,6 +478,7 @@ spec:
- oVirt
- IBMCloud
- KubeVirt
- EquinixMetal
vsphere:
description: VSphere contains settings specific to the VSphere
infrastructure provider.
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 @@ -108,7 +108,7 @@ const (
)

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

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

// KubevirtPlatformType represents KubeVirt/Openshift Virtualization infrastructure.
KubevirtPlatformType PlatformType = "KubeVirt"

// EquinixMetalPlatformType represents Equinix Metal infrastructure.
EquinixMetalPlatformType PlatformType = "EquinixMetal"
)

// IBMCloudProviderType is a specific supported IBM Cloud provider cluster type
Expand All @@ -166,7 +169,7 @@ type PlatformSpec 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", "KubeVirt" and "None". Individual components may not support
// "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", 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 @@ -208,6 +211,10 @@ type PlatformSpec struct {
// Kubevirt contains settings specific to the kubevirt infrastructure provider.
// +optional
Kubevirt *KubevirtPlatformSpec `json:"kubevirt,omitempty"`

// EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.
// +optional
EquinixMetal *EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"`
}

// PlatformStatus holds the current status specific to the underlying infrastructure provider
Expand All @@ -219,7 +226,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", and "None". Individual components may not support
// "OpenStack", "VSphere", "oVirt", "EquinixMetal", 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 @@ -262,6 +269,10 @@ type PlatformStatus struct {
// Kubevirt contains settings specific to the kubevirt infrastructure provider.
// +optional
Kubevirt *KubevirtPlatformStatus `json:"kubevirt,omitempty"`

// EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.
// +optional
EquinixMetal *EquinixMetalPlatformStatus `json:"equinixMetal,omitempty"`
}

// AWSServiceEndpoint store the configuration of a custom url to
Expand Down Expand Up @@ -490,6 +501,23 @@ type KubevirtPlatformStatus struct {
IngressIP string `json:"ingressIP,omitempty"`
}

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

// EquinixMetalPlatformStatus holds the current status of the Equinix Metal infrastructure provider.
type EquinixMetalPlatformStatus 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"`

// 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.

Loading

0 comments on commit 175513f

Please sign in to comment.