From a75252a4efe915d588decf6d8fbbfe93a9ad47a6 Mon Sep 17 00:00:00 2001 From: Saurov Chandra Biswas <48715910+souravbiswassanto@users.noreply.github.com> Date: Tue, 18 Feb 2025 20:09:59 +0600 Subject: [PATCH] Add PostgresOpsRequest ReconnectStandby, ForceFailover, SetRaftKeyPair (#1404) Signed-off-by: souravbiswassanto --- apis/ops/v1alpha1/constant.go | 36 ++++++++ apis/ops/v1alpha1/openapi_generated.go | 96 +++++++++++++++++++- apis/ops/v1alpha1/postgres_ops_types.go | 28 +++++- apis/ops/v1alpha1/postgres_ops_types_enum.go | 15 +++ apis/ops/v1alpha1/zz_generated.deepcopy.go | 80 ++++++++++++++++ crds/ops.kubedb.com_postgresopsrequests.yaml | 24 ++++- openapi/swagger.json | 45 +++++++++ 7 files changed, 319 insertions(+), 5 deletions(-) diff --git a/apis/ops/v1alpha1/constant.go b/apis/ops/v1alpha1/constant.go index 0dd2626814..860f5b4882 100644 --- a/apis/ops/v1alpha1/constant.go +++ b/apis/ops/v1alpha1/constant.go @@ -309,6 +309,42 @@ const ( RestartPrimary = "RestartPrimary" RestartSecondary = "RestartSecondary" + + StartRunScript = "StartRunScriptWithRestart" + KillRunScript = "KillRunScript" + StickyLeader = "STICKYLEADER" // We want a id(sticky id) to be always leader in raft + UpdateDataDirectory = "UpdateDataDirectory" + PausePgCoordinatorBeforeUpgrade = "PausePgCoordinatorBeforeUpdate" + RunningLeaderSticky = "RunningLeaderSticky" + EnsureStickyId = "EnsureStickyId" + SetPrimaryPodNameInStatus = "SetPrimaryPodNameInStatus" + NonTransferableResumeAfterUpgrade = "NonTransferableResumeAfterUpgrade" + PausePgCoordinatorBeforeCustomRestart = "PausePgCoordinatorBeforeCustomRestart" + NonTransferableResumeAfterCustomRestart = "NonTransferableResumeAfterCustomRestart" + ReadyPrimaryCheck = "ReadyPrimaryCheck" + PrimaryPodName = "PrimaryPodName" + OpsRequestProgressing = "OpsRequestProgressing" + SetRaftKeyOpsRequestProgressing = "SetRaftKeyOpsRequestProgressing" + UnsetRaftKeyOpsRequestProgressing = "UnsetRaftKeyOpsRequestProgressing" + NotReadyReplicas = "NotReadyReplicas" + RestartNotReadyStandby = "RestartNotReadyStandby" + StandbyReadyCheck = "StandbyReadyCheck" + PrimaryRunningCheck = "PrimaryRunningCheck" + StopPostgresServer = "StopPostgresServer" + SetupRecoverySettings = "SetupRecoverySettings" + RunPostgresBaseBackup = "RunPostgresBaseBackup" + StartPostgresRecovery = "StartPostgresRecovery" + RestartNotReadyStandbyAfterBaseBackup = "RestartNotReadyStandbyAfterBaseBackup" + StandbyReadyCheckAfterBaseBackup = "StandbyReadyCheckAfterBaseBackup" + ReconnectStandbyWithRestart = "ReconnectStandbyWithRestart" + ReconnectStandbyWithBaseBackup = "ReconnectStandbyWithBaseBackup" + UpdateRaftKVStore = "UpdateRaftKVStore" + CreateFailOverFile = "CreateFailOverFile" + TransitionCandidateToLeader = "TransitionCandidateToLeader" + ForceFailOverFileName = "force-failover-with-lsn" + // need reveiw about this two + StringFalse = "false" + StringTrue = "true" ) // Redis Constants diff --git a/apis/ops/v1alpha1/openapi_generated.go b/apis/ops/v1alpha1/openapi_generated.go index 85df45281d..9b1452c72a 100644 --- a/apis/ops/v1alpha1/openapi_generated.go +++ b/apis/ops/v1alpha1/openapi_generated.go @@ -636,10 +636,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/ops/v1alpha1.PodResources": schema_apimachinery_apis_ops_v1alpha1_PodResources(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresCustomConfiguration": schema_apimachinery_apis_ops_v1alpha1_PostgresCustomConfiguration(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresCustomConfigurationSpec": schema_apimachinery_apis_ops_v1alpha1_PostgresCustomConfigurationSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresForceFailOver": schema_apimachinery_apis_ops_v1alpha1_PostgresForceFailOver(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresHorizontalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_PostgresHorizontalScalingSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresOpsRequest": schema_apimachinery_apis_ops_v1alpha1_PostgresOpsRequest(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresOpsRequestList": schema_apimachinery_apis_ops_v1alpha1_PostgresOpsRequestList(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresOpsRequestSpec": schema_apimachinery_apis_ops_v1alpha1_PostgresOpsRequestSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresReconnectStandby": schema_apimachinery_apis_ops_v1alpha1_PostgresReconnectStandby(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresSetRaftKeyPair": schema_apimachinery_apis_ops_v1alpha1_PostgresSetRaftKeyPair(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresTLSSpec": schema_apimachinery_apis_ops_v1alpha1_PostgresTLSSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresUpdateVersionSpec": schema_apimachinery_apis_ops_v1alpha1_PostgresUpdateVersionSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_PostgresVerticalScalingSpec(ref), @@ -31414,6 +31417,32 @@ func schema_apimachinery_apis_ops_v1alpha1_PostgresCustomConfigurationSpec(ref c } } +func schema_apimachinery_apis_ops_v1alpha1_PostgresForceFailOver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "candidates": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + func schema_apimachinery_apis_ops_v1alpha1_PostgresHorizontalScalingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -31612,6 +31641,24 @@ func schema_apimachinery_apis_ops_v1alpha1_PostgresOpsRequestSpec(ref common.Ref Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec"), }, }, + "reconnectStandby": { + SchemaProps: spec.SchemaProps{ + Description: "Try to reconnect standby's with primary", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresReconnectStandby"), + }, + }, + "forceFailOver": { + SchemaProps: spec.SchemaProps{ + Description: "Forcefully do a failover to the given candidate", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresForceFailOver"), + }, + }, + "setRaftKeyPair": { + SchemaProps: spec.SchemaProps{ + Description: "Set given key pairs to raft storage", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresSetRaftKeyPair"), + }, + }, "timeout": { SchemaProps: spec.SchemaProps{ Description: "Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.", @@ -31630,7 +31677,54 @@ func schema_apimachinery_apis_ops_v1alpha1_PostgresOpsRequestSpec(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/ops/v1alpha1.AuthSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresCustomConfigurationSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresHorizontalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresTLSSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresUpdateVersionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresVolumeExpansionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/ops/v1alpha1.AuthSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresCustomConfigurationSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresForceFailOver", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresHorizontalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresReconnectStandby", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresSetRaftKeyPair", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresTLSSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresUpdateVersionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PostgresVolumeExpansionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec"}, + } +} + +func schema_apimachinery_apis_ops_v1alpha1_PostgresReconnectStandby(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "readyTimeOut": { + SchemaProps: spec.SchemaProps{ + Description: "ReadyTimeOut is the time to wait for standby`s to become ready", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_apimachinery_apis_ops_v1alpha1_PostgresSetRaftKeyPair(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "keyPair": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, } } diff --git a/apis/ops/v1alpha1/postgres_ops_types.go b/apis/ops/v1alpha1/postgres_ops_types.go index bc2839490c..42854892ab 100644 --- a/apis/ops/v1alpha1/postgres_ops_types.go +++ b/apis/ops/v1alpha1/postgres_ops_types.go @@ -84,6 +84,12 @@ type PostgresOpsRequestSpec struct { Authentication *AuthSpec `json:"authentication,omitempty"` // Specifies information necessary for restarting database Restart *RestartSpec `json:"restart,omitempty"` + // Try to reconnect standby's with primary + ReconnectStandby *PostgresReconnectStandby `json:"reconnectStandby,omitempty"` + // Forcefully do a failover to the given candidate + ForceFailOver *PostgresForceFailOver `json:"forceFailOver,omitempty"` + // Set given key pairs to raft storage + SetRaftKeyPair *PostgresSetRaftKeyPair `json:"setRaftKeyPair,omitempty"` // Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure. Timeout *metav1.Duration `json:"timeout,omitempty"` // ApplyOption is to control the execution of OpsRequest depending on the database state. @@ -91,8 +97,8 @@ type PostgresOpsRequestSpec struct { Apply ApplyOption `json:"apply,omitempty"` } -// +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS;RotateAuth -// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS, RotateAuth) +// +kubebuilder:validation:Enum=Upgrade;UpdateVersion;HorizontalScaling;VerticalScaling;VolumeExpansion;Restart;Reconfigure;ReconfigureTLS;RotateAuth;ReconnectStandby;ForceFailOver;SetRaftKeyPair +// ENUM(UpdateVersion, HorizontalScaling, VerticalScaling, VolumeExpansion, Restart, Reconfigure, ReconfigureTLS, RotateAuth, ReconnectStandby, ForceFailOver, SetRaftKeyPair) type PostgresOpsRequestType string type PostgresUpdateVersionSpec struct { @@ -116,11 +122,13 @@ const ( WarmPostgresStandbyMode PostgresStandbyMode = "Warm" ) +type PostgresPrimaryCandidate string + // HorizontalScaling is the spec for Postgres horizontal scaling type PostgresHorizontalScalingSpec struct { Replicas *int32 `json:"replicas,omitempty"` // Standby mode - // +kubebuilder:default="Warm" + // +kubebuilder:default="Hot" StandbyMode *PostgresStandbyMode `json:"standbyMode,omitempty"` // Streaming mode @@ -156,6 +164,20 @@ type PostgresCustomConfiguration struct { Remove bool `json:"remove,omitempty"` } +type PostgresReconnectStandby struct { + // ReadyTimeOut is the time to wait for standby`s to become ready + // +optional + ReadyTimeOut *metav1.Duration `json:"readyTimeOut,omitempty"` +} + +type PostgresForceFailOver struct { + Candidates []PostgresPrimaryCandidate `json:"candidates,omitempty"` +} + +type PostgresSetRaftKeyPair struct { + KeyPair map[string]string `json:"keyPair,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // PostgresOpsRequestList is a list of PostgresOpsRequests diff --git a/apis/ops/v1alpha1/postgres_ops_types_enum.go b/apis/ops/v1alpha1/postgres_ops_types_enum.go index e9dbf89517..505ab97298 100644 --- a/apis/ops/v1alpha1/postgres_ops_types_enum.go +++ b/apis/ops/v1alpha1/postgres_ops_types_enum.go @@ -28,6 +28,12 @@ const ( PostgresOpsRequestTypeReconfigureTLS PostgresOpsRequestType = "ReconfigureTLS" // PostgresOpsRequestTypeRotateAuth is a PostgresOpsRequestType of type RotateAuth. PostgresOpsRequestTypeRotateAuth PostgresOpsRequestType = "RotateAuth" + // PostgresOpsRequestTypeReconnectStandby is a PostgresOpsRequestType of type ReconnectStandby. + PostgresOpsRequestTypeReconnectStandby PostgresOpsRequestType = "ReconnectStandby" + // PostgresOpsRequestTypeForceFailOver is a PostgresOpsRequestType of type ForceFailOver. + PostgresOpsRequestTypeForceFailOver PostgresOpsRequestType = "ForceFailOver" + // PostgresOpsRequestTypeSetRaftKeyPair is a PostgresOpsRequestType of type SetRaftKeyPair. + PostgresOpsRequestTypeSetRaftKeyPair PostgresOpsRequestType = "SetRaftKeyPair" ) var ErrInvalidPostgresOpsRequestType = fmt.Errorf("not a valid PostgresOpsRequestType, try [%s]", strings.Join(_PostgresOpsRequestTypeNames, ", ")) @@ -41,6 +47,9 @@ var _PostgresOpsRequestTypeNames = []string{ string(PostgresOpsRequestTypeReconfigure), string(PostgresOpsRequestTypeReconfigureTLS), string(PostgresOpsRequestTypeRotateAuth), + string(PostgresOpsRequestTypeReconnectStandby), + string(PostgresOpsRequestTypeForceFailOver), + string(PostgresOpsRequestTypeSetRaftKeyPair), } // PostgresOpsRequestTypeNames returns a list of possible string values of PostgresOpsRequestType. @@ -61,6 +70,9 @@ func PostgresOpsRequestTypeValues() []PostgresOpsRequestType { PostgresOpsRequestTypeReconfigure, PostgresOpsRequestTypeReconfigureTLS, PostgresOpsRequestTypeRotateAuth, + PostgresOpsRequestTypeReconnectStandby, + PostgresOpsRequestTypeForceFailOver, + PostgresOpsRequestTypeSetRaftKeyPair, } } @@ -85,6 +97,9 @@ var _PostgresOpsRequestTypeValue = map[string]PostgresOpsRequestType{ "Reconfigure": PostgresOpsRequestTypeReconfigure, "ReconfigureTLS": PostgresOpsRequestTypeReconfigureTLS, "RotateAuth": PostgresOpsRequestTypeRotateAuth, + "ReconnectStandby": PostgresOpsRequestTypeReconnectStandby, + "ForceFailOver": PostgresOpsRequestTypeForceFailOver, + "SetRaftKeyPair": PostgresOpsRequestTypeSetRaftKeyPair, } // ParsePostgresOpsRequestType attempts to convert a string to a PostgresOpsRequestType. diff --git a/apis/ops/v1alpha1/zz_generated.deepcopy.go b/apis/ops/v1alpha1/zz_generated.deepcopy.go index 486797d2f9..8de759a92c 100644 --- a/apis/ops/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ops/v1alpha1/zz_generated.deepcopy.go @@ -4228,6 +4228,27 @@ func (in *PostgresCustomConfigurationSpec) DeepCopy() *PostgresCustomConfigurati return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PostgresForceFailOver) DeepCopyInto(out *PostgresForceFailOver) { + *out = *in + if in.Candidates != nil { + in, out := &in.Candidates, &out.Candidates + *out = make([]PostgresPrimaryCandidate, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresForceFailOver. +func (in *PostgresForceFailOver) DeepCopy() *PostgresForceFailOver { + if in == nil { + return nil + } + out := new(PostgresForceFailOver) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PostgresHorizontalScalingSpec) DeepCopyInto(out *PostgresHorizontalScalingSpec) { *out = *in @@ -4364,6 +4385,21 @@ func (in *PostgresOpsRequestSpec) DeepCopyInto(out *PostgresOpsRequestSpec) { *out = new(RestartSpec) **out = **in } + if in.ReconnectStandby != nil { + in, out := &in.ReconnectStandby, &out.ReconnectStandby + *out = new(PostgresReconnectStandby) + (*in).DeepCopyInto(*out) + } + if in.ForceFailOver != nil { + in, out := &in.ForceFailOver, &out.ForceFailOver + *out = new(PostgresForceFailOver) + (*in).DeepCopyInto(*out) + } + if in.SetRaftKeyPair != nil { + in, out := &in.SetRaftKeyPair, &out.SetRaftKeyPair + *out = new(PostgresSetRaftKeyPair) + (*in).DeepCopyInto(*out) + } if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout *out = new(metav1.Duration) @@ -4382,6 +4418,50 @@ func (in *PostgresOpsRequestSpec) DeepCopy() *PostgresOpsRequestSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PostgresReconnectStandby) DeepCopyInto(out *PostgresReconnectStandby) { + *out = *in + if in.ReadyTimeOut != nil { + in, out := &in.ReadyTimeOut, &out.ReadyTimeOut + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresReconnectStandby. +func (in *PostgresReconnectStandby) DeepCopy() *PostgresReconnectStandby { + if in == nil { + return nil + } + out := new(PostgresReconnectStandby) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PostgresSetRaftKeyPair) DeepCopyInto(out *PostgresSetRaftKeyPair) { + *out = *in + if in.KeyPair != nil { + in, out := &in.KeyPair, &out.KeyPair + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresSetRaftKeyPair. +func (in *PostgresSetRaftKeyPair) DeepCopy() *PostgresSetRaftKeyPair { + if in == nil { + return nil + } + out := new(PostgresSetRaftKeyPair) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PostgresTLSSpec) DeepCopyInto(out *PostgresTLSSpec) { *out = *in diff --git a/crds/ops.kubedb.com_postgresopsrequests.yaml b/crds/ops.kubedb.com_postgresopsrequests.yaml index b9a1ee9093..f5a5c509c5 100644 --- a/crds/ops.kubedb.com_postgresopsrequests.yaml +++ b/crds/ops.kubedb.com_postgresopsrequests.yaml @@ -81,13 +81,20 @@ spec: type: string type: object x-kubernetes-map-type: atomic + forceFailOver: + properties: + candidates: + items: + type: string + type: array + type: object horizontalScaling: properties: replicas: format: int32 type: integer standbyMode: - default: Warm + default: Hot enum: - Hot - Warm @@ -99,8 +106,20 @@ spec: - Asynchronous type: string type: object + reconnectStandby: + properties: + readyTimeOut: + type: string + type: object restart: type: object + setRaftKeyPair: + properties: + keyPair: + additionalProperties: + type: string + type: object + type: object timeout: type: string tls: @@ -234,6 +253,9 @@ spec: - Reconfigure - ReconfigureTLS - RotateAuth + - ReconnectStandby + - ForceFailOver + - SetRaftKeyPair type: string updateVersion: properties: diff --git a/openapi/swagger.json b/openapi/swagger.json index 7b85364977..05da93dd66 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -27844,6 +27844,18 @@ } } }, + "dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresForceFailOver": { + "type": "object", + "properties": { + "candidates": { + "type": "array", + "items": { + "type": "string", + "default": "" + } + } + } + }, "dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresHorizontalScalingSpec": { "description": "HorizontalScaling is the spec for Postgres horizontal scaling", "type": "object", @@ -27952,14 +27964,26 @@ "default": {}, "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" }, + "forceFailOver": { + "description": "Forcefully do a failover to the given candidate", + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresForceFailOver" + }, "horizontalScaling": { "description": "Specifies information necessary for horizontal scaling", "$ref": "#/definitions/dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresHorizontalScalingSpec" }, + "reconnectStandby": { + "description": "Try to reconnect standby's with primary", + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresReconnectStandby" + }, "restart": { "description": "Specifies information necessary for restarting database", "$ref": "#/definitions/dev.kubedb.apimachinery.apis.ops.v1alpha1.RestartSpec" }, + "setRaftKeyPair": { + "description": "Set given key pairs to raft storage", + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresSetRaftKeyPair" + }, "timeout": { "description": "Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.", "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Duration" @@ -27987,6 +28011,27 @@ } } }, + "dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresReconnectStandby": { + "type": "object", + "properties": { + "readyTimeOut": { + "description": "ReadyTimeOut is the time to wait for standby`s to become ready", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Duration" + } + } + }, + "dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresSetRaftKeyPair": { + "type": "object", + "properties": { + "keyPair": { + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + } + } + }, "dev.kubedb.apimachinery.apis.ops.v1alpha1.PostgresTLSSpec": { "type": "object", "properties": {