From d30f9650957df666c878ad1f2256556b5f18e657 Mon Sep 17 00:00:00 2001 From: Hiranmoy Das Chowdhury Date: Mon, 4 Nov 2024 17:57:10 +0600 Subject: [PATCH] Signed-off-by: Hiranmoy Das Chowdhury --- apis/ops/v1alpha1/pgbouncer_ops_types.go | 4 ++-- apis/ops/v1alpha1/pgbouncer_ops_types_enum.go | 5 +++++ crds/ops.kubedb.com_pgbounceropsrequests.yaml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apis/ops/v1alpha1/pgbouncer_ops_types.go b/apis/ops/v1alpha1/pgbouncer_ops_types.go index fa55b82096..41f914413e 100644 --- a/apis/ops/v1alpha1/pgbouncer_ops_types.go +++ b/apis/ops/v1alpha1/pgbouncer_ops_types.go @@ -75,8 +75,8 @@ type PgBouncerOpsRequestSpec struct { Apply ApplyOption `json:"apply,omitempty"` } -// +kubebuilder:validation:Enum=HorizontalScaling;VerticalScaling;UpdateVersion;Reconfigure;RotateAuth -// ENUM(HorizontalScaling, VerticalScaling, UpdateVersion, Reconfigure, RotateAuth) +// +kubebuilder:validation:Enum=HorizontalScaling;VerticalScaling;UpdateVersion;Reconfigure;RotateAuth;Restart +// ENUM(HorizontalScaling, VerticalScaling, UpdateVersion, Reconfigure, RotateAuth, Restart) type PgBouncerOpsRequestType string type PgBouncerUpdateVersionSpec struct { diff --git a/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go b/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go index 6043a822c9..915da9881a 100644 --- a/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go +++ b/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go @@ -22,6 +22,8 @@ const ( PgBouncerOpsRequestTypeReconfigure PgBouncerOpsRequestType = "Reconfigure" // PgBouncerOpsRequestTypeRotateAuth is a PgBouncerOpsRequestType of type RotateAuth. PgBouncerOpsRequestTypeRotateAuth PgBouncerOpsRequestType = "RotateAuth" + // PgBouncerOpsRequestTypeRestart is a PgBouncerOpsRequestType of type Restart. + PgBouncerOpsRequestTypeRestart PgBouncerOpsRequestType = "Restart" ) var ErrInvalidPgBouncerOpsRequestType = fmt.Errorf("not a valid PgBouncerOpsRequestType, try [%s]", strings.Join(_PgBouncerOpsRequestTypeNames, ", ")) @@ -32,6 +34,7 @@ var _PgBouncerOpsRequestTypeNames = []string{ string(PgBouncerOpsRequestTypeUpdateVersion), string(PgBouncerOpsRequestTypeReconfigure), string(PgBouncerOpsRequestTypeRotateAuth), + string(PgBouncerOpsRequestTypeRestart), } // PgBouncerOpsRequestTypeNames returns a list of possible string values of PgBouncerOpsRequestType. @@ -49,6 +52,7 @@ func PgBouncerOpsRequestTypeValues() []PgBouncerOpsRequestType { PgBouncerOpsRequestTypeUpdateVersion, PgBouncerOpsRequestTypeReconfigure, PgBouncerOpsRequestTypeRotateAuth, + PgBouncerOpsRequestTypeRestart, } } @@ -70,6 +74,7 @@ var _PgBouncerOpsRequestTypeValue = map[string]PgBouncerOpsRequestType{ "UpdateVersion": PgBouncerOpsRequestTypeUpdateVersion, "Reconfigure": PgBouncerOpsRequestTypeReconfigure, "RotateAuth": PgBouncerOpsRequestTypeRotateAuth, + "Restart": PgBouncerOpsRequestTypeRestart, } // ParsePgBouncerOpsRequestType attempts to convert a string to a PgBouncerOpsRequestType. diff --git a/crds/ops.kubedb.com_pgbounceropsrequests.yaml b/crds/ops.kubedb.com_pgbounceropsrequests.yaml index d48f5bac69..fb4a9b1c88 100644 --- a/crds/ops.kubedb.com_pgbounceropsrequests.yaml +++ b/crds/ops.kubedb.com_pgbounceropsrequests.yaml @@ -208,6 +208,7 @@ spec: - UpdateVersion - Reconfigure - RotateAuth + - Restart type: string updateVersion: properties: