-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
What would you like to be added (User Story)?
As a developer of pod-based control-plane providers I would like to use the docker infrastructure provider for testing and development. I will provide my own load-balancer for the control-plane and therefore I require the ability to skip provisioning the DockerCluster load-balancer.
Detailed Description
A new field should be added to the DockerCluster resource:
// DockerLoadBalancer allows defining configurations for the cluster load balancer.
type DockerLoadBalancer struct {
//...
// ExternallyManaged indicates the load balancer is managed outside of CAPD.
// When true, CAPD will not provision a load balancer.
// +optional
ExternallyManaged bool `json:"externallyManaged,omitempty"`
}dockercluster_backend.go should be updated to account for the new field and mark the load-balancer as ready if it is externally managed:
// Reconcile the external load balancer or mark ready if externally managed
if !dockerCluster.Spec.Backend.Docker.LoadBalancer.ExternallyManaged {
if err := r.reconcileLoadBalancer(ctx, cluster, dockerCluster); err != nil {
return ctrl.Result{}, err
}
} else {
v1beta1conditions.MarkTrue(dockerCluster, infrav1.LoadBalancerAvailableV1Beta1Condition)
conditions.Set(dockerCluster, metav1.Condition{
Type: infrav1.DevClusterDockerLoadBalancerAvailableCondition,
Status: metav1.ConditionTrue,
Reason: infrav1.DevClusterDockerLoadBalancerAvailableReason,
Message: "Load balancer is externally managed",
})
}Anything else you would like to add?
In addition to the above changes conversion code will be required.
We've been carrying our own fork for this purpose for over a year and believe it has value for others working on control plane as pods (kamaji, hosted control planes etc...).
Label(s) to be applied
/kind feature
/area provider/infrastructure-docker