Skip to content

Commit 362aeb1

Browse files
committed
WiP: Refactor code
1 parent 4634a5a commit 362aeb1

File tree

8 files changed

+239
-111
lines changed

8 files changed

+239
-111
lines changed

api/v1beta1/types.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -887,27 +887,31 @@ type APIServerLoadBalancer struct {
887887

888888
// APIServerLoadBalancerMonitor contains configuration for the load balancer health monitor.
889889
type APIServerLoadBalancerMonitor struct {
890-
// Delay is the time in seconds between sending probes to members. Default is 10.
890+
// Delay is the time in seconds between sending probes to members.
891891
//+optional
892-
//+kubebuilder:validation:Minimum=1
893-
Delay *int `json:"delay,omitempty"`
892+
//+kubebuilder:validation:Minimum=0
893+
//+kubebuilder:default:10
894+
Delay int `json:"delay,omitempty"`
894895

895-
// Timeout is the maximum time in seconds for a monitor to wait for a connection to be established before it times out. Default is 5.
896+
// Timeout is the maximum time in seconds for a monitor to wait for a connection to be established before it times out.
896897
//+optional
897-
//+kubebuilder:validation:Minimum=1
898-
Timeout *int `json:"timeout,omitempty"`
898+
//+kubebuilder:validation:Minimum=0
899+
//+kubebuilder:default:5
900+
Timeout int `json:"timeout,omitempty"`
899901

900-
// MaxRetries is the number of successful checks before changing the operating status of the member to ONLINE. Default is 5.
902+
// MaxRetries is the number of successful checks before changing the operating status of the member to ONLINE.
901903
//+optional
902-
//+kubebuilder:validation:Minimum=1
904+
//+kubebuilder:validation:Minimum=0
903905
//+kubebuilder:validation:Maximum=10
904-
MaxRetries *int `json:"maxRetries,omitempty"`
906+
//+kubebuilder:default:5
907+
MaxRetries int `json:"maxRetries,omitempty"`
905908

906-
// MaxRetriesDown is the number of allowed check failures before changing the operating status of the member to ERROR. Default is 3.
909+
// MaxRetriesDown is the number of allowed check failures before changing the operating status of the member to ERROR.
907910
//+optional
908911
//+kubebuilder:validation:Minimum=1
909912
//+kubebuilder:validation:Maximum=10
910-
MaxRetriesDown *int `json:"maxRetriesDown,omitempty"`
913+
//+kubebuilder:default:3
914+
MaxRetriesDown int `json:"maxRetriesDown,omitempty"`
911915
}
912916

913917
func (s *APIServerLoadBalancer) IsZero() bool {

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/models-schema/zz_generated.openapi.go

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

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml

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

docs/book/src/api/v1beta1/api.md

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/clients/mock/loadbalancer.go

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

0 commit comments

Comments
 (0)