Skip to content

Commit

Permalink
MGMT-19500: Enable installation of baremetal / vsphere cluster with u…
Browse files Browse the repository at this point in the history
…ser managed load balacer and nodes are part of the same subnet
  • Loading branch information
danmanor committed Dec 16, 2024
1 parent 7b14efe commit d777368
Show file tree
Hide file tree
Showing 47 changed files with 2,237 additions and 73 deletions.
32 changes: 32 additions & 0 deletions api/hiveextension/v1beta1/agentclusterinstall_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ type AgentClusterInstallSpec struct {
// Set per cluster mirror registry
// +optional
MirrorRegistryRef *MirrorRegistryConfigMapReference `json:"mirrorRegistryRef,omitempty"`

// LoadBalancer defines the load balancer used by the cluster for ingress traffic.
// +optional
LoadBalancer *LoadBalancer `json:"loadBalancer,omitempty"`
}

// IgnitionEndpoint stores the data to of the custom ignition endpoint.
Expand Down Expand Up @@ -506,6 +510,34 @@ type ManifestsConfigMapReference struct {
Name string `json:"name"`
}

// LoadBalancer defines the load balancer used by the cluster.
// +union
type LoadBalancer struct {
// Type defines the type of load balancer used by the cluster, which can be managed by the user or by the
// cluster. The default value is ClusterManaged.
// +default="ClusterManaged"
// +kubebuilder:default:="ClusterManaged"
// +kubebuilder:validation:Enum:="ClusterManaged";"UserManaged"
// +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="type is immutable once set"
// +optional
// +unionDiscriminator
Type LoadBalancerType `json:"type,omitempty"`
}

// LoadBalancerType defines the type of load balancer used by the cluster.
type LoadBalancerType string

const (
// LoadBalancerTypeClusterManaged is a load balancer with virtual IP addresses managed internally by the
// cluster.
LoadBalancerTypeClusterManaged LoadBalancerType = "ClusterManaged"

// LoadBalancerTypeUserManaged is a load balancer managed outside of the cluster by the customer. When this is
// used no virtual IP addresses should be specified. Note that this is only allowed for the bare metal and
// vSphere platforms.
LoadBalancerTypeUserManaged LoadBalancerType = "UserManaged"
)

func init() {
SchemeBuilder.Register(&AgentClusterInstall{}, &AgentClusterInstallList{})
}
Expand Down
20 changes: 20 additions & 0 deletions api/hiveextension/v1beta1/zz_generated.deepcopy.go

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

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

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

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

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

Loading

0 comments on commit d777368

Please sign in to comment.