Skip to content

Commit 27ad1b6

Browse files
committed
feat: new virtualIP.configuration API
1 parent c4efea8 commit 27ad1b6

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

api/v1alpha1/common_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@ type ControlPlaneVirtualIPSpec struct {
4747
// +kubebuilder:validation:Enum=KubeVIP
4848
// +kubebuilder:default=KubeVIP
4949
Provider string `json:"provider,omitempty"`
50+
51+
// Configuration for the chosen control-plane virtual IP provider.
52+
// +kubebuilder:validation:Optional
53+
Configuration *ControlPlaneVirtualIPConfiguration `json:"configuration,omitempty"`
54+
}
55+
56+
type ControlPlaneVirtualIPConfiguration struct {
57+
// The virtual IP on which the API server is serving.
58+
// If left empty, the value from controlPlaneEndpoint.host will be used.
59+
// +kubebuilder:validation:Optional
60+
Address string `json:"address"`
61+
62+
// The port on which the API server is serving.
63+
// If left empty, the value from controlPlaneEndpoint.port will be used.
64+
// +kubebuilder:validation:Optional
65+
// +kubebuilder:validation:Minimum=1
66+
// +kubebuilder:validation:Maximum=65535
67+
Port int32 `json:"port"`
5068
}
5169

5270
// LocalObjectReference contains enough information to let you locate the

api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,23 @@ spec:
598598
virtualIP:
599599
description: Configuration for the virtual IP provider.
600600
properties:
601+
configuration:
602+
description: Configuration for the chosen control-plane virtual IP provider.
603+
properties:
604+
address:
605+
description: |-
606+
The virtual IP on which the API server is serving.
607+
If left empty, the value from controlPlaneEndpoint.host will be used.
608+
type: string
609+
port:
610+
description: |-
611+
The port on which the API server is serving.
612+
If left empty, the value from controlPlaneEndpoint.port will be used.
613+
format: int32
614+
maximum: 65535
615+
minimum: 1
616+
type: integer
617+
type: object
601618
provider:
602619
default: KubeVIP
603620
description: Virtual IP provider to deploy.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 23 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)