From 7d93a8513b04b59433e6603cd50523677364946b Mon Sep 17 00:00:00 2001 From: Diogo Recharte Date: Wed, 7 Feb 2024 16:41:19 +0000 Subject: [PATCH] EVEREST-496 Add multi-namespaces support to DBClusters (#427) --- api/backup_storage.go | 4 +- api/database_cluster.go | 38 +- api/database_cluster_backup.go | 18 +- api/database_cluster_restore.go | 26 +- api/database_engine.go | 4 +- api/everest-server.gen.go | 696 +++--- api/namespace.go | 2 +- api/telemetry.go | 16 +- api/validation.go | 14 +- client/everest-client.gen.go | 1976 +++++++++-------- deploy/quickstart-k8s.yaml | 14 +- docs/spec/openapi.yml | 121 +- go.mod | 2 +- go.sum | 4 +- pkg/kubernetes/backup_storage.go | 50 +- pkg/kubernetes/client/database_cluster.go | 8 +- .../client/database_cluster_backup.go | 8 +- .../client/database_cluster_restore.go | 8 +- pkg/kubernetes/client/database_engine.go | 8 +- pkg/kubernetes/client/kubeclient_interface.go | 16 +- .../client/mock_kube_client_connector.go | 144 +- pkg/kubernetes/database_cluster.go | 8 +- pkg/kubernetes/database_cluster_backup.go | 8 +- pkg/kubernetes/database_cluster_restore.go | 8 +- pkg/kubernetes/database_engine.go | 8 +- pkg/kubernetes/kubernetes.go | 11 +- pkg/kubernetes/monitoring_config.go | 36 +- pkg/kubernetes/vmagent.go | 197 -- 28 files changed, 1792 insertions(+), 1661 deletions(-) delete mode 100644 pkg/kubernetes/vmagent.go diff --git a/api/backup_storage.go b/api/backup_storage.go index 3cfcb3f8..face1621 100644 --- a/api/backup_storage.go +++ b/api/backup_storage.go @@ -56,7 +56,7 @@ func (e *EverestServer) ListBackupStorages(ctx echo.Context) error { // CreateBackupStorage creates a new backup storage object. func (e *EverestServer) CreateBackupStorage(ctx echo.Context) error { //nolint:funlen - namespaces, err := e.kubeClient.GetWatchedNamespaces(ctx.Request().Context(), e.kubeClient.Namespace()) + namespaces, err := e.kubeClient.GetDBNamespaces(ctx.Request().Context(), e.kubeClient.Namespace()) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{ @@ -258,7 +258,7 @@ func (e *EverestServer) UpdateBackupStorage(ctx echo.Context, backupStorageName }) } - namespaces, err := e.kubeClient.GetWatchedNamespaces(ctx.Request().Context(), e.kubeClient.Namespace()) + namespaces, err := e.kubeClient.GetDBNamespaces(ctx.Request().Context(), e.kubeClient.Namespace()) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{ diff --git a/api/database_cluster.go b/api/database_cluster.go index f2d8acec..ad10504b 100644 --- a/api/database_cluster.go +++ b/api/database_cluster.go @@ -33,7 +33,7 @@ const ( ) // CreateDatabaseCluster creates a new db cluster inside the given k8s cluster. -func (e *EverestServer) CreateDatabaseCluster(ctx echo.Context) error { +func (e *EverestServer) CreateDatabaseCluster(ctx echo.Context, namespace string) error { dbc := &DatabaseCluster{} if err := e.getBodyFromContext(ctx, dbc); err != nil { e.l.Error(err) @@ -42,30 +42,30 @@ func (e *EverestServer) CreateDatabaseCluster(ctx echo.Context) error { }) } - if err := e.validateDatabaseClusterCR(ctx, dbc); err != nil { + if err := e.validateDatabaseClusterCR(ctx, namespace, dbc); err != nil { return ctx.JSON(http.StatusBadRequest, Error{Message: pointer.ToString(err.Error())}) } - return e.proxyKubernetes(ctx, "", databaseClusterKind, "") + return e.proxyKubernetes(ctx, namespace, databaseClusterKind, "") } // ListDatabaseClusters lists the created database clusters on the specified kubernetes cluster. -func (e *EverestServer) ListDatabaseClusters(ctx echo.Context) error { - return e.proxyKubernetes(ctx, "", databaseClusterKind, "") +func (e *EverestServer) ListDatabaseClusters(ctx echo.Context, namespace string) error { + return e.proxyKubernetes(ctx, namespace, databaseClusterKind, "") } // DeleteDatabaseCluster deletes a database cluster on the specified kubernetes cluster. -func (e *EverestServer) DeleteDatabaseCluster(ctx echo.Context, name string) error { - return e.proxyKubernetes(ctx, "", databaseClusterKind, name) +func (e *EverestServer) DeleteDatabaseCluster(ctx echo.Context, namespace, name string) error { + return e.proxyKubernetes(ctx, namespace, databaseClusterKind, name) } // GetDatabaseCluster retrieves the specified database cluster on the specified kubernetes cluster. -func (e *EverestServer) GetDatabaseCluster(ctx echo.Context, name string) error { - return e.proxyKubernetes(ctx, "", databaseClusterKind, name) +func (e *EverestServer) GetDatabaseCluster(ctx echo.Context, namespace, name string) error { + return e.proxyKubernetes(ctx, namespace, databaseClusterKind, name) } // UpdateDatabaseCluster replaces the specified database cluster on the specified kubernetes cluster. -func (e *EverestServer) UpdateDatabaseCluster(ctx echo.Context, name string) error { +func (e *EverestServer) UpdateDatabaseCluster(ctx echo.Context, namespace, name string) error { dbc := &DatabaseCluster{} if err := e.getBodyFromContext(ctx, dbc); err != nil { e.l.Error(err) @@ -74,11 +74,11 @@ func (e *EverestServer) UpdateDatabaseCluster(ctx echo.Context, name string) err }) } - if err := e.validateDatabaseClusterCR(ctx, dbc); err != nil { + if err := e.validateDatabaseClusterCR(ctx, namespace, dbc); err != nil { return ctx.JSON(http.StatusBadRequest, Error{Message: pointer.ToString(err.Error())}) } - oldDB, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), name) + oldDB, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), namespace, name) if err != nil { return errors.Join(err, errors.New("could not get old Database Cluster")) } @@ -86,17 +86,17 @@ func (e *EverestServer) UpdateDatabaseCluster(ctx echo.Context, name string) err return ctx.JSON(http.StatusBadRequest, Error{Message: pointer.ToString(err.Error())}) } - return e.proxyKubernetes(ctx, "", databaseClusterKind, name) + return e.proxyKubernetes(ctx, namespace, databaseClusterKind, name) } // GetDatabaseClusterCredentials returns credentials for the specified database cluster. -func (e *EverestServer) GetDatabaseClusterCredentials(ctx echo.Context, name string) error { - databaseCluster, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), name) +func (e *EverestServer) GetDatabaseClusterCredentials(ctx echo.Context, namespace, name string) error { + databaseCluster, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), namespace, name) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{Message: pointer.ToString(err.Error())}) } - secret, err := e.kubeClient.GetSecret(ctx.Request().Context(), "percona-everest", databaseCluster.Spec.Engine.UserSecretsName) + secret, err := e.kubeClient.GetSecret(ctx.Request().Context(), namespace, databaseCluster.Spec.Engine.UserSecretsName) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{Message: pointer.ToString(err.Error())}) @@ -120,8 +120,8 @@ func (e *EverestServer) GetDatabaseClusterCredentials(ctx echo.Context, name str } // GetDatabaseClusterPitr returns the point-in-time recovery related information for the specified database cluster. -func (e *EverestServer) GetDatabaseClusterPitr(ctx echo.Context, name string) error { - databaseCluster, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), name) +func (e *EverestServer) GetDatabaseClusterPitr(ctx echo.Context, namespace, name string) error { + databaseCluster, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), namespace, name) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{Message: pointer.ToString(err.Error())}) @@ -139,7 +139,7 @@ func (e *EverestServer) GetDatabaseClusterPitr(ctx echo.Context, name string) er }, }), } - backups, err := e.kubeClient.ListDatabaseClusterBackups(ctx.Request().Context(), options) + backups, err := e.kubeClient.ListDatabaseClusterBackups(ctx.Request().Context(), namespace, options) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{Message: pointer.ToString(err.Error())}) diff --git a/api/database_cluster_backup.go b/api/database_cluster_backup.go index 33a187a9..78f59b5e 100644 --- a/api/database_cluster_backup.go +++ b/api/database_cluster_backup.go @@ -31,7 +31,7 @@ const ( ) // ListDatabaseClusterBackups returns list of the created database cluster backups on the specified kubernetes cluster. -func (e *EverestServer) ListDatabaseClusterBackups(ctx echo.Context, name string) error { +func (e *EverestServer) ListDatabaseClusterBackups(ctx echo.Context, namespace, name string) error { req := ctx.Request() if err := validateRFC1035(name, "name"); err != nil { return ctx.JSON(http.StatusBadRequest, Error{Message: pointer.ToString(err.Error())}) @@ -46,11 +46,11 @@ func (e *EverestServer) ListDatabaseClusterBackups(ctx echo.Context, name string path = strings.TrimSuffix(path, name) path = strings.ReplaceAll(path, "database-clusters", "database-cluster-backups") req.URL.Path = path - return e.proxyKubernetes(ctx, "", databaseClusterBackupKind, "") + return e.proxyKubernetes(ctx, namespace, databaseClusterBackupKind, "") } // CreateDatabaseClusterBackup creates a database cluster backup on the specified kubernetes cluster. -func (e *EverestServer) CreateDatabaseClusterBackup(ctx echo.Context) error { +func (e *EverestServer) CreateDatabaseClusterBackup(ctx echo.Context, namespace string) error { dbb := &DatabaseClusterBackup{} if err := e.getBodyFromContext(ctx, dbb); err != nil { e.l.Error(err) @@ -59,19 +59,19 @@ func (e *EverestServer) CreateDatabaseClusterBackup(ctx echo.Context) error { }) } // TODO: Improve returns status code in EVEREST-616 - if err := validateDatabaseClusterBackup(ctx.Request().Context(), dbb, e.kubeClient); err != nil { + if err := validateDatabaseClusterBackup(ctx.Request().Context(), namespace, dbb, e.kubeClient); err != nil { e.l.Error(err) return ctx.JSON(http.StatusBadRequest, Error{Message: pointer.ToString(err.Error())}) } - return e.proxyKubernetes(ctx, "", databaseClusterBackupKind, "") + return e.proxyKubernetes(ctx, namespace, databaseClusterBackupKind, "") } // DeleteDatabaseClusterBackup deletes the specified cluster backup on the specified kubernetes cluster. -func (e *EverestServer) DeleteDatabaseClusterBackup(ctx echo.Context, name string) error { - return e.proxyKubernetes(ctx, "", databaseClusterBackupKind, name) +func (e *EverestServer) DeleteDatabaseClusterBackup(ctx echo.Context, namespace, name string) error { + return e.proxyKubernetes(ctx, namespace, databaseClusterBackupKind, name) } // GetDatabaseClusterBackup returns the specified cluster backup on the specified kubernetes cluster. -func (e *EverestServer) GetDatabaseClusterBackup(ctx echo.Context, name string) error { - return e.proxyKubernetes(ctx, "", databaseClusterBackupKind, name) +func (e *EverestServer) GetDatabaseClusterBackup(ctx echo.Context, namespace, name string) error { + return e.proxyKubernetes(ctx, namespace, databaseClusterBackupKind, name) } diff --git a/api/database_cluster_restore.go b/api/database_cluster_restore.go index 0c05b01f..98be3924 100644 --- a/api/database_cluster_restore.go +++ b/api/database_cluster_restore.go @@ -32,7 +32,7 @@ const ( ) // ListDatabaseClusterRestores List of the created database cluster restores on the specified kubernetes cluster. -func (e *EverestServer) ListDatabaseClusterRestores(ctx echo.Context, name string) error { +func (e *EverestServer) ListDatabaseClusterRestores(ctx echo.Context, namespace, name string) error { req := ctx.Request() if err := validateRFC1035(name, "name"); err != nil { return ctx.JSON(http.StatusBadRequest, Error{Message: pointer.ToString(err.Error())}) @@ -47,11 +47,11 @@ func (e *EverestServer) ListDatabaseClusterRestores(ctx echo.Context, name strin path = strings.TrimSuffix(path, name) path = strings.ReplaceAll(path, "database-clusters", "database-cluster-restores") req.URL.Path = path - return e.proxyKubernetes(ctx, "", databaseClusterRestoreKind, "") + return e.proxyKubernetes(ctx, namespace, databaseClusterRestoreKind, "") } // CreateDatabaseClusterRestore Create a database cluster restore on the specified kubernetes cluster. -func (e *EverestServer) CreateDatabaseClusterRestore(ctx echo.Context) error { +func (e *EverestServer) CreateDatabaseClusterRestore(ctx echo.Context, namespace string) error { restore := &DatabaseClusterRestore{} if err := e.getBodyFromContext(ctx, restore); err != nil { e.l.Error(err) @@ -59,13 +59,13 @@ func (e *EverestServer) CreateDatabaseClusterRestore(ctx echo.Context) error { Message: pointer.ToString("Could not get DatabaseClusterRestore from the request body"), }) } - if err := validateDatabaseClusterRestore(ctx.Request().Context(), restore, e.kubeClient); err != nil { + if err := validateDatabaseClusterRestore(ctx.Request().Context(), namespace, restore, e.kubeClient); err != nil { e.l.Error(err) return ctx.JSON(http.StatusBadRequest, Error{ Message: pointer.ToString(err.Error()), }) } - dbCluster, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), restore.Spec.DbClusterName) + dbCluster, err := e.kubeClient.GetDatabaseCluster(ctx.Request().Context(), namespace, restore.Spec.DbClusterName) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{ @@ -79,21 +79,21 @@ func (e *EverestServer) CreateDatabaseClusterRestore(ctx echo.Context) error { }) } - return e.proxyKubernetes(ctx, "", databaseClusterRestoreKind, "") + return e.proxyKubernetes(ctx, namespace, databaseClusterRestoreKind, "") } // DeleteDatabaseClusterRestore Delete the specified cluster restore on the specified kubernetes cluster. -func (e *EverestServer) DeleteDatabaseClusterRestore(ctx echo.Context, name string) error { - return e.proxyKubernetes(ctx, "", databaseClusterRestoreKind, name) +func (e *EverestServer) DeleteDatabaseClusterRestore(ctx echo.Context, namespace, name string) error { + return e.proxyKubernetes(ctx, namespace, databaseClusterRestoreKind, name) } // GetDatabaseClusterRestore Returns the specified cluster restore on the specified kubernetes cluster. -func (e *EverestServer) GetDatabaseClusterRestore(ctx echo.Context, name string) error { - return e.proxyKubernetes(ctx, "", databaseClusterRestoreKind, name) +func (e *EverestServer) GetDatabaseClusterRestore(ctx echo.Context, namespace, name string) error { + return e.proxyKubernetes(ctx, namespace, databaseClusterRestoreKind, name) } // UpdateDatabaseClusterRestore Replace the specified cluster restore on the specified kubernetes cluster. -func (e *EverestServer) UpdateDatabaseClusterRestore(ctx echo.Context, name string) error { +func (e *EverestServer) UpdateDatabaseClusterRestore(ctx echo.Context, namespace, name string) error { restore := &DatabaseClusterRestore{} if err := e.getBodyFromContext(ctx, restore); err != nil { e.l.Error(err) @@ -101,11 +101,11 @@ func (e *EverestServer) UpdateDatabaseClusterRestore(ctx echo.Context, name stri Message: pointer.ToString("Could not get DatabaseClusterRestore from the request body"), }) } - if err := validateDatabaseClusterRestore(ctx.Request().Context(), restore, e.kubeClient); err != nil { + if err := validateDatabaseClusterRestore(ctx.Request().Context(), namespace, restore, e.kubeClient); err != nil { e.l.Error(err) return ctx.JSON(http.StatusBadRequest, Error{ Message: pointer.ToString(err.Error()), }) } - return e.proxyKubernetes(ctx, "", databaseClusterRestoreKind, name) + return e.proxyKubernetes(ctx, namespace, databaseClusterRestoreKind, name) } diff --git a/api/database_engine.go b/api/database_engine.go index 44af1368..956cf60f 100644 --- a/api/database_engine.go +++ b/api/database_engine.go @@ -28,11 +28,11 @@ func (e *EverestServer) ListDatabaseEngines(ctx echo.Context, namespace string) } // GetDatabaseEngine Get the specified database engine on the specified namespace. -func (e *EverestServer) GetDatabaseEngine(ctx echo.Context, namespace string, name string) error { +func (e *EverestServer) GetDatabaseEngine(ctx echo.Context, namespace, name string) error { return e.proxyKubernetes(ctx, namespace, databaseEngineKind, name) } // UpdateDatabaseEngine Update the specified database engine on the specified namespace. -func (e *EverestServer) UpdateDatabaseEngine(ctx echo.Context, namespace string, name string) error { +func (e *EverestServer) UpdateDatabaseEngine(ctx echo.Context, namespace, name string) error { return e.proxyKubernetes(ctx, namespace, databaseEngineKind, name) } diff --git a/api/everest-server.gen.go b/api/everest-server.gen.go index c8ed6e01..a95dc0b0 100644 --- a/api/everest-server.gen.go +++ b/api/everest-server.gen.go @@ -823,6 +823,12 @@ type CreateBackupStorageJSONRequestBody = CreateBackupStorageParams // UpdateBackupStorageJSONRequestBody defines body for UpdateBackupStorage for application/json ContentType. type UpdateBackupStorageJSONRequestBody = UpdateBackupStorageParams +// CreateMonitoringInstanceJSONRequestBody defines body for CreateMonitoringInstance for application/json ContentType. +type CreateMonitoringInstanceJSONRequestBody = MonitoringInstanceCreateParams + +// UpdateMonitoringInstanceJSONRequestBody defines body for UpdateMonitoringInstance for application/json ContentType. +type UpdateMonitoringInstanceJSONRequestBody = MonitoringInstanceUpdateParams + // CreateDatabaseClusterBackupJSONRequestBody defines body for CreateDatabaseClusterBackup for application/json ContentType. type CreateDatabaseClusterBackupJSONRequestBody = DatabaseClusterBackup @@ -838,12 +844,6 @@ type CreateDatabaseClusterJSONRequestBody = DatabaseCluster // UpdateDatabaseClusterJSONRequestBody defines body for UpdateDatabaseCluster for application/json ContentType. type UpdateDatabaseClusterJSONRequestBody = DatabaseCluster -// CreateMonitoringInstanceJSONRequestBody defines body for CreateMonitoringInstance for application/json ContentType. -type CreateMonitoringInstanceJSONRequestBody = MonitoringInstanceCreateParams - -// UpdateMonitoringInstanceJSONRequestBody defines body for UpdateMonitoringInstance for application/json ContentType. -type UpdateMonitoringInstanceJSONRequestBody = MonitoringInstanceUpdateParams - // UpdateDatabaseEngineJSONRequestBody defines body for UpdateDatabaseEngine for application/json ContentType. type UpdateDatabaseEngineJSONRequestBody = DatabaseEngine @@ -1301,54 +1301,6 @@ type ServerInterface interface { // Get the cluster type and storage classes of a kubernetes cluster // (GET /cluster-info) GetKubernetesClusterInfo(ctx echo.Context) error - // Create a database cluster backup - // (POST /database-cluster-backups) - CreateDatabaseClusterBackup(ctx echo.Context) error - // Delete the specified cluster backup - // (DELETE /database-cluster-backups/{name}) - DeleteDatabaseClusterBackup(ctx echo.Context, name string) error - // Returns the specified cluster backup - // (GET /database-cluster-backups/{name}) - GetDatabaseClusterBackup(ctx echo.Context, name string) error - // Create a database cluster restore - // (POST /database-cluster-restores) - CreateDatabaseClusterRestore(ctx echo.Context) error - // Delete the specified cluster restore - // (DELETE /database-cluster-restores/{name}) - DeleteDatabaseClusterRestore(ctx echo.Context, name string) error - // Returns the specified cluster restore - // (GET /database-cluster-restores/{name}) - GetDatabaseClusterRestore(ctx echo.Context, name string) error - // Replace the specified cluster restore - // (PUT /database-cluster-restores/{name}) - UpdateDatabaseClusterRestore(ctx echo.Context, name string) error - // List of the created database clusters - // (GET /database-clusters) - ListDatabaseClusters(ctx echo.Context) error - // Create a database cluster - // (POST /database-clusters) - CreateDatabaseCluster(ctx echo.Context) error - // Delete the specified database cluster - // (DELETE /database-clusters/{name}) - DeleteDatabaseCluster(ctx echo.Context, name string) error - // Get the specified database cluster - // (GET /database-clusters/{name}) - GetDatabaseCluster(ctx echo.Context, name string) error - // Replace the specified database cluster - // (PUT /database-clusters/{name}) - UpdateDatabaseCluster(ctx echo.Context, name string) error - // List of the created database cluster backups - // (GET /database-clusters/{name}/backups) - ListDatabaseClusterBackups(ctx echo.Context, name string) error - // Get the specified database cluster credentials - // (GET /database-clusters/{name}/credentials) - GetDatabaseClusterCredentials(ctx echo.Context, name string) error - // Get the Point-in-Time related data for the specified database cluster - // (GET /database-clusters/{name}/pitr) - GetDatabaseClusterPitr(ctx echo.Context, name string) error - // List of the created database cluster restores - // (GET /database-clusters/{name}/restores) - ListDatabaseClusterRestores(ctx echo.Context, name string) error // List of the created monitoring instances // (GET /monitoring-instances) ListMonitoringInstances(ctx echo.Context) error @@ -1367,6 +1319,54 @@ type ServerInterface interface { // Get all namespaces managed by Everest // (GET /namespaces) ListNamespaces(ctx echo.Context) error + // Create a database cluster backup + // (POST /namespaces/{namespace}/database-cluster-backups) + CreateDatabaseClusterBackup(ctx echo.Context, namespace string) error + // Delete the specified cluster backup + // (DELETE /namespaces/{namespace}/database-cluster-backups/{name}) + DeleteDatabaseClusterBackup(ctx echo.Context, namespace string, name string) error + // Returns the specified cluster backup + // (GET /namespaces/{namespace}/database-cluster-backups/{name}) + GetDatabaseClusterBackup(ctx echo.Context, namespace string, name string) error + // Create a database cluster restore + // (POST /namespaces/{namespace}/database-cluster-restores) + CreateDatabaseClusterRestore(ctx echo.Context, namespace string) error + // Delete the specified cluster restore + // (DELETE /namespaces/{namespace}/database-cluster-restores/{name}) + DeleteDatabaseClusterRestore(ctx echo.Context, namespace string, name string) error + // Returns the specified cluster restore + // (GET /namespaces/{namespace}/database-cluster-restores/{name}) + GetDatabaseClusterRestore(ctx echo.Context, namespace string, name string) error + // Replace the specified cluster restore + // (PUT /namespaces/{namespace}/database-cluster-restores/{name}) + UpdateDatabaseClusterRestore(ctx echo.Context, namespace string, name string) error + // List of the created database clusters + // (GET /namespaces/{namespace}/database-clusters) + ListDatabaseClusters(ctx echo.Context, namespace string) error + // Create a database cluster + // (POST /namespaces/{namespace}/database-clusters) + CreateDatabaseCluster(ctx echo.Context, namespace string) error + // Delete the specified database cluster + // (DELETE /namespaces/{namespace}/database-clusters/{name}) + DeleteDatabaseCluster(ctx echo.Context, namespace string, name string) error + // Get the specified database cluster + // (GET /namespaces/{namespace}/database-clusters/{name}) + GetDatabaseCluster(ctx echo.Context, namespace string, name string) error + // Replace the specified database cluster + // (PUT /namespaces/{namespace}/database-clusters/{name}) + UpdateDatabaseCluster(ctx echo.Context, namespace string, name string) error + // List of the created database cluster backups + // (GET /namespaces/{namespace}/database-clusters/{name}/backups) + ListDatabaseClusterBackups(ctx echo.Context, namespace string, name string) error + // Get the specified database cluster credentials + // (GET /namespaces/{namespace}/database-clusters/{name}/credentials) + GetDatabaseClusterCredentials(ctx echo.Context, namespace string, name string) error + // Get the Point-in-Time related data for the specified database cluster + // (GET /namespaces/{namespace}/database-clusters/{name}/pitr) + GetDatabaseClusterPitr(ctx echo.Context, namespace string, name string) error + // List of the created database cluster restores + // (GET /namespaces/{namespace}/database-clusters/{name}/restores) + ListDatabaseClusterRestores(ctx echo.Context, namespace string, name string) error // List of the available database engines // (GET /namespaces/{namespace}/database-engines) ListDatabaseEngines(ctx echo.Context, namespace string) error @@ -1464,18 +1464,108 @@ func (w *ServerInterfaceWrapper) GetKubernetesClusterInfo(ctx echo.Context) erro return err } +// ListMonitoringInstances converts echo context to params. +func (w *ServerInterfaceWrapper) ListMonitoringInstances(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ListMonitoringInstances(ctx) + return err +} + +// CreateMonitoringInstance converts echo context to params. +func (w *ServerInterfaceWrapper) CreateMonitoringInstance(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateMonitoringInstance(ctx) + return err +} + +// DeleteMonitoringInstance converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteMonitoringInstance(ctx echo.Context) error { + var err error + // ------------- Path parameter "name" ------------- + var name string + + err = runtime.BindStyledParameterWithLocation("simple", false, "name", runtime.ParamLocationPath, ctx.Param("name"), &name) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteMonitoringInstance(ctx, name) + return err +} + +// GetMonitoringInstance converts echo context to params. +func (w *ServerInterfaceWrapper) GetMonitoringInstance(ctx echo.Context) error { + var err error + // ------------- Path parameter "name" ------------- + var name string + + err = runtime.BindStyledParameterWithLocation("simple", false, "name", runtime.ParamLocationPath, ctx.Param("name"), &name) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetMonitoringInstance(ctx, name) + return err +} + +// UpdateMonitoringInstance converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateMonitoringInstance(ctx echo.Context) error { + var err error + // ------------- Path parameter "name" ------------- + var name string + + err = runtime.BindStyledParameterWithLocation("simple", false, "name", runtime.ParamLocationPath, ctx.Param("name"), &name) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateMonitoringInstance(ctx, name) + return err +} + +// ListNamespaces converts echo context to params. +func (w *ServerInterfaceWrapper) ListNamespaces(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ListNamespaces(ctx) + return err +} + // CreateDatabaseClusterBackup converts echo context to params. func (w *ServerInterfaceWrapper) CreateDatabaseClusterBackup(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.CreateDatabaseClusterBackup(ctx) + err = w.Handler.CreateDatabaseClusterBackup(ctx, namespace) return err } // DeleteDatabaseClusterBackup converts echo context to params. func (w *ServerInterfaceWrapper) DeleteDatabaseClusterBackup(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1485,13 +1575,21 @@ func (w *ServerInterfaceWrapper) DeleteDatabaseClusterBackup(ctx echo.Context) e } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.DeleteDatabaseClusterBackup(ctx, name) + err = w.Handler.DeleteDatabaseClusterBackup(ctx, namespace, name) return err } // GetDatabaseClusterBackup converts echo context to params. func (w *ServerInterfaceWrapper) GetDatabaseClusterBackup(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1501,22 +1599,37 @@ func (w *ServerInterfaceWrapper) GetDatabaseClusterBackup(ctx echo.Context) erro } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.GetDatabaseClusterBackup(ctx, name) + err = w.Handler.GetDatabaseClusterBackup(ctx, namespace, name) return err } // CreateDatabaseClusterRestore converts echo context to params. func (w *ServerInterfaceWrapper) CreateDatabaseClusterRestore(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.CreateDatabaseClusterRestore(ctx) + err = w.Handler.CreateDatabaseClusterRestore(ctx, namespace) return err } // DeleteDatabaseClusterRestore converts echo context to params. func (w *ServerInterfaceWrapper) DeleteDatabaseClusterRestore(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1526,13 +1639,21 @@ func (w *ServerInterfaceWrapper) DeleteDatabaseClusterRestore(ctx echo.Context) } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.DeleteDatabaseClusterRestore(ctx, name) + err = w.Handler.DeleteDatabaseClusterRestore(ctx, namespace, name) return err } // GetDatabaseClusterRestore converts echo context to params. func (w *ServerInterfaceWrapper) GetDatabaseClusterRestore(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1542,13 +1663,21 @@ func (w *ServerInterfaceWrapper) GetDatabaseClusterRestore(ctx echo.Context) err } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.GetDatabaseClusterRestore(ctx, name) + err = w.Handler.GetDatabaseClusterRestore(ctx, namespace, name) return err } // UpdateDatabaseClusterRestore converts echo context to params. func (w *ServerInterfaceWrapper) UpdateDatabaseClusterRestore(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1558,31 +1687,53 @@ func (w *ServerInterfaceWrapper) UpdateDatabaseClusterRestore(ctx echo.Context) } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.UpdateDatabaseClusterRestore(ctx, name) + err = w.Handler.UpdateDatabaseClusterRestore(ctx, namespace, name) return err } // ListDatabaseClusters converts echo context to params. func (w *ServerInterfaceWrapper) ListDatabaseClusters(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.ListDatabaseClusters(ctx) + err = w.Handler.ListDatabaseClusters(ctx, namespace) return err } // CreateDatabaseCluster converts echo context to params. func (w *ServerInterfaceWrapper) CreateDatabaseCluster(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.CreateDatabaseCluster(ctx) + err = w.Handler.CreateDatabaseCluster(ctx, namespace) return err } // DeleteDatabaseCluster converts echo context to params. func (w *ServerInterfaceWrapper) DeleteDatabaseCluster(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1592,13 +1743,21 @@ func (w *ServerInterfaceWrapper) DeleteDatabaseCluster(ctx echo.Context) error { } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.DeleteDatabaseCluster(ctx, name) + err = w.Handler.DeleteDatabaseCluster(ctx, namespace, name) return err } // GetDatabaseCluster converts echo context to params. func (w *ServerInterfaceWrapper) GetDatabaseCluster(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1608,13 +1767,21 @@ func (w *ServerInterfaceWrapper) GetDatabaseCluster(ctx echo.Context) error { } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.GetDatabaseCluster(ctx, name) + err = w.Handler.GetDatabaseCluster(ctx, namespace, name) return err } // UpdateDatabaseCluster converts echo context to params. func (w *ServerInterfaceWrapper) UpdateDatabaseCluster(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string + + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } + // ------------- Path parameter "name" ------------- var name string @@ -1624,29 +1791,21 @@ func (w *ServerInterfaceWrapper) UpdateDatabaseCluster(ctx echo.Context) error { } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.UpdateDatabaseCluster(ctx, name) + err = w.Handler.UpdateDatabaseCluster(ctx, namespace, name) return err } // ListDatabaseClusterBackups converts echo context to params. func (w *ServerInterfaceWrapper) ListDatabaseClusterBackups(ctx echo.Context) error { var err error - // ------------- Path parameter "name" ------------- - var name string + // ------------- Path parameter "namespace" ------------- + var namespace string - err = runtime.BindStyledParameterWithLocation("simple", false, "name", runtime.ParamLocationPath, ctx.Param("name"), &name) + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) } - // Invoke the callback with all the unmarshaled arguments - err = w.Handler.ListDatabaseClusterBackups(ctx, name) - return err -} - -// GetDatabaseClusterCredentials converts echo context to params. -func (w *ServerInterfaceWrapper) GetDatabaseClusterCredentials(ctx echo.Context) error { - var err error // ------------- Path parameter "name" ------------- var name string @@ -1656,29 +1815,21 @@ func (w *ServerInterfaceWrapper) GetDatabaseClusterCredentials(ctx echo.Context) } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.GetDatabaseClusterCredentials(ctx, name) + err = w.Handler.ListDatabaseClusterBackups(ctx, namespace, name) return err } -// GetDatabaseClusterPitr converts echo context to params. -func (w *ServerInterfaceWrapper) GetDatabaseClusterPitr(ctx echo.Context) error { +// GetDatabaseClusterCredentials converts echo context to params. +func (w *ServerInterfaceWrapper) GetDatabaseClusterCredentials(ctx echo.Context) error { var err error - // ------------- Path parameter "name" ------------- - var name string + // ------------- Path parameter "namespace" ------------- + var namespace string - err = runtime.BindStyledParameterWithLocation("simple", false, "name", runtime.ParamLocationPath, ctx.Param("name"), &name) + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) } - // Invoke the callback with all the unmarshaled arguments - err = w.Handler.GetDatabaseClusterPitr(ctx, name) - return err -} - -// ListDatabaseClusterRestores converts echo context to params. -func (w *ServerInterfaceWrapper) ListDatabaseClusterRestores(ctx echo.Context) error { - var err error // ------------- Path parameter "name" ------------- var name string @@ -1688,31 +1839,21 @@ func (w *ServerInterfaceWrapper) ListDatabaseClusterRestores(ctx echo.Context) e } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.ListDatabaseClusterRestores(ctx, name) - return err -} - -// ListMonitoringInstances converts echo context to params. -func (w *ServerInterfaceWrapper) ListMonitoringInstances(ctx echo.Context) error { - var err error - - // Invoke the callback with all the unmarshaled arguments - err = w.Handler.ListMonitoringInstances(ctx) + err = w.Handler.GetDatabaseClusterCredentials(ctx, namespace, name) return err } -// CreateMonitoringInstance converts echo context to params. -func (w *ServerInterfaceWrapper) CreateMonitoringInstance(ctx echo.Context) error { +// GetDatabaseClusterPitr converts echo context to params. +func (w *ServerInterfaceWrapper) GetDatabaseClusterPitr(ctx echo.Context) error { var err error + // ------------- Path parameter "namespace" ------------- + var namespace string - // Invoke the callback with all the unmarshaled arguments - err = w.Handler.CreateMonitoringInstance(ctx) - return err -} + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) + } -// DeleteMonitoringInstance converts echo context to params. -func (w *ServerInterfaceWrapper) DeleteMonitoringInstance(ctx echo.Context) error { - var err error // ------------- Path parameter "name" ------------- var name string @@ -1722,29 +1863,21 @@ func (w *ServerInterfaceWrapper) DeleteMonitoringInstance(ctx echo.Context) erro } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.DeleteMonitoringInstance(ctx, name) + err = w.Handler.GetDatabaseClusterPitr(ctx, namespace, name) return err } -// GetMonitoringInstance converts echo context to params. -func (w *ServerInterfaceWrapper) GetMonitoringInstance(ctx echo.Context) error { +// ListDatabaseClusterRestores converts echo context to params. +func (w *ServerInterfaceWrapper) ListDatabaseClusterRestores(ctx echo.Context) error { var err error - // ------------- Path parameter "name" ------------- - var name string + // ------------- Path parameter "namespace" ------------- + var namespace string - err = runtime.BindStyledParameterWithLocation("simple", false, "name", runtime.ParamLocationPath, ctx.Param("name"), &name) + err = runtime.BindStyledParameterWithLocation("simple", false, "namespace", runtime.ParamLocationPath, ctx.Param("namespace"), &namespace) if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter namespace: %s", err)) } - // Invoke the callback with all the unmarshaled arguments - err = w.Handler.GetMonitoringInstance(ctx, name) - return err -} - -// UpdateMonitoringInstance converts echo context to params. -func (w *ServerInterfaceWrapper) UpdateMonitoringInstance(ctx echo.Context) error { - var err error // ------------- Path parameter "name" ------------- var name string @@ -1754,16 +1887,7 @@ func (w *ServerInterfaceWrapper) UpdateMonitoringInstance(ctx echo.Context) erro } // Invoke the callback with all the unmarshaled arguments - err = w.Handler.UpdateMonitoringInstance(ctx, name) - return err -} - -// ListNamespaces converts echo context to params. -func (w *ServerInterfaceWrapper) ListNamespaces(ctx echo.Context) error { - var err error - - // Invoke the callback with all the unmarshaled arguments - err = w.Handler.ListNamespaces(ctx) + err = w.Handler.ListDatabaseClusterRestores(ctx, namespace, name) return err } @@ -1882,28 +2006,28 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL router.GET(baseURL+"/backup-storages/:name", wrapper.GetBackupStorage) router.PATCH(baseURL+"/backup-storages/:name", wrapper.UpdateBackupStorage) router.GET(baseURL+"/cluster-info", wrapper.GetKubernetesClusterInfo) - router.POST(baseURL+"/database-cluster-backups", wrapper.CreateDatabaseClusterBackup) - router.DELETE(baseURL+"/database-cluster-backups/:name", wrapper.DeleteDatabaseClusterBackup) - router.GET(baseURL+"/database-cluster-backups/:name", wrapper.GetDatabaseClusterBackup) - router.POST(baseURL+"/database-cluster-restores", wrapper.CreateDatabaseClusterRestore) - router.DELETE(baseURL+"/database-cluster-restores/:name", wrapper.DeleteDatabaseClusterRestore) - router.GET(baseURL+"/database-cluster-restores/:name", wrapper.GetDatabaseClusterRestore) - router.PUT(baseURL+"/database-cluster-restores/:name", wrapper.UpdateDatabaseClusterRestore) - router.GET(baseURL+"/database-clusters", wrapper.ListDatabaseClusters) - router.POST(baseURL+"/database-clusters", wrapper.CreateDatabaseCluster) - router.DELETE(baseURL+"/database-clusters/:name", wrapper.DeleteDatabaseCluster) - router.GET(baseURL+"/database-clusters/:name", wrapper.GetDatabaseCluster) - router.PUT(baseURL+"/database-clusters/:name", wrapper.UpdateDatabaseCluster) - router.GET(baseURL+"/database-clusters/:name/backups", wrapper.ListDatabaseClusterBackups) - router.GET(baseURL+"/database-clusters/:name/credentials", wrapper.GetDatabaseClusterCredentials) - router.GET(baseURL+"/database-clusters/:name/pitr", wrapper.GetDatabaseClusterPitr) - router.GET(baseURL+"/database-clusters/:name/restores", wrapper.ListDatabaseClusterRestores) router.GET(baseURL+"/monitoring-instances", wrapper.ListMonitoringInstances) router.POST(baseURL+"/monitoring-instances", wrapper.CreateMonitoringInstance) router.DELETE(baseURL+"/monitoring-instances/:name", wrapper.DeleteMonitoringInstance) router.GET(baseURL+"/monitoring-instances/:name", wrapper.GetMonitoringInstance) router.PATCH(baseURL+"/monitoring-instances/:name", wrapper.UpdateMonitoringInstance) router.GET(baseURL+"/namespaces", wrapper.ListNamespaces) + router.POST(baseURL+"/namespaces/:namespace/database-cluster-backups", wrapper.CreateDatabaseClusterBackup) + router.DELETE(baseURL+"/namespaces/:namespace/database-cluster-backups/:name", wrapper.DeleteDatabaseClusterBackup) + router.GET(baseURL+"/namespaces/:namespace/database-cluster-backups/:name", wrapper.GetDatabaseClusterBackup) + router.POST(baseURL+"/namespaces/:namespace/database-cluster-restores", wrapper.CreateDatabaseClusterRestore) + router.DELETE(baseURL+"/namespaces/:namespace/database-cluster-restores/:name", wrapper.DeleteDatabaseClusterRestore) + router.GET(baseURL+"/namespaces/:namespace/database-cluster-restores/:name", wrapper.GetDatabaseClusterRestore) + router.PUT(baseURL+"/namespaces/:namespace/database-cluster-restores/:name", wrapper.UpdateDatabaseClusterRestore) + router.GET(baseURL+"/namespaces/:namespace/database-clusters", wrapper.ListDatabaseClusters) + router.POST(baseURL+"/namespaces/:namespace/database-clusters", wrapper.CreateDatabaseCluster) + router.DELETE(baseURL+"/namespaces/:namespace/database-clusters/:name", wrapper.DeleteDatabaseCluster) + router.GET(baseURL+"/namespaces/:namespace/database-clusters/:name", wrapper.GetDatabaseCluster) + router.PUT(baseURL+"/namespaces/:namespace/database-clusters/:name", wrapper.UpdateDatabaseCluster) + router.GET(baseURL+"/namespaces/:namespace/database-clusters/:name/backups", wrapper.ListDatabaseClusterBackups) + router.GET(baseURL+"/namespaces/:namespace/database-clusters/:name/credentials", wrapper.GetDatabaseClusterCredentials) + router.GET(baseURL+"/namespaces/:namespace/database-clusters/:name/pitr", wrapper.GetDatabaseClusterPitr) + router.GET(baseURL+"/namespaces/:namespace/database-clusters/:name/restores", wrapper.ListDatabaseClusterRestores) router.GET(baseURL+"/namespaces/:namespace/database-engines", wrapper.ListDatabaseEngines) router.GET(baseURL+"/namespaces/:namespace/database-engines/:name", wrapper.GetDatabaseEngine) router.PUT(baseURL+"/namespaces/:namespace/database-engines/:name", wrapper.UpdateDatabaseEngine) @@ -1913,139 +2037,139 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+x9bXPbNtboX8Gwz0yTrkTbSbuz6y87juNtfVu3HtvZO3fj3AYiIQlrEmABULaS5r8/", - "gwOAr6BESbbjbPglsUgQL+f9HBwcfAwinmacEaZkcPgxkNGcpBj+fIWjmzy7VFzgGdEPcBxTRTnDybng", - "GRGKEhkcTnEiySiIiYwEzfT74NB+i6T5GFE25SLF8HIUZJWvPwaTPLoh6lecwhhqmZHgMJBKUDYLPjX6", - "9bxnXR8KMvN+MwruxjM+1g/H8oZmY56ZRY0zTpkiIjhUIiefRoHCYmZmJjMcmdnWl/kLlQrxKWJFG4ST", - "hN+SGCmOckmQmlOJJjVoBKOAKpJK76ztAywEXpa/PwaE5Wlw+DaQL4NRgD/kggTvRu3Pc5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- "BM+NinYRk3beVJ0lzDdNlqikpx2+9V7CaEVyOysLSjFiNXd5oYfugv867Y4qOGiaX+9adP29z4Ec6G8V", - "/fUjhm7F6bW6fiRqM/L6kainTluDzHwyNNuDvFZYelhF3kp8QlGcuPxjFzboGCFEJuHXVuWoNzX7UWGL", - "yD05wk+Dzu/frulOh+5n1wBQZIh+64JusSvoQlWD1fMlcfBm3LbGArJnM8cu8rJSJbmDnLAfDJu/1Xv9", - "zRXdGLVPfvpUlv9I7QPSnX/Agf621iA7UIOjyJu/SUuHrgbC2BGkrQcLh5hWxxc6rhvp8Ez9d148jCTv", - "uF/DL8U7lvH53dTeq+hinBf7B48/GXdRkWUnM48Xjz+PI1sTd5AgHr+9m3WdhIi9cF4tM7Z149fID/NN", - "l/zobYp2rBm2EDWLT3nOYpsbdWY30966UOG7omi09+ZEG1f9Avy4DdMSBjV9P8GJjfmsI0hxAbkEcjMG", - "+pGogXuehkoemMQwSU863kobuTre25iw9tt+NuxF0fgRjNii6nVPK9ZdZPDUzNgV6/gMduyK2TyuIbti", - "IoMlu4klW3Jwh/BwkF4jPXY1ZrskideaLSXJ9grZXXSxk0a+qEmNwaAdeK03ma9lt61M2i42atu0Aw99", - "RhU98Eofu3YjZslyL7NkCY421TlmZ+sr5Jcvwyq324GDVb65VT7Nk0H8VMVPP/GwlWm8WcJy615ob8py", - "A/EPmrTsuxZ7UHH3krXsQ3YHjfXJXG521y8c8zhxmN6i/qkFXp6IbO8n1JPlA8dbhkDLjoGWlRzuVR/b", - "RlTWSgNvSGUXu3Y3e3YIngz8szp4shEv9U5XXssn7ZjJwCQPq0cHLuhKft6QBTYIhqxlA2805L+LE56o", - "FfwEAh0D995XVOHeDMK9Ssrp1uEF5DrpEWV4VTQdlN9WGS9D6OThQicVQt4m+6VgqkgQqFuEE7n2fEE3", - "U6NqN+vtyeNa64G7NuSuEnwDdz2Ekdmg5i3VVUaVWMtS55wyNaZsfEVTggRJCmYvr9HexXM715MYWGxj", - "FgO4Dcy1NXPtStdb8lw1p3N7G7HopYeReFG2HZhsu/3bwUx8QDOxQsu9dnPLewfH7t6qzbjJc3Ghn5E8", - "91495LZu1zVbA+HdC+F1oN3RXOpBdvcO75Gvu7I+JIgyid5r0fW+vDcjvGavsCSxK+zu3pt6sBmJFF0Q", - "dEOWppRc/dIcRkgsa31d5tEcYTlCdGq6OkRZmr63V5m8139DZ9UvbUHq2BWrq40RdpZj8lzh9jDhuTVX", - "NXZE6866kfH5tq19194NrLxTiaZuplvLyV2qY9vN3DPv9be+/Vwv7/Q2xTqu2f3KKzh9b+b6sMP7pArj", - "yhjBT39z1k+h6/Rdz/ha2oP8fyRqN9o/e0TaH+T+wFh9QnHpVlzVUffK7OBuoVnMh09aszyGbVi7WLnD", - "NkzX2YafpYjVICT+e4TEBly83kZltVuYO7UxTpLqZcwpZnhmaojb4t7eiEbtRvgHo+36Td69yboleNev", - "sQExY8vD35/KECxhM8p6xIjKW2+LGJX7dFWY9aRo01vyFrPslrfu9dMKi5q1DlGp3aNSK4mtGQc1YG8J", - "iJXkXvFrN90yNz2s2rs7cS0+L8mPeu1hFMv5UjYfLHQHDrvPnfOCCjqZqyM506vd1/FKPTXzK2eXh0vi", - "7OaUp53DOXD4vdraGzC51qDlTWhr69XiDEdULaE6aamyiw52qld7UbmQ7fGK1pajDtS3feXa7emiXbl2", - "Ud5k2EmM7samVzi6ISwubr+npuZxndjs9YcPXQ/Z3cC4vYO3clXQrcGF0Za5SILDYG9xEGi1YuHYBJbu", - "cqnm2u12OT32QqzKdfKVQ9pWsWlstPVjd2dOkHu6aiYEbdVt6VQ2enWaY4e5okpGkH/ORdmCXUYpk9P9", - "g7iagxuM8apZmNz2XK9L/undp/8NAAD//x3W6+QZ9AAA", + "H4sIAAAAAAAC/+x9+3PbNvbvv4JRvzNNuhJtJ+3Orn/ZsR1v69u69djO3rkb5zYQCUlYkwALgLKVNP/7", + "d3AA8AlK1MOOveEvbSyCeByc5wcHh58GIU9SzghTcnD4aSDDGUkw/PMYh7dZeqW4wFOif8BRRBXlDMcX", + "gqdEKErk4HCCY0mGg4jIUNBUPx8c2neRNC8jyiZcJBgeDgdp6e1Pg3EW3hL1K05gDLVIyeBwIJWgbDr4", + "XOvX85y1vSjI1PvOcHA/mvKR/nEkb2k64qlZ1CjllCkiBodKZOTzcKCwmJqZyRSHZrbVZf5CpUJ8glje", + "BuE45nckQoqjTBKkZlSicYUag+GAKpJI76ztD1gIvCj+/jQgLEsGh+8G8vVgOMAfM0EG74fN1zMRe7oF", + "avyRUUEi3QeQbFgmvO3Js+RiED7+DwmVHqTCGFLTQI+Zr+l/BJkMDgff7BWctWfZaq/KU571ngiCFak0", + "u8ACm543Z8BU90EUEbLBfzgMiZQ/k4V3P6rcWR3jekZQGPMsyocxrfdCzhSmjAjEStTdhKurAx5plhIo", + "IhPKiB5VN4cxNBOqGSkJHPz55tcr89iIH5oplcrDvb3bbEwEI4rIgPK9iIdSzzkkqZJ7fE7EnJK7vTsu", + "bimbju6omo3M7ss94PS9byImRzEek3gEPwyGA3KPkzSGvbyTo4jMfcveXiYlCQVRbbv1NUlswbdlqqwn", + "yW+wwmMsyUmcSaBynVy1BohK4KsrEGfNVfBnZFuFppVERxdnQVPQUvovIqRlgBpnX5zZZ5a7zThz85vm", + "dTMisDmVSJBUEEmYApuif8YMmXUF6IoI/SKSM57FEQo5mxOhkCAhnzL6Me9N6i3Xw8RYEakQcBrDMZrj", + "OCNDhFmEErxAguh+UcZKPUATGaBzLox5O8yFa0pVcPs3kKyQJ0nGqFqAShB0nCku5F5E5iTek3Q6wiKc", + "UUVClQmyh1M6gskyvSgZJNE3gkieiRAkrME6t5RFTVL+TFmk9wk7/QBTLSimf9KLvjy9ukauf0NVQ8Ci", + "qSxoqelA2YQI03IieAK9EBaBiMIfYUwJU0hm44QqvUl/ZEQqTeYAnWDGuEJjgrI0wopEATpj6AQnJD7B", + "kjw4JTX15EiTzEvLhCis2bgki4WYyJSEK2XjKiVhhXkjIrX8IqmwAgVde8EjIVoTv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wqbaQT3YtLPPnViqwhZbshdc7exSW+UpF9F/GNJvIG8dNs/cQih9", + "nGEnumG47usX5+cdV2hrXj+IYtGzaJgSLY6NH3FK7dcLdrHZw0o68caCL03t/x0xnMcyXZyfN4l2lZJw", + "0FFVvAUveTfc9qBcZtz5Cpd5F7Ted1M85thjD3JubfS90pQY+n71311p+0DJs/jySOunRBry1QpknM6J", + "IFI55MIfOk2yOD7hSULVNkonFVxPx5/C272beRuOtYb6KhuB8rSK3oflRfv8ZcohNMcpTXA40zy4CNLb", + "qf5BBjqaDuYHgWaBc2Ki6iZz6CelUlAuBDcIllwwNSOKhqUiUFAgbobnZIgoC+Ms0orIVOzDLEJzLCjP", + "ZH6p3DgfAToqYI4EL6ADczbHGbhAn36Dlno6Q+Qm9tlb6UdRlnkE1D2B/m19PTopl45UUKo/oQpxVru1", + "D/yOBFGZYCQyMFaRUp5/ygJO5QSaYe1GC4PrFodnJhfOQD1UIp7iPzKSI2Jjkn8hg0oJD8wxo4VoHLBW", + "QnP0FphzQJBSwBBN2XlBydxUNmDkHmq5AJ6XH+PldD8xVDEF1kPOXKFT6EtPywJCKZeSQvm9SXml1Q9W", + "6HWHM8ymJEJcGBKoGWYIowm5QwllmSYXbK52EUhkSOK23sGVpv6To7a5t5rJvDxUvpOGlK7slLmmGeLY", + "UcpS2uzlhAqpcthniDIWEynRgmdmPoKEhOakVPyWMIOgYYYIQEYWGWqpi5mYUqRniiQnPGMeULjZplkd", + "QmZjqbdbPwOWs7OH7bib0XBWlOAB6XIXT932uwVCGZ/8TcdCzhZFCFx8vUmG1pLEkA4L9TEJa9SssDN3", + "k5IoY7eM3zHgXkNe3Y3biphMFMoYiBSL8vpvUQZuiSSC4ph+LKqM5ROlxaVk9IJQ4P8xCbG2RFSZElUK", + "hbOM6QBGz989VbZkp8GepW30sliPvfHBuOHL+prMQvLiYxutxAGxPI4AhMUMzQ+Cgx9QxF1JpdIYhve1", + "1md6G/UibKzn55TviFRUe29s+l2lRrEW3FjvH0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Iu5x6ecih8M8NH8flFrkOSCmgfnz91v9d94mz7uwI8CftTYmbcM0", + "INkoJEwJHI8Obga6xed8ScvXhj9mgixdHrRYssI8AWXJIm3/v+MQQOXfzfity621LtZdrKqhAMy2VwRz", + "kH9265ibEvo74XnPSDZtyCMH16V6RxUmtEcKruBxOSHDZnk8jvbqFdf6imu1ilmitz4PG5Zw75MWiM9G", + "l8XEWwoJfjcm2iEmzbypqkiYd+oiUUpPO3zn/QijVcnNrCwoxYjVzOWFHroP/Fd5d1jag7r79b7B19/7", + "Asie/5bxXzdmaDecXq/rR6LWY68fiXrqvNXrzCfDsx3Ya4mnh1XorcQnFMWxyz92sEHLCAEyCb+2Kke1", + "qTmPChpM7skRfhp8vnu/pj0duptfA0SRAfqtjbr5qaCDqnqv5zlJ8HrStsIDsnczRw55WWqS3EVOOA+G", + "w9/yd/3NJ7oxat789Jks/5XaB+Q7/4A9/21sQbbgBseRt3+Tlg+L64gjd51lPWDKc5/Rj055rsM8JNu1", + "3b7pGW8nOFXLtjsGSzyb3Q5ZHfm6K46NwEJK9EEz/IcinTa4YcdYksjle7nn5pg4JfDNRnRLFgZhrubS", + "M0IiWenrKgtnCMshohPT1SFKk+SDzXD+oP8NnZXftHkqkcOwK2MErSiN52bXw7g0K25wtvg15+2b8eVA", + "G99tuF6Ut0Ju2oVupSS3mY5NkZxz7614H5zjlZ3O8UjL7fuvHNj53sz1YYf3aRXGFZrwjEVPH17yc+gq", + "e9cRaUo6sP+PRG3H++ePyPu93u8FqwsGlmwkVS1wmAFwNrAs5sUnbVkewzes1Fto8Q2TVb7hF8G2eiXx", + "36Mk1pDi1T4qqxRnaLXGOI7LNRoSzPDUpBbZnB8volEpFPNgvF0t8NGZrRuKd/UaaxQzvjz8+/Oeq5U5", + "csCl/W4QFLtZnofS8lnaltjY/23UNRRxPul29esef3Ed3PIhWL/qbaHjlw/NO6+iTQG/2j94/Mm4L2pb", + "tWzm8erx53FkP97UwxQemKJddzjdH3np/H4TXbYpeLFCr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WzvzClyT1d1IGqjbougstarsxxbzBWVICf/nPP7", + "NNuMUhxM+wdxFVHWGOO4/mkT23P1yyaf33/+3wAAAP//6jMNuFv8AAA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/api/namespace.go b/api/namespace.go index 330b2a25..906c0e8d 100644 --- a/api/namespace.go +++ b/api/namespace.go @@ -9,7 +9,7 @@ import ( // ListNamespaces returns the current version information. func (e *EverestServer) ListNamespaces(ctx echo.Context) error { - namespaces, err := e.kubeClient.GetWatchedNamespaces(ctx.Request().Context(), e.kubeClient.Namespace()) + namespaces, err := e.kubeClient.GetDBNamespaces(ctx.Request().Context(), e.kubeClient.Namespace()) if err != nil { e.l.Error(err) return ctx.JSON(http.StatusInternalServerError, Error{ diff --git a/api/telemetry.go b/api/telemetry.go index ca2ece09..5e9f9a1f 100644 --- a/api/telemetry.go +++ b/api/telemetry.go @@ -103,15 +103,23 @@ func (e *EverestServer) collectMetrics(ctx context.Context, url string) error { return err } - clusters, err := e.kubeClient.ListDatabaseClusters(ctx) + namespaces, err := e.kubeClient.GetDBNamespaces(ctx, e.kubeClient.Namespace()) if err != nil { - e.l.Error(errors.Join(err, errors.New("failed to list database clusters"))) + e.l.Error(errors.Join(err, errors.New("failed to get watched namespaces"))) return err } types := make(map[string]int, 3) - for _, cl := range clusters.Items { - types[string(cl.Spec.Engine.Type)]++ + for _, ns := range namespaces { + clusters, err := e.kubeClient.ListDatabaseClusters(ctx, ns) + if err != nil { + e.l.Error(errors.Join(err, errors.New("failed to list database clusters"))) + return err + } + + for _, cl := range clusters.Items { + types[string(cl.Spec.Engine.Type)]++ + } } // key - the engine type, value - the amount of db clusters of that type diff --git a/api/validation.go b/api/validation.go index ac965930..172b8569 100644 --- a/api/validation.go +++ b/api/validation.go @@ -471,7 +471,7 @@ func validateCreateDatabaseClusterRequest(dbc DatabaseCluster) error { return validateRFC1035(strName, "metadata.name") } -func (e *EverestServer) validateDatabaseClusterCR(ctx echo.Context, databaseCluster *DatabaseCluster) error { //nolint:cyclop +func (e *EverestServer) validateDatabaseClusterCR(ctx echo.Context, namespace string, databaseCluster *DatabaseCluster) error { //nolint:cyclop if err := validateCreateDatabaseClusterRequest(*databaseCluster); err != nil { return err } @@ -480,7 +480,7 @@ func (e *EverestServer) validateDatabaseClusterCR(ctx echo.Context, databaseClus if !ok { return errors.New("unsupported database engine") } - engine, err := e.kubeClient.GetDatabaseEngine(ctx.Request().Context(), engineName) + engine, err := e.kubeClient.GetDatabaseEngine(ctx.Request().Context(), namespace, engineName) if err != nil { return err } @@ -830,7 +830,7 @@ func validateDatabaseClusterOnUpdate(dbc *DatabaseCluster, oldDB *everestv1alpha return nil } -func validateDatabaseClusterBackup(ctx context.Context, backup *DatabaseClusterBackup, kubeClient *kubernetes.Kubernetes) error { +func validateDatabaseClusterBackup(ctx context.Context, namespace string, backup *DatabaseClusterBackup, kubeClient *kubernetes.Kubernetes) error { if backup == nil { return errors.New("backup cannot be empty") } @@ -851,7 +851,7 @@ func validateDatabaseClusterBackup(ctx context.Context, backup *DatabaseClusterB if b.Spec.DBClusterName == "" { return errors.New(".spec.dbClusterName cannot be empty") } - db, err := kubeClient.GetDatabaseCluster(ctx, b.Spec.DBClusterName) + db, err := kubeClient.GetDatabaseCluster(ctx, namespace, b.Spec.DBClusterName) if err != nil { if k8serrors.IsNotFound(err) { return fmt.Errorf("database cluster %s does not exist", b.Spec.DBClusterName) @@ -874,7 +874,7 @@ func validateDatabaseClusterBackup(ctx context.Context, backup *DatabaseClusterB return nil } -func validateDatabaseClusterRestore(ctx context.Context, restore *DatabaseClusterRestore, kubeClient *kubernetes.Kubernetes) error { +func validateDatabaseClusterRestore(ctx context.Context, namespace string, restore *DatabaseClusterRestore, kubeClient *kubernetes.Kubernetes) error { if restore == nil { return errors.New("restore cannot be empty") } @@ -895,14 +895,14 @@ func validateDatabaseClusterRestore(ctx context.Context, restore *DatabaseCluste if r.Spec.DBClusterName == "" { return errors.New(".spec.dbClusterName cannot be empty") } - _, err = kubeClient.GetDatabaseCluster(ctx, r.Spec.DBClusterName) + _, err = kubeClient.GetDatabaseCluster(ctx, namespace, r.Spec.DBClusterName) if err != nil { if k8serrors.IsNotFound(err) { return fmt.Errorf("database cluster %s does not exist", r.Spec.DBClusterName) } return err } - b, err := kubeClient.GetDatabaseClusterBackup(ctx, r.Spec.DataSource.DBClusterBackupName) + b, err := kubeClient.GetDatabaseClusterBackup(ctx, namespace, r.Spec.DataSource.DBClusterBackupName) if err != nil { if k8serrors.IsNotFound(err) { return fmt.Errorf("backup %s does not exist", r.Spec.DataSource.DBClusterBackupName) diff --git a/client/everest-client.gen.go b/client/everest-client.gen.go index 36d5a2dd..00725140 100644 --- a/client/everest-client.gen.go +++ b/client/everest-client.gen.go @@ -824,6 +824,12 @@ type CreateBackupStorageJSONRequestBody = CreateBackupStorageParams // UpdateBackupStorageJSONRequestBody defines body for UpdateBackupStorage for application/json ContentType. type UpdateBackupStorageJSONRequestBody = UpdateBackupStorageParams +// CreateMonitoringInstanceJSONRequestBody defines body for CreateMonitoringInstance for application/json ContentType. +type CreateMonitoringInstanceJSONRequestBody = MonitoringInstanceCreateParams + +// UpdateMonitoringInstanceJSONRequestBody defines body for UpdateMonitoringInstance for application/json ContentType. +type UpdateMonitoringInstanceJSONRequestBody = MonitoringInstanceUpdateParams + // CreateDatabaseClusterBackupJSONRequestBody defines body for CreateDatabaseClusterBackup for application/json ContentType. type CreateDatabaseClusterBackupJSONRequestBody = DatabaseClusterBackup @@ -839,12 +845,6 @@ type CreateDatabaseClusterJSONRequestBody = DatabaseCluster // UpdateDatabaseClusterJSONRequestBody defines body for UpdateDatabaseCluster for application/json ContentType. type UpdateDatabaseClusterJSONRequestBody = DatabaseCluster -// CreateMonitoringInstanceJSONRequestBody defines body for CreateMonitoringInstance for application/json ContentType. -type CreateMonitoringInstanceJSONRequestBody = MonitoringInstanceCreateParams - -// UpdateMonitoringInstanceJSONRequestBody defines body for UpdateMonitoringInstance for application/json ContentType. -type UpdateMonitoringInstanceJSONRequestBody = MonitoringInstanceUpdateParams - // UpdateDatabaseEngineJSONRequestBody defines body for UpdateDatabaseEngine for application/json ContentType. type UpdateDatabaseEngineJSONRequestBody = DatabaseEngine @@ -1377,85 +1377,85 @@ type ClientInterface interface { // GetKubernetesClusterInfo request GetKubernetesClusterInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListMonitoringInstances request + ListMonitoringInstances(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateMonitoringInstanceWithBody request with any body + CreateMonitoringInstanceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateMonitoringInstance(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteMonitoringInstance request + DeleteMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetMonitoringInstance request + GetMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateMonitoringInstanceWithBody request with any body + UpdateMonitoringInstanceWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateMonitoringInstance(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListNamespaces request + ListNamespaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateDatabaseClusterBackupWithBody request with any body - CreateDatabaseClusterBackupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDatabaseClusterBackupWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateDatabaseClusterBackup(ctx context.Context, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDatabaseClusterBackup(ctx context.Context, namespace string, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteDatabaseClusterBackup request - DeleteDatabaseClusterBackup(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteDatabaseClusterBackup(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDatabaseClusterBackup request - GetDatabaseClusterBackup(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetDatabaseClusterBackup(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateDatabaseClusterRestoreWithBody request with any body - CreateDatabaseClusterRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDatabaseClusterRestoreWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateDatabaseClusterRestore(ctx context.Context, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDatabaseClusterRestore(ctx context.Context, namespace string, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteDatabaseClusterRestore request - DeleteDatabaseClusterRestore(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteDatabaseClusterRestore(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDatabaseClusterRestore request - GetDatabaseClusterRestore(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetDatabaseClusterRestore(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateDatabaseClusterRestoreWithBody request with any body - UpdateDatabaseClusterRestoreWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateDatabaseClusterRestoreWithBody(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateDatabaseClusterRestore(ctx context.Context, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateDatabaseClusterRestore(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListDatabaseClusters request - ListDatabaseClusters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + ListDatabaseClusters(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateDatabaseClusterWithBody request with any body - CreateDatabaseClusterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDatabaseClusterWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateDatabaseCluster(ctx context.Context, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDatabaseCluster(ctx context.Context, namespace string, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteDatabaseCluster request - DeleteDatabaseCluster(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteDatabaseCluster(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDatabaseCluster request - GetDatabaseCluster(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetDatabaseCluster(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateDatabaseClusterWithBody request with any body - UpdateDatabaseClusterWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateDatabaseClusterWithBody(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateDatabaseCluster(ctx context.Context, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateDatabaseCluster(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListDatabaseClusterBackups request - ListDatabaseClusterBackups(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + ListDatabaseClusterBackups(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDatabaseClusterCredentials request - GetDatabaseClusterCredentials(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetDatabaseClusterCredentials(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDatabaseClusterPitr request - GetDatabaseClusterPitr(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetDatabaseClusterPitr(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListDatabaseClusterRestores request - ListDatabaseClusterRestores(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListMonitoringInstances request - ListMonitoringInstances(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateMonitoringInstanceWithBody request with any body - CreateMonitoringInstanceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateMonitoringInstance(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteMonitoringInstance request - DeleteMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetMonitoringInstance request - GetMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateMonitoringInstanceWithBody request with any body - UpdateMonitoringInstanceWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateMonitoringInstance(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListNamespaces request - ListNamespaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + ListDatabaseClusterRestores(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListDatabaseEngines request ListDatabaseEngines(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1571,8 +1571,8 @@ func (c *Client) GetKubernetesClusterInfo(ctx context.Context, reqEditors ...Req return c.Client.Do(req) } -func (c *Client) CreateDatabaseClusterBackupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDatabaseClusterBackupRequestWithBody(c.Server, contentType, body) +func (c *Client) ListMonitoringInstances(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListMonitoringInstancesRequest(c.Server) if err != nil { return nil, err } @@ -1583,8 +1583,8 @@ func (c *Client) CreateDatabaseClusterBackupWithBody(ctx context.Context, conten return c.Client.Do(req) } -func (c *Client) CreateDatabaseClusterBackup(ctx context.Context, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDatabaseClusterBackupRequest(c.Server, body) +func (c *Client) CreateMonitoringInstanceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMonitoringInstanceRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1595,8 +1595,8 @@ func (c *Client) CreateDatabaseClusterBackup(ctx context.Context, body CreateDat return c.Client.Do(req) } -func (c *Client) DeleteDatabaseClusterBackup(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDatabaseClusterBackupRequest(c.Server, name) +func (c *Client) CreateMonitoringInstance(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMonitoringInstanceRequest(c.Server, body) if err != nil { return nil, err } @@ -1607,8 +1607,8 @@ func (c *Client) DeleteDatabaseClusterBackup(ctx context.Context, name string, r return c.Client.Do(req) } -func (c *Client) GetDatabaseClusterBackup(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDatabaseClusterBackupRequest(c.Server, name) +func (c *Client) DeleteMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteMonitoringInstanceRequest(c.Server, name) if err != nil { return nil, err } @@ -1619,8 +1619,8 @@ func (c *Client) GetDatabaseClusterBackup(ctx context.Context, name string, reqE return c.Client.Do(req) } -func (c *Client) CreateDatabaseClusterRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDatabaseClusterRestoreRequestWithBody(c.Server, contentType, body) +func (c *Client) GetMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetMonitoringInstanceRequest(c.Server, name) if err != nil { return nil, err } @@ -1631,8 +1631,8 @@ func (c *Client) CreateDatabaseClusterRestoreWithBody(ctx context.Context, conte return c.Client.Do(req) } -func (c *Client) CreateDatabaseClusterRestore(ctx context.Context, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDatabaseClusterRestoreRequest(c.Server, body) +func (c *Client) UpdateMonitoringInstanceWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateMonitoringInstanceRequestWithBody(c.Server, name, contentType, body) if err != nil { return nil, err } @@ -1643,8 +1643,8 @@ func (c *Client) CreateDatabaseClusterRestore(ctx context.Context, body CreateDa return c.Client.Do(req) } -func (c *Client) DeleteDatabaseClusterRestore(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDatabaseClusterRestoreRequest(c.Server, name) +func (c *Client) UpdateMonitoringInstance(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateMonitoringInstanceRequest(c.Server, name, body) if err != nil { return nil, err } @@ -1655,8 +1655,8 @@ func (c *Client) DeleteDatabaseClusterRestore(ctx context.Context, name string, return c.Client.Do(req) } -func (c *Client) GetDatabaseClusterRestore(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDatabaseClusterRestoreRequest(c.Server, name) +func (c *Client) ListNamespaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListNamespacesRequest(c.Server) if err != nil { return nil, err } @@ -1667,8 +1667,8 @@ func (c *Client) GetDatabaseClusterRestore(ctx context.Context, name string, req return c.Client.Do(req) } -func (c *Client) UpdateDatabaseClusterRestoreWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDatabaseClusterRestoreRequestWithBody(c.Server, name, contentType, body) +func (c *Client) CreateDatabaseClusterBackupWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDatabaseClusterBackupRequestWithBody(c.Server, namespace, contentType, body) if err != nil { return nil, err } @@ -1679,8 +1679,8 @@ func (c *Client) UpdateDatabaseClusterRestoreWithBody(ctx context.Context, name return c.Client.Do(req) } -func (c *Client) UpdateDatabaseClusterRestore(ctx context.Context, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDatabaseClusterRestoreRequest(c.Server, name, body) +func (c *Client) CreateDatabaseClusterBackup(ctx context.Context, namespace string, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDatabaseClusterBackupRequest(c.Server, namespace, body) if err != nil { return nil, err } @@ -1691,8 +1691,8 @@ func (c *Client) UpdateDatabaseClusterRestore(ctx context.Context, name string, return c.Client.Do(req) } -func (c *Client) ListDatabaseClusters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDatabaseClustersRequest(c.Server) +func (c *Client) DeleteDatabaseClusterBackup(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDatabaseClusterBackupRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1703,8 +1703,8 @@ func (c *Client) ListDatabaseClusters(ctx context.Context, reqEditors ...Request return c.Client.Do(req) } -func (c *Client) CreateDatabaseClusterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDatabaseClusterRequestWithBody(c.Server, contentType, body) +func (c *Client) GetDatabaseClusterBackup(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDatabaseClusterBackupRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1715,8 +1715,8 @@ func (c *Client) CreateDatabaseClusterWithBody(ctx context.Context, contentType return c.Client.Do(req) } -func (c *Client) CreateDatabaseCluster(ctx context.Context, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDatabaseClusterRequest(c.Server, body) +func (c *Client) CreateDatabaseClusterRestoreWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDatabaseClusterRestoreRequestWithBody(c.Server, namespace, contentType, body) if err != nil { return nil, err } @@ -1727,8 +1727,8 @@ func (c *Client) CreateDatabaseCluster(ctx context.Context, body CreateDatabaseC return c.Client.Do(req) } -func (c *Client) DeleteDatabaseCluster(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDatabaseClusterRequest(c.Server, name) +func (c *Client) CreateDatabaseClusterRestore(ctx context.Context, namespace string, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDatabaseClusterRestoreRequest(c.Server, namespace, body) if err != nil { return nil, err } @@ -1739,8 +1739,8 @@ func (c *Client) DeleteDatabaseCluster(ctx context.Context, name string, reqEdit return c.Client.Do(req) } -func (c *Client) GetDatabaseCluster(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDatabaseClusterRequest(c.Server, name) +func (c *Client) DeleteDatabaseClusterRestore(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDatabaseClusterRestoreRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1751,8 +1751,8 @@ func (c *Client) GetDatabaseCluster(ctx context.Context, name string, reqEditors return c.Client.Do(req) } -func (c *Client) UpdateDatabaseClusterWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDatabaseClusterRequestWithBody(c.Server, name, contentType, body) +func (c *Client) GetDatabaseClusterRestore(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDatabaseClusterRestoreRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1763,8 +1763,8 @@ func (c *Client) UpdateDatabaseClusterWithBody(ctx context.Context, name string, return c.Client.Do(req) } -func (c *Client) UpdateDatabaseCluster(ctx context.Context, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDatabaseClusterRequest(c.Server, name, body) +func (c *Client) UpdateDatabaseClusterRestoreWithBody(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDatabaseClusterRestoreRequestWithBody(c.Server, namespace, name, contentType, body) if err != nil { return nil, err } @@ -1775,8 +1775,8 @@ func (c *Client) UpdateDatabaseCluster(ctx context.Context, name string, body Up return c.Client.Do(req) } -func (c *Client) ListDatabaseClusterBackups(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDatabaseClusterBackupsRequest(c.Server, name) +func (c *Client) UpdateDatabaseClusterRestore(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDatabaseClusterRestoreRequest(c.Server, namespace, name, body) if err != nil { return nil, err } @@ -1787,8 +1787,8 @@ func (c *Client) ListDatabaseClusterBackups(ctx context.Context, name string, re return c.Client.Do(req) } -func (c *Client) GetDatabaseClusterCredentials(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDatabaseClusterCredentialsRequest(c.Server, name) +func (c *Client) ListDatabaseClusters(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListDatabaseClustersRequest(c.Server, namespace) if err != nil { return nil, err } @@ -1799,8 +1799,8 @@ func (c *Client) GetDatabaseClusterCredentials(ctx context.Context, name string, return c.Client.Do(req) } -func (c *Client) GetDatabaseClusterPitr(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDatabaseClusterPitrRequest(c.Server, name) +func (c *Client) CreateDatabaseClusterWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDatabaseClusterRequestWithBody(c.Server, namespace, contentType, body) if err != nil { return nil, err } @@ -1811,8 +1811,8 @@ func (c *Client) GetDatabaseClusterPitr(ctx context.Context, name string, reqEdi return c.Client.Do(req) } -func (c *Client) ListDatabaseClusterRestores(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDatabaseClusterRestoresRequest(c.Server, name) +func (c *Client) CreateDatabaseCluster(ctx context.Context, namespace string, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDatabaseClusterRequest(c.Server, namespace, body) if err != nil { return nil, err } @@ -1823,8 +1823,8 @@ func (c *Client) ListDatabaseClusterRestores(ctx context.Context, name string, r return c.Client.Do(req) } -func (c *Client) ListMonitoringInstances(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListMonitoringInstancesRequest(c.Server) +func (c *Client) DeleteDatabaseCluster(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDatabaseClusterRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1835,8 +1835,8 @@ func (c *Client) ListMonitoringInstances(ctx context.Context, reqEditors ...Requ return c.Client.Do(req) } -func (c *Client) CreateMonitoringInstanceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMonitoringInstanceRequestWithBody(c.Server, contentType, body) +func (c *Client) GetDatabaseCluster(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDatabaseClusterRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1847,8 +1847,8 @@ func (c *Client) CreateMonitoringInstanceWithBody(ctx context.Context, contentTy return c.Client.Do(req) } -func (c *Client) CreateMonitoringInstance(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMonitoringInstanceRequest(c.Server, body) +func (c *Client) UpdateDatabaseClusterWithBody(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDatabaseClusterRequestWithBody(c.Server, namespace, name, contentType, body) if err != nil { return nil, err } @@ -1859,8 +1859,8 @@ func (c *Client) CreateMonitoringInstance(ctx context.Context, body CreateMonito return c.Client.Do(req) } -func (c *Client) DeleteMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteMonitoringInstanceRequest(c.Server, name) +func (c *Client) UpdateDatabaseCluster(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDatabaseClusterRequest(c.Server, namespace, name, body) if err != nil { return nil, err } @@ -1871,8 +1871,8 @@ func (c *Client) DeleteMonitoringInstance(ctx context.Context, name string, reqE return c.Client.Do(req) } -func (c *Client) GetMonitoringInstance(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetMonitoringInstanceRequest(c.Server, name) +func (c *Client) ListDatabaseClusterBackups(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListDatabaseClusterBackupsRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1883,8 +1883,8 @@ func (c *Client) GetMonitoringInstance(ctx context.Context, name string, reqEdit return c.Client.Do(req) } -func (c *Client) UpdateMonitoringInstanceWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateMonitoringInstanceRequestWithBody(c.Server, name, contentType, body) +func (c *Client) GetDatabaseClusterCredentials(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDatabaseClusterCredentialsRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1895,8 +1895,8 @@ func (c *Client) UpdateMonitoringInstanceWithBody(ctx context.Context, name stri return c.Client.Do(req) } -func (c *Client) UpdateMonitoringInstance(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateMonitoringInstanceRequest(c.Server, name, body) +func (c *Client) GetDatabaseClusterPitr(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDatabaseClusterPitrRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -1907,8 +1907,8 @@ func (c *Client) UpdateMonitoringInstance(ctx context.Context, name string, body return c.Client.Do(req) } -func (c *Client) ListNamespaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListNamespacesRequest(c.Server) +func (c *Client) ListDatabaseClusterRestores(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListDatabaseClusterRestoresRequest(c.Server, namespace, name) if err != nil { return nil, err } @@ -2200,97 +2200,16 @@ func NewGetKubernetesClusterInfoRequest(server string) (*http.Request, error) { return req, nil } -// NewCreateDatabaseClusterBackupRequest calls the generic CreateDatabaseClusterBackup builder with application/json body -func NewCreateDatabaseClusterBackupRequest(server string, body CreateDatabaseClusterBackupJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateDatabaseClusterBackupRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateDatabaseClusterBackupRequestWithBody generates requests for CreateDatabaseClusterBackup with any type of body -func NewCreateDatabaseClusterBackupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/database-cluster-backups") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteDatabaseClusterBackupRequest generates requests for DeleteDatabaseClusterBackup -func NewDeleteDatabaseClusterBackupRequest(server string, name string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/database-cluster-backups/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDatabaseClusterBackupRequest generates requests for GetDatabaseClusterBackup -func NewGetDatabaseClusterBackupRequest(server string, name string) (*http.Request, error) { +// NewListMonitoringInstancesRequest generates requests for ListMonitoringInstances +func NewListMonitoringInstancesRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/database-cluster-backups/%s", pathParam0) + operationPath := fmt.Sprintf("/monitoring-instances") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2308,19 +2227,19 @@ func NewGetDatabaseClusterBackupRequest(server string, name string) (*http.Reque return req, nil } -// NewCreateDatabaseClusterRestoreRequest calls the generic CreateDatabaseClusterRestore builder with application/json body -func NewCreateDatabaseClusterRestoreRequest(server string, body CreateDatabaseClusterRestoreJSONRequestBody) (*http.Request, error) { +// NewCreateMonitoringInstanceRequest calls the generic CreateMonitoringInstance builder with application/json body +func NewCreateMonitoringInstanceRequest(server string, body CreateMonitoringInstanceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateDatabaseClusterRestoreRequestWithBody(server, "application/json", bodyReader) + return NewCreateMonitoringInstanceRequestWithBody(server, "application/json", bodyReader) } -// NewCreateDatabaseClusterRestoreRequestWithBody generates requests for CreateDatabaseClusterRestore with any type of body -func NewCreateDatabaseClusterRestoreRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateMonitoringInstanceRequestWithBody generates requests for CreateMonitoringInstance with any type of body +func NewCreateMonitoringInstanceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2328,7 +2247,7 @@ func NewCreateDatabaseClusterRestoreRequestWithBody(server string, contentType s return nil, err } - operationPath := fmt.Sprintf("/database-cluster-restores") + operationPath := fmt.Sprintf("/monitoring-instances") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2348,8 +2267,8 @@ func NewCreateDatabaseClusterRestoreRequestWithBody(server string, contentType s return req, nil } -// NewDeleteDatabaseClusterRestoreRequest generates requests for DeleteDatabaseClusterRestore -func NewDeleteDatabaseClusterRestoreRequest(server string, name string) (*http.Request, error) { +// NewDeleteMonitoringInstanceRequest generates requests for DeleteMonitoringInstance +func NewDeleteMonitoringInstanceRequest(server string, name string) (*http.Request, error) { var err error var pathParam0 string @@ -2364,7 +2283,7 @@ func NewDeleteDatabaseClusterRestoreRequest(server string, name string) (*http.R return nil, err } - operationPath := fmt.Sprintf("/database-cluster-restores/%s", pathParam0) + operationPath := fmt.Sprintf("/monitoring-instances/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2382,8 +2301,8 @@ func NewDeleteDatabaseClusterRestoreRequest(server string, name string) (*http.R return req, nil } -// NewGetDatabaseClusterRestoreRequest generates requests for GetDatabaseClusterRestore -func NewGetDatabaseClusterRestoreRequest(server string, name string) (*http.Request, error) { +// NewGetMonitoringInstanceRequest generates requests for GetMonitoringInstance +func NewGetMonitoringInstanceRequest(server string, name string) (*http.Request, error) { var err error var pathParam0 string @@ -2398,7 +2317,7 @@ func NewGetDatabaseClusterRestoreRequest(server string, name string) (*http.Requ return nil, err } - operationPath := fmt.Sprintf("/database-cluster-restores/%s", pathParam0) + operationPath := fmt.Sprintf("/monitoring-instances/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2416,19 +2335,19 @@ func NewGetDatabaseClusterRestoreRequest(server string, name string) (*http.Requ return req, nil } -// NewUpdateDatabaseClusterRestoreRequest calls the generic UpdateDatabaseClusterRestore builder with application/json body -func NewUpdateDatabaseClusterRestoreRequest(server string, name string, body UpdateDatabaseClusterRestoreJSONRequestBody) (*http.Request, error) { +// NewUpdateMonitoringInstanceRequest calls the generic UpdateMonitoringInstance builder with application/json body +func NewUpdateMonitoringInstanceRequest(server string, name string, body UpdateMonitoringInstanceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateDatabaseClusterRestoreRequestWithBody(server, name, "application/json", bodyReader) + return NewUpdateMonitoringInstanceRequestWithBody(server, name, "application/json", bodyReader) } -// NewUpdateDatabaseClusterRestoreRequestWithBody generates requests for UpdateDatabaseClusterRestore with any type of body -func NewUpdateDatabaseClusterRestoreRequestWithBody(server string, name string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateMonitoringInstanceRequestWithBody generates requests for UpdateMonitoringInstance with any type of body +func NewUpdateMonitoringInstanceRequestWithBody(server string, name string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2443,7 +2362,7 @@ func NewUpdateDatabaseClusterRestoreRequestWithBody(server string, name string, return nil, err } - operationPath := fmt.Sprintf("/database-cluster-restores/%s", pathParam0) + operationPath := fmt.Sprintf("/monitoring-instances/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2453,7 +2372,7 @@ func NewUpdateDatabaseClusterRestoreRequestWithBody(server string, name string, return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -2463,8 +2382,8 @@ func NewUpdateDatabaseClusterRestoreRequestWithBody(server string, name string, return req, nil } -// NewListDatabaseClustersRequest generates requests for ListDatabaseClusters -func NewListDatabaseClustersRequest(server string) (*http.Request, error) { +// NewListNamespacesRequest generates requests for ListNamespaces +func NewListNamespacesRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2472,7 +2391,7 @@ func NewListDatabaseClustersRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/database-clusters") + operationPath := fmt.Sprintf("/namespaces") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2490,27 +2409,34 @@ func NewListDatabaseClustersRequest(server string) (*http.Request, error) { return req, nil } -// NewCreateDatabaseClusterRequest calls the generic CreateDatabaseCluster builder with application/json body -func NewCreateDatabaseClusterRequest(server string, body CreateDatabaseClusterJSONRequestBody) (*http.Request, error) { +// NewCreateDatabaseClusterBackupRequest calls the generic CreateDatabaseClusterBackup builder with application/json body +func NewCreateDatabaseClusterBackupRequest(server string, namespace string, body CreateDatabaseClusterBackupJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateDatabaseClusterRequestWithBody(server, "application/json", bodyReader) + return NewCreateDatabaseClusterBackupRequestWithBody(server, namespace, "application/json", bodyReader) } -// NewCreateDatabaseClusterRequestWithBody generates requests for CreateDatabaseCluster with any type of body -func NewCreateDatabaseClusterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateDatabaseClusterBackupRequestWithBody generates requests for CreateDatabaseClusterBackup with any type of body +func NewCreateDatabaseClusterBackupRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/database-clusters") + operationPath := fmt.Sprintf("/namespaces/%s/database-cluster-backups", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2530,13 +2456,20 @@ func NewCreateDatabaseClusterRequestWithBody(server string, contentType string, return req, nil } -// NewDeleteDatabaseClusterRequest generates requests for DeleteDatabaseCluster -func NewDeleteDatabaseClusterRequest(server string, name string) (*http.Request, error) { +// NewDeleteDatabaseClusterBackupRequest generates requests for DeleteDatabaseClusterBackup +func NewDeleteDatabaseClusterBackupRequest(server string, namespace string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2546,7 +2479,7 @@ func NewDeleteDatabaseClusterRequest(server string, name string) (*http.Request, return nil, err } - operationPath := fmt.Sprintf("/database-clusters/%s", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-cluster-backups/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2564,13 +2497,20 @@ func NewDeleteDatabaseClusterRequest(server string, name string) (*http.Request, return req, nil } -// NewGetDatabaseClusterRequest generates requests for GetDatabaseCluster -func NewGetDatabaseClusterRequest(server string, name string) (*http.Request, error) { +// NewGetDatabaseClusterBackupRequest generates requests for GetDatabaseClusterBackup +func NewGetDatabaseClusterBackupRequest(server string, namespace string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2580,7 +2520,7 @@ func NewGetDatabaseClusterRequest(server string, name string) (*http.Request, er return nil, err } - operationPath := fmt.Sprintf("/database-clusters/%s", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-cluster-backups/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2598,24 +2538,24 @@ func NewGetDatabaseClusterRequest(server string, name string) (*http.Request, er return req, nil } -// NewUpdateDatabaseClusterRequest calls the generic UpdateDatabaseCluster builder with application/json body -func NewUpdateDatabaseClusterRequest(server string, name string, body UpdateDatabaseClusterJSONRequestBody) (*http.Request, error) { +// NewCreateDatabaseClusterRestoreRequest calls the generic CreateDatabaseClusterRestore builder with application/json body +func NewCreateDatabaseClusterRestoreRequest(server string, namespace string, body CreateDatabaseClusterRestoreJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateDatabaseClusterRequestWithBody(server, name, "application/json", bodyReader) + return NewCreateDatabaseClusterRestoreRequestWithBody(server, namespace, "application/json", bodyReader) } -// NewUpdateDatabaseClusterRequestWithBody generates requests for UpdateDatabaseCluster with any type of body -func NewUpdateDatabaseClusterRequestWithBody(server string, name string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateDatabaseClusterRestoreRequestWithBody generates requests for CreateDatabaseClusterRestore with any type of body +func NewCreateDatabaseClusterRestoreRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) if err != nil { return nil, err } @@ -2625,7 +2565,7 @@ func NewUpdateDatabaseClusterRequestWithBody(server string, name string, content return nil, err } - operationPath := fmt.Sprintf("/database-clusters/%s", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-cluster-restores", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2635,7 +2575,7 @@ func NewUpdateDatabaseClusterRequestWithBody(server string, name string, content return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -2645,13 +2585,20 @@ func NewUpdateDatabaseClusterRequestWithBody(server string, name string, content return req, nil } -// NewListDatabaseClusterBackupsRequest generates requests for ListDatabaseClusterBackups -func NewListDatabaseClusterBackupsRequest(server string, name string) (*http.Request, error) { +// NewDeleteDatabaseClusterRestoreRequest generates requests for DeleteDatabaseClusterRestore +func NewDeleteDatabaseClusterRestoreRequest(server string, namespace string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2661,7 +2608,7 @@ func NewListDatabaseClusterBackupsRequest(server string, name string) (*http.Req return nil, err } - operationPath := fmt.Sprintf("/database-clusters/%s/backups", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-cluster-restores/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2671,7 +2618,7 @@ func NewListDatabaseClusterBackupsRequest(server string, name string) (*http.Req return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -2679,23 +2626,30 @@ func NewListDatabaseClusterBackupsRequest(server string, name string) (*http.Req return req, nil } -// NewGetDatabaseClusterCredentialsRequest generates requests for GetDatabaseClusterCredentials -func NewGetDatabaseClusterCredentialsRequest(server string, name string) (*http.Request, error) { +// NewGetDatabaseClusterRestoreRequest generates requests for GetDatabaseClusterRestore +func NewGetDatabaseClusterRestoreRequest(server string, namespace string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) if err != nil { return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/database-clusters/%s/credentials", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-cluster-restores/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2713,13 +2667,31 @@ func NewGetDatabaseClusterCredentialsRequest(server string, name string) (*http. return req, nil } -// NewGetDatabaseClusterPitrRequest generates requests for GetDatabaseClusterPitr -func NewGetDatabaseClusterPitrRequest(server string, name string) (*http.Request, error) { +// NewUpdateDatabaseClusterRestoreRequest calls the generic UpdateDatabaseClusterRestore builder with application/json body +func NewUpdateDatabaseClusterRestoreRequest(server string, namespace string, name string, body UpdateDatabaseClusterRestoreJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateDatabaseClusterRestoreRequestWithBody(server, namespace, name, "application/json", bodyReader) +} + +// NewUpdateDatabaseClusterRestoreRequestWithBody generates requests for UpdateDatabaseClusterRestore with any type of body +func NewUpdateDatabaseClusterRestoreRequestWithBody(server string, namespace string, name string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2729,7 +2701,7 @@ func NewGetDatabaseClusterPitrRequest(server string, name string) (*http.Request return nil, err } - operationPath := fmt.Sprintf("/database-clusters/%s/pitr", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-cluster-restores/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2739,21 +2711,23 @@ func NewGetDatabaseClusterPitrRequest(server string, name string) (*http.Request return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListDatabaseClusterRestoresRequest generates requests for ListDatabaseClusterRestores -func NewListDatabaseClusterRestoresRequest(server string, name string) (*http.Request, error) { +// NewListDatabaseClustersRequest generates requests for ListDatabaseClusters +func NewListDatabaseClustersRequest(server string, namespace string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) if err != nil { return nil, err } @@ -2763,7 +2737,7 @@ func NewListDatabaseClusterRestoresRequest(server string, name string) (*http.Re return nil, err } - operationPath := fmt.Sprintf("/database-clusters/%s/restores", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2781,16 +2755,118 @@ func NewListDatabaseClusterRestoresRequest(server string, name string) (*http.Re return req, nil } -// NewListMonitoringInstancesRequest generates requests for ListMonitoringInstances -func NewListMonitoringInstancesRequest(server string) (*http.Request, error) { +// NewCreateDatabaseClusterRequest calls the generic CreateDatabaseCluster builder with application/json body +func NewCreateDatabaseClusterRequest(server string, namespace string, body CreateDatabaseClusterJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateDatabaseClusterRequestWithBody(server, namespace, "application/json", bodyReader) +} + +// NewCreateDatabaseClusterRequestWithBody generates requests for CreateDatabaseCluster with any type of body +func NewCreateDatabaseClusterRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/monitoring-instances") + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteDatabaseClusterRequest generates requests for DeleteDatabaseCluster +func NewDeleteDatabaseClusterRequest(server string, namespace string, name string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDatabaseClusterRequest generates requests for GetDatabaseCluster +func NewGetDatabaseClusterRequest(server string, namespace string, name string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2808,27 +2884,41 @@ func NewListMonitoringInstancesRequest(server string) (*http.Request, error) { return req, nil } -// NewCreateMonitoringInstanceRequest calls the generic CreateMonitoringInstance builder with application/json body -func NewCreateMonitoringInstanceRequest(server string, body CreateMonitoringInstanceJSONRequestBody) (*http.Request, error) { +// NewUpdateDatabaseClusterRequest calls the generic UpdateDatabaseCluster builder with application/json body +func NewUpdateDatabaseClusterRequest(server string, namespace string, name string, body UpdateDatabaseClusterJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateMonitoringInstanceRequestWithBody(server, "application/json", bodyReader) + return NewUpdateDatabaseClusterRequestWithBody(server, namespace, name, "application/json", bodyReader) } -// NewCreateMonitoringInstanceRequestWithBody generates requests for CreateMonitoringInstance with any type of body -func NewCreateMonitoringInstanceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateDatabaseClusterRequestWithBody generates requests for UpdateDatabaseCluster with any type of body +func NewUpdateDatabaseClusterRequestWithBody(server string, namespace string, name string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/monitoring-instances") + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2838,7 +2928,7 @@ func NewCreateMonitoringInstanceRequestWithBody(server string, contentType strin return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -2848,13 +2938,20 @@ func NewCreateMonitoringInstanceRequestWithBody(server string, contentType strin return req, nil } -// NewDeleteMonitoringInstanceRequest generates requests for DeleteMonitoringInstance -func NewDeleteMonitoringInstanceRequest(server string, name string) (*http.Request, error) { +// NewListDatabaseClusterBackupsRequest generates requests for ListDatabaseClusterBackups +func NewListDatabaseClusterBackupsRequest(server string, namespace string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2864,7 +2961,7 @@ func NewDeleteMonitoringInstanceRequest(server string, name string) (*http.Reque return nil, err } - operationPath := fmt.Sprintf("/monitoring-instances/%s", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters/%s/backups", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2874,7 +2971,7 @@ func NewDeleteMonitoringInstanceRequest(server string, name string) (*http.Reque return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -2882,13 +2979,20 @@ func NewDeleteMonitoringInstanceRequest(server string, name string) (*http.Reque return req, nil } -// NewGetMonitoringInstanceRequest generates requests for GetMonitoringInstance -func NewGetMonitoringInstanceRequest(server string, name string) (*http.Request, error) { +// NewGetDatabaseClusterCredentialsRequest generates requests for GetDatabaseClusterCredentials +func NewGetDatabaseClusterCredentialsRequest(server string, namespace string, name string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2898,7 +3002,7 @@ func NewGetMonitoringInstanceRequest(server string, name string) (*http.Request, return nil, err } - operationPath := fmt.Sprintf("/monitoring-instances/%s", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters/%s/credentials", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2916,24 +3020,20 @@ func NewGetMonitoringInstanceRequest(server string, name string) (*http.Request, return req, nil } -// NewUpdateMonitoringInstanceRequest calls the generic UpdateMonitoringInstance builder with application/json body -func NewUpdateMonitoringInstanceRequest(server string, name string, body UpdateMonitoringInstanceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewGetDatabaseClusterPitrRequest generates requests for GetDatabaseClusterPitr +func NewGetDatabaseClusterPitrRequest(server string, namespace string, name string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewUpdateMonitoringInstanceRequestWithBody(server, name, "application/json", bodyReader) -} - -// NewUpdateMonitoringInstanceRequestWithBody generates requests for UpdateMonitoringInstance with any type of body -func NewUpdateMonitoringInstanceRequestWithBody(server string, name string, contentType string, body io.Reader) (*http.Request, error) { - var err error - var pathParam0 string + var pathParam1 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) if err != nil { return nil, err } @@ -2943,7 +3043,7 @@ func NewUpdateMonitoringInstanceRequestWithBody(server string, name string, cont return nil, err } - operationPath := fmt.Sprintf("/monitoring-instances/%s", pathParam0) + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters/%s/pitr", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2953,26 +3053,38 @@ func NewUpdateMonitoringInstanceRequestWithBody(server string, name string, cont return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListNamespacesRequest generates requests for ListNamespaces -func NewListNamespacesRequest(server string) (*http.Request, error) { +// NewListDatabaseClusterRestoresRequest generates requests for ListDatabaseClusterRestores +func NewListDatabaseClusterRestoresRequest(server string, namespace string, name string) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "namespace", runtime.ParamLocationPath, namespace) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/namespaces") + operationPath := fmt.Sprintf("/namespaces/%s/database-clusters/%s/restores", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3238,85 +3350,85 @@ type ClientWithResponsesInterface interface { // GetKubernetesClusterInfoWithResponse request GetKubernetesClusterInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetKubernetesClusterInfoResponse, error) + // ListMonitoringInstancesWithResponse request + ListMonitoringInstancesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListMonitoringInstancesResponse, error) + + // CreateMonitoringInstanceWithBodyWithResponse request with any body + CreateMonitoringInstanceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) + + CreateMonitoringInstanceWithResponse(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) + + // DeleteMonitoringInstanceWithResponse request + DeleteMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteMonitoringInstanceResponse, error) + + // GetMonitoringInstanceWithResponse request + GetMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetMonitoringInstanceResponse, error) + + // UpdateMonitoringInstanceWithBodyWithResponse request with any body + UpdateMonitoringInstanceWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) + + UpdateMonitoringInstanceWithResponse(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) + + // ListNamespacesWithResponse request + ListNamespacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListNamespacesResponse, error) + // CreateDatabaseClusterBackupWithBodyWithResponse request with any body - CreateDatabaseClusterBackupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) + CreateDatabaseClusterBackupWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) - CreateDatabaseClusterBackupWithResponse(ctx context.Context, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) + CreateDatabaseClusterBackupWithResponse(ctx context.Context, namespace string, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) // DeleteDatabaseClusterBackupWithResponse request - DeleteDatabaseClusterBackupWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterBackupResponse, error) + DeleteDatabaseClusterBackupWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterBackupResponse, error) // GetDatabaseClusterBackupWithResponse request - GetDatabaseClusterBackupWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterBackupResponse, error) + GetDatabaseClusterBackupWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterBackupResponse, error) // CreateDatabaseClusterRestoreWithBodyWithResponse request with any body - CreateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) + CreateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) - CreateDatabaseClusterRestoreWithResponse(ctx context.Context, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) + CreateDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) // DeleteDatabaseClusterRestoreWithResponse request - DeleteDatabaseClusterRestoreWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterRestoreResponse, error) + DeleteDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterRestoreResponse, error) // GetDatabaseClusterRestoreWithResponse request - GetDatabaseClusterRestoreWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterRestoreResponse, error) + GetDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterRestoreResponse, error) // UpdateDatabaseClusterRestoreWithBodyWithResponse request with any body - UpdateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) + UpdateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) - UpdateDatabaseClusterRestoreWithResponse(ctx context.Context, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) + UpdateDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) // ListDatabaseClustersWithResponse request - ListDatabaseClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDatabaseClustersResponse, error) + ListDatabaseClustersWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*ListDatabaseClustersResponse, error) // CreateDatabaseClusterWithBodyWithResponse request with any body - CreateDatabaseClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) + CreateDatabaseClusterWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) - CreateDatabaseClusterWithResponse(ctx context.Context, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) + CreateDatabaseClusterWithResponse(ctx context.Context, namespace string, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) // DeleteDatabaseClusterWithResponse request - DeleteDatabaseClusterWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterResponse, error) + DeleteDatabaseClusterWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterResponse, error) // GetDatabaseClusterWithResponse request - GetDatabaseClusterWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterResponse, error) + GetDatabaseClusterWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterResponse, error) // UpdateDatabaseClusterWithBodyWithResponse request with any body - UpdateDatabaseClusterWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) + UpdateDatabaseClusterWithBodyWithResponse(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) - UpdateDatabaseClusterWithResponse(ctx context.Context, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) + UpdateDatabaseClusterWithResponse(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) // ListDatabaseClusterBackupsWithResponse request - ListDatabaseClusterBackupsWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterBackupsResponse, error) + ListDatabaseClusterBackupsWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterBackupsResponse, error) // GetDatabaseClusterCredentialsWithResponse request - GetDatabaseClusterCredentialsWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterCredentialsResponse, error) + GetDatabaseClusterCredentialsWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterCredentialsResponse, error) // GetDatabaseClusterPitrWithResponse request - GetDatabaseClusterPitrWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterPitrResponse, error) + GetDatabaseClusterPitrWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterPitrResponse, error) // ListDatabaseClusterRestoresWithResponse request - ListDatabaseClusterRestoresWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterRestoresResponse, error) - - // ListMonitoringInstancesWithResponse request - ListMonitoringInstancesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListMonitoringInstancesResponse, error) - - // CreateMonitoringInstanceWithBodyWithResponse request with any body - CreateMonitoringInstanceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) - - CreateMonitoringInstanceWithResponse(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) - - // DeleteMonitoringInstanceWithResponse request - DeleteMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteMonitoringInstanceResponse, error) - - // GetMonitoringInstanceWithResponse request - GetMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetMonitoringInstanceResponse, error) - - // UpdateMonitoringInstanceWithBodyWithResponse request with any body - UpdateMonitoringInstanceWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) - - UpdateMonitoringInstanceWithResponse(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) - - // ListNamespacesWithResponse request - ListNamespacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListNamespacesResponse, error) + ListDatabaseClusterRestoresWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterRestoresResponse, error) // ListDatabaseEnginesWithResponse request ListDatabaseEnginesWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*ListDatabaseEnginesResponse, error) @@ -3479,18 +3591,16 @@ func (r GetKubernetesClusterInfoResponse) StatusCode() int { return 0 } -type CreateDatabaseClusterBackupResponse struct { +type ListMonitoringInstancesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterBackup - JSON201 *DatabaseClusterBackup - JSON202 *DatabaseClusterBackup + JSON200 *MonitoringInstancesList JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r CreateDatabaseClusterBackupResponse) Status() string { +func (r ListMonitoringInstancesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3498,23 +3608,23 @@ func (r CreateDatabaseClusterBackupResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateDatabaseClusterBackupResponse) StatusCode() int { +func (r ListMonitoringInstancesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteDatabaseClusterBackupResponse struct { +type CreateMonitoringInstanceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IoK8sApimachineryPkgApisMetaV1StatusV2 + JSON200 *MonitoringInstance JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r DeleteDatabaseClusterBackupResponse) Status() string { +func (r CreateMonitoringInstanceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3522,23 +3632,23 @@ func (r DeleteDatabaseClusterBackupResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteDatabaseClusterBackupResponse) StatusCode() int { +func (r CreateMonitoringInstanceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDatabaseClusterBackupResponse struct { +type DeleteMonitoringInstanceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterBackup JSON400 *Error + JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetDatabaseClusterBackupResponse) Status() string { +func (r DeleteMonitoringInstanceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3546,25 +3656,24 @@ func (r GetDatabaseClusterBackupResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDatabaseClusterBackupResponse) StatusCode() int { +func (r DeleteMonitoringInstanceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateDatabaseClusterRestoreResponse struct { +type GetMonitoringInstanceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterRestore - JSON201 *DatabaseClusterRestore - JSON202 *DatabaseClusterRestore + JSON200 *MonitoringInstance JSON400 *Error + JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r CreateDatabaseClusterRestoreResponse) Status() string { +func (r GetMonitoringInstanceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3572,23 +3681,24 @@ func (r CreateDatabaseClusterRestoreResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateDatabaseClusterRestoreResponse) StatusCode() int { +func (r GetMonitoringInstanceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteDatabaseClusterRestoreResponse struct { +type UpdateMonitoringInstanceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IoK8sApimachineryPkgApisMetaV1StatusV2 + JSON200 *MonitoringInstance JSON400 *Error + JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r DeleteDatabaseClusterRestoreResponse) Status() string { +func (r UpdateMonitoringInstanceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3596,23 +3706,21 @@ func (r DeleteDatabaseClusterRestoreResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteDatabaseClusterRestoreResponse) StatusCode() int { +func (r UpdateMonitoringInstanceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDatabaseClusterRestoreResponse struct { +type ListNamespacesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterRestore - JSON400 *Error - JSON500 *Error + JSON200 *NamespaceList } // Status returns HTTPResponse.Status -func (r GetDatabaseClusterRestoreResponse) Status() string { +func (r ListNamespacesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3620,24 +3728,25 @@ func (r GetDatabaseClusterRestoreResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDatabaseClusterRestoreResponse) StatusCode() int { +func (r ListNamespacesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateDatabaseClusterRestoreResponse struct { +type CreateDatabaseClusterBackupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterRestore - JSON201 *DatabaseClusterRestore + JSON200 *DatabaseClusterBackup + JSON201 *DatabaseClusterBackup + JSON202 *DatabaseClusterBackup JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r UpdateDatabaseClusterRestoreResponse) Status() string { +func (r CreateDatabaseClusterBackupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3645,23 +3754,23 @@ func (r UpdateDatabaseClusterRestoreResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateDatabaseClusterRestoreResponse) StatusCode() int { +func (r CreateDatabaseClusterBackupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListDatabaseClustersResponse struct { +type DeleteDatabaseClusterBackupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterList + JSON200 *IoK8sApimachineryPkgApisMetaV1StatusV2 JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r ListDatabaseClustersResponse) Status() string { +func (r DeleteDatabaseClusterBackupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3669,25 +3778,23 @@ func (r ListDatabaseClustersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListDatabaseClustersResponse) StatusCode() int { +func (r DeleteDatabaseClusterBackupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateDatabaseClusterResponse struct { +type GetDatabaseClusterBackupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseCluster - JSON201 *DatabaseCluster - JSON202 *DatabaseCluster + JSON200 *DatabaseClusterBackup JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r CreateDatabaseClusterResponse) Status() string { +func (r GetDatabaseClusterBackupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3695,23 +3802,25 @@ func (r CreateDatabaseClusterResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateDatabaseClusterResponse) StatusCode() int { +func (r GetDatabaseClusterBackupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteDatabaseClusterResponse struct { +type CreateDatabaseClusterRestoreResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IoK8sApimachineryPkgApisMetaV1StatusV2 + JSON200 *DatabaseClusterRestore + JSON201 *DatabaseClusterRestore + JSON202 *DatabaseClusterRestore JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r DeleteDatabaseClusterResponse) Status() string { +func (r CreateDatabaseClusterRestoreResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3719,23 +3828,23 @@ func (r DeleteDatabaseClusterResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteDatabaseClusterResponse) StatusCode() int { +func (r CreateDatabaseClusterRestoreResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDatabaseClusterResponse struct { +type DeleteDatabaseClusterRestoreResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseCluster + JSON200 *IoK8sApimachineryPkgApisMetaV1StatusV2 JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetDatabaseClusterResponse) Status() string { +func (r DeleteDatabaseClusterRestoreResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3743,23 +3852,23 @@ func (r GetDatabaseClusterResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDatabaseClusterResponse) StatusCode() int { +func (r DeleteDatabaseClusterRestoreResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateDatabaseClusterResponse struct { +type GetDatabaseClusterRestoreResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseCluster + JSON200 *DatabaseClusterRestore JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r UpdateDatabaseClusterResponse) Status() string { +func (r GetDatabaseClusterRestoreResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3767,23 +3876,24 @@ func (r UpdateDatabaseClusterResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateDatabaseClusterResponse) StatusCode() int { +func (r GetDatabaseClusterRestoreResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListDatabaseClusterBackupsResponse struct { +type UpdateDatabaseClusterRestoreResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterBackupList + JSON200 *DatabaseClusterRestore + JSON201 *DatabaseClusterRestore JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r ListDatabaseClusterBackupsResponse) Status() string { +func (r UpdateDatabaseClusterRestoreResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3791,23 +3901,23 @@ func (r ListDatabaseClusterBackupsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListDatabaseClusterBackupsResponse) StatusCode() int { +func (r UpdateDatabaseClusterRestoreResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDatabaseClusterCredentialsResponse struct { +type ListDatabaseClustersResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterCredential + JSON200 *DatabaseClusterList JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetDatabaseClusterCredentialsResponse) Status() string { +func (r ListDatabaseClustersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3815,23 +3925,25 @@ func (r GetDatabaseClusterCredentialsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDatabaseClusterCredentialsResponse) StatusCode() int { +func (r ListDatabaseClustersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDatabaseClusterPitrResponse struct { +type CreateDatabaseClusterResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterPitr + JSON200 *DatabaseCluster + JSON201 *DatabaseCluster + JSON202 *DatabaseCluster JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetDatabaseClusterPitrResponse) Status() string { +func (r CreateDatabaseClusterResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3839,23 +3951,23 @@ func (r GetDatabaseClusterPitrResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDatabaseClusterPitrResponse) StatusCode() int { +func (r CreateDatabaseClusterResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListDatabaseClusterRestoresResponse struct { +type DeleteDatabaseClusterResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DatabaseClusterRestoreList + JSON200 *IoK8sApimachineryPkgApisMetaV1StatusV2 JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r ListDatabaseClusterRestoresResponse) Status() string { +func (r DeleteDatabaseClusterResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3863,23 +3975,23 @@ func (r ListDatabaseClusterRestoresResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListDatabaseClusterRestoresResponse) StatusCode() int { +func (r DeleteDatabaseClusterResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListMonitoringInstancesResponse struct { +type GetDatabaseClusterResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonitoringInstancesList + JSON200 *DatabaseCluster JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r ListMonitoringInstancesResponse) Status() string { +func (r GetDatabaseClusterResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3887,23 +3999,23 @@ func (r ListMonitoringInstancesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListMonitoringInstancesResponse) StatusCode() int { +func (r GetDatabaseClusterResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateMonitoringInstanceResponse struct { +type UpdateDatabaseClusterResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonitoringInstance + JSON200 *DatabaseCluster JSON400 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r CreateMonitoringInstanceResponse) Status() string { +func (r UpdateDatabaseClusterResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3911,23 +4023,23 @@ func (r CreateMonitoringInstanceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateMonitoringInstanceResponse) StatusCode() int { +func (r UpdateDatabaseClusterResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteMonitoringInstanceResponse struct { +type ListDatabaseClusterBackupsResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *DatabaseClusterBackupList JSON400 *Error - JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r DeleteMonitoringInstanceResponse) Status() string { +func (r ListDatabaseClusterBackupsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3935,24 +4047,23 @@ func (r DeleteMonitoringInstanceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteMonitoringInstanceResponse) StatusCode() int { +func (r ListDatabaseClusterBackupsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMonitoringInstanceResponse struct { +type GetDatabaseClusterCredentialsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonitoringInstance + JSON200 *DatabaseClusterCredential JSON400 *Error - JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetMonitoringInstanceResponse) Status() string { +func (r GetDatabaseClusterCredentialsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3960,24 +4071,23 @@ func (r GetMonitoringInstanceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMonitoringInstanceResponse) StatusCode() int { +func (r GetDatabaseClusterCredentialsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateMonitoringInstanceResponse struct { +type GetDatabaseClusterPitrResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonitoringInstance + JSON200 *DatabaseClusterPitr JSON400 *Error - JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r UpdateMonitoringInstanceResponse) Status() string { +func (r GetDatabaseClusterPitrResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3985,21 +4095,23 @@ func (r UpdateMonitoringInstanceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateMonitoringInstanceResponse) StatusCode() int { +func (r GetDatabaseClusterPitrResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListNamespacesResponse struct { +type ListDatabaseClusterRestoresResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *NamespaceList + JSON200 *DatabaseClusterRestoreList + JSON400 *Error + JSON500 *Error } // Status returns HTTPResponse.Status -func (r ListNamespacesResponse) Status() string { +func (r ListDatabaseClusterRestoresResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4007,7 +4119,7 @@ func (r ListNamespacesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListNamespacesResponse) StatusCode() int { +func (r ListDatabaseClusterRestoresResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -4202,258 +4314,258 @@ func (c *ClientWithResponses) GetKubernetesClusterInfoWithResponse(ctx context.C return ParseGetKubernetesClusterInfoResponse(rsp) } -// CreateDatabaseClusterBackupWithBodyWithResponse request with arbitrary body returning *CreateDatabaseClusterBackupResponse -func (c *ClientWithResponses) CreateDatabaseClusterBackupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) { - rsp, err := c.CreateDatabaseClusterBackupWithBody(ctx, contentType, body, reqEditors...) +// ListMonitoringInstancesWithResponse request returning *ListMonitoringInstancesResponse +func (c *ClientWithResponses) ListMonitoringInstancesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListMonitoringInstancesResponse, error) { + rsp, err := c.ListMonitoringInstances(ctx, reqEditors...) if err != nil { return nil, err } - return ParseCreateDatabaseClusterBackupResponse(rsp) + return ParseListMonitoringInstancesResponse(rsp) } -func (c *ClientWithResponses) CreateDatabaseClusterBackupWithResponse(ctx context.Context, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) { - rsp, err := c.CreateDatabaseClusterBackup(ctx, body, reqEditors...) +// CreateMonitoringInstanceWithBodyWithResponse request with arbitrary body returning *CreateMonitoringInstanceResponse +func (c *ClientWithResponses) CreateMonitoringInstanceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) { + rsp, err := c.CreateMonitoringInstanceWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateDatabaseClusterBackupResponse(rsp) + return ParseCreateMonitoringInstanceResponse(rsp) } -// DeleteDatabaseClusterBackupWithResponse request returning *DeleteDatabaseClusterBackupResponse -func (c *ClientWithResponses) DeleteDatabaseClusterBackupWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterBackupResponse, error) { - rsp, err := c.DeleteDatabaseClusterBackup(ctx, name, reqEditors...) +func (c *ClientWithResponses) CreateMonitoringInstanceWithResponse(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) { + rsp, err := c.CreateMonitoringInstance(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteDatabaseClusterBackupResponse(rsp) + return ParseCreateMonitoringInstanceResponse(rsp) } -// GetDatabaseClusterBackupWithResponse request returning *GetDatabaseClusterBackupResponse -func (c *ClientWithResponses) GetDatabaseClusterBackupWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterBackupResponse, error) { - rsp, err := c.GetDatabaseClusterBackup(ctx, name, reqEditors...) +// DeleteMonitoringInstanceWithResponse request returning *DeleteMonitoringInstanceResponse +func (c *ClientWithResponses) DeleteMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteMonitoringInstanceResponse, error) { + rsp, err := c.DeleteMonitoringInstance(ctx, name, reqEditors...) if err != nil { return nil, err } - return ParseGetDatabaseClusterBackupResponse(rsp) + return ParseDeleteMonitoringInstanceResponse(rsp) } -// CreateDatabaseClusterRestoreWithBodyWithResponse request with arbitrary body returning *CreateDatabaseClusterRestoreResponse -func (c *ClientWithResponses) CreateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) { - rsp, err := c.CreateDatabaseClusterRestoreWithBody(ctx, contentType, body, reqEditors...) +// GetMonitoringInstanceWithResponse request returning *GetMonitoringInstanceResponse +func (c *ClientWithResponses) GetMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetMonitoringInstanceResponse, error) { + rsp, err := c.GetMonitoringInstance(ctx, name, reqEditors...) if err != nil { return nil, err } - return ParseCreateDatabaseClusterRestoreResponse(rsp) + return ParseGetMonitoringInstanceResponse(rsp) } -func (c *ClientWithResponses) CreateDatabaseClusterRestoreWithResponse(ctx context.Context, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) { - rsp, err := c.CreateDatabaseClusterRestore(ctx, body, reqEditors...) +// UpdateMonitoringInstanceWithBodyWithResponse request with arbitrary body returning *UpdateMonitoringInstanceResponse +func (c *ClientWithResponses) UpdateMonitoringInstanceWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) { + rsp, err := c.UpdateMonitoringInstanceWithBody(ctx, name, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateDatabaseClusterRestoreResponse(rsp) + return ParseUpdateMonitoringInstanceResponse(rsp) } -// DeleteDatabaseClusterRestoreWithResponse request returning *DeleteDatabaseClusterRestoreResponse -func (c *ClientWithResponses) DeleteDatabaseClusterRestoreWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterRestoreResponse, error) { - rsp, err := c.DeleteDatabaseClusterRestore(ctx, name, reqEditors...) +func (c *ClientWithResponses) UpdateMonitoringInstanceWithResponse(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) { + rsp, err := c.UpdateMonitoringInstance(ctx, name, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteDatabaseClusterRestoreResponse(rsp) + return ParseUpdateMonitoringInstanceResponse(rsp) } -// GetDatabaseClusterRestoreWithResponse request returning *GetDatabaseClusterRestoreResponse -func (c *ClientWithResponses) GetDatabaseClusterRestoreWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterRestoreResponse, error) { - rsp, err := c.GetDatabaseClusterRestore(ctx, name, reqEditors...) +// ListNamespacesWithResponse request returning *ListNamespacesResponse +func (c *ClientWithResponses) ListNamespacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListNamespacesResponse, error) { + rsp, err := c.ListNamespaces(ctx, reqEditors...) if err != nil { return nil, err } - return ParseGetDatabaseClusterRestoreResponse(rsp) + return ParseListNamespacesResponse(rsp) } -// UpdateDatabaseClusterRestoreWithBodyWithResponse request with arbitrary body returning *UpdateDatabaseClusterRestoreResponse -func (c *ClientWithResponses) UpdateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) { - rsp, err := c.UpdateDatabaseClusterRestoreWithBody(ctx, name, contentType, body, reqEditors...) +// CreateDatabaseClusterBackupWithBodyWithResponse request with arbitrary body returning *CreateDatabaseClusterBackupResponse +func (c *ClientWithResponses) CreateDatabaseClusterBackupWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) { + rsp, err := c.CreateDatabaseClusterBackupWithBody(ctx, namespace, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDatabaseClusterRestoreResponse(rsp) + return ParseCreateDatabaseClusterBackupResponse(rsp) } -func (c *ClientWithResponses) UpdateDatabaseClusterRestoreWithResponse(ctx context.Context, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) { - rsp, err := c.UpdateDatabaseClusterRestore(ctx, name, body, reqEditors...) +func (c *ClientWithResponses) CreateDatabaseClusterBackupWithResponse(ctx context.Context, namespace string, body CreateDatabaseClusterBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterBackupResponse, error) { + rsp, err := c.CreateDatabaseClusterBackup(ctx, namespace, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDatabaseClusterRestoreResponse(rsp) + return ParseCreateDatabaseClusterBackupResponse(rsp) } -// ListDatabaseClustersWithResponse request returning *ListDatabaseClustersResponse -func (c *ClientWithResponses) ListDatabaseClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDatabaseClustersResponse, error) { - rsp, err := c.ListDatabaseClusters(ctx, reqEditors...) +// DeleteDatabaseClusterBackupWithResponse request returning *DeleteDatabaseClusterBackupResponse +func (c *ClientWithResponses) DeleteDatabaseClusterBackupWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterBackupResponse, error) { + rsp, err := c.DeleteDatabaseClusterBackup(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseListDatabaseClustersResponse(rsp) + return ParseDeleteDatabaseClusterBackupResponse(rsp) } -// CreateDatabaseClusterWithBodyWithResponse request with arbitrary body returning *CreateDatabaseClusterResponse -func (c *ClientWithResponses) CreateDatabaseClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) { - rsp, err := c.CreateDatabaseClusterWithBody(ctx, contentType, body, reqEditors...) +// GetDatabaseClusterBackupWithResponse request returning *GetDatabaseClusterBackupResponse +func (c *ClientWithResponses) GetDatabaseClusterBackupWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterBackupResponse, error) { + rsp, err := c.GetDatabaseClusterBackup(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseCreateDatabaseClusterResponse(rsp) + return ParseGetDatabaseClusterBackupResponse(rsp) } -func (c *ClientWithResponses) CreateDatabaseClusterWithResponse(ctx context.Context, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) { - rsp, err := c.CreateDatabaseCluster(ctx, body, reqEditors...) +// CreateDatabaseClusterRestoreWithBodyWithResponse request with arbitrary body returning *CreateDatabaseClusterRestoreResponse +func (c *ClientWithResponses) CreateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) { + rsp, err := c.CreateDatabaseClusterRestoreWithBody(ctx, namespace, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateDatabaseClusterResponse(rsp) + return ParseCreateDatabaseClusterRestoreResponse(rsp) } -// DeleteDatabaseClusterWithResponse request returning *DeleteDatabaseClusterResponse -func (c *ClientWithResponses) DeleteDatabaseClusterWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterResponse, error) { - rsp, err := c.DeleteDatabaseCluster(ctx, name, reqEditors...) +func (c *ClientWithResponses) CreateDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, body CreateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterRestoreResponse, error) { + rsp, err := c.CreateDatabaseClusterRestore(ctx, namespace, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteDatabaseClusterResponse(rsp) + return ParseCreateDatabaseClusterRestoreResponse(rsp) } -// GetDatabaseClusterWithResponse request returning *GetDatabaseClusterResponse -func (c *ClientWithResponses) GetDatabaseClusterWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterResponse, error) { - rsp, err := c.GetDatabaseCluster(ctx, name, reqEditors...) +// DeleteDatabaseClusterRestoreWithResponse request returning *DeleteDatabaseClusterRestoreResponse +func (c *ClientWithResponses) DeleteDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterRestoreResponse, error) { + rsp, err := c.DeleteDatabaseClusterRestore(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseGetDatabaseClusterResponse(rsp) + return ParseDeleteDatabaseClusterRestoreResponse(rsp) } -// UpdateDatabaseClusterWithBodyWithResponse request with arbitrary body returning *UpdateDatabaseClusterResponse -func (c *ClientWithResponses) UpdateDatabaseClusterWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) { - rsp, err := c.UpdateDatabaseClusterWithBody(ctx, name, contentType, body, reqEditors...) +// GetDatabaseClusterRestoreWithResponse request returning *GetDatabaseClusterRestoreResponse +func (c *ClientWithResponses) GetDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterRestoreResponse, error) { + rsp, err := c.GetDatabaseClusterRestore(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDatabaseClusterResponse(rsp) + return ParseGetDatabaseClusterRestoreResponse(rsp) } -func (c *ClientWithResponses) UpdateDatabaseClusterWithResponse(ctx context.Context, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) { - rsp, err := c.UpdateDatabaseCluster(ctx, name, body, reqEditors...) +// UpdateDatabaseClusterRestoreWithBodyWithResponse request with arbitrary body returning *UpdateDatabaseClusterRestoreResponse +func (c *ClientWithResponses) UpdateDatabaseClusterRestoreWithBodyWithResponse(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) { + rsp, err := c.UpdateDatabaseClusterRestoreWithBody(ctx, namespace, name, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDatabaseClusterResponse(rsp) + return ParseUpdateDatabaseClusterRestoreResponse(rsp) } -// ListDatabaseClusterBackupsWithResponse request returning *ListDatabaseClusterBackupsResponse -func (c *ClientWithResponses) ListDatabaseClusterBackupsWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterBackupsResponse, error) { - rsp, err := c.ListDatabaseClusterBackups(ctx, name, reqEditors...) +func (c *ClientWithResponses) UpdateDatabaseClusterRestoreWithResponse(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterRestoreResponse, error) { + rsp, err := c.UpdateDatabaseClusterRestore(ctx, namespace, name, body, reqEditors...) if err != nil { return nil, err } - return ParseListDatabaseClusterBackupsResponse(rsp) + return ParseUpdateDatabaseClusterRestoreResponse(rsp) } -// GetDatabaseClusterCredentialsWithResponse request returning *GetDatabaseClusterCredentialsResponse -func (c *ClientWithResponses) GetDatabaseClusterCredentialsWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterCredentialsResponse, error) { - rsp, err := c.GetDatabaseClusterCredentials(ctx, name, reqEditors...) +// ListDatabaseClustersWithResponse request returning *ListDatabaseClustersResponse +func (c *ClientWithResponses) ListDatabaseClustersWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*ListDatabaseClustersResponse, error) { + rsp, err := c.ListDatabaseClusters(ctx, namespace, reqEditors...) if err != nil { return nil, err } - return ParseGetDatabaseClusterCredentialsResponse(rsp) + return ParseListDatabaseClustersResponse(rsp) } -// GetDatabaseClusterPitrWithResponse request returning *GetDatabaseClusterPitrResponse -func (c *ClientWithResponses) GetDatabaseClusterPitrWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterPitrResponse, error) { - rsp, err := c.GetDatabaseClusterPitr(ctx, name, reqEditors...) +// CreateDatabaseClusterWithBodyWithResponse request with arbitrary body returning *CreateDatabaseClusterResponse +func (c *ClientWithResponses) CreateDatabaseClusterWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) { + rsp, err := c.CreateDatabaseClusterWithBody(ctx, namespace, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetDatabaseClusterPitrResponse(rsp) + return ParseCreateDatabaseClusterResponse(rsp) } -// ListDatabaseClusterRestoresWithResponse request returning *ListDatabaseClusterRestoresResponse -func (c *ClientWithResponses) ListDatabaseClusterRestoresWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterRestoresResponse, error) { - rsp, err := c.ListDatabaseClusterRestores(ctx, name, reqEditors...) +func (c *ClientWithResponses) CreateDatabaseClusterWithResponse(ctx context.Context, namespace string, body CreateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseClusterResponse, error) { + rsp, err := c.CreateDatabaseCluster(ctx, namespace, body, reqEditors...) if err != nil { return nil, err } - return ParseListDatabaseClusterRestoresResponse(rsp) + return ParseCreateDatabaseClusterResponse(rsp) } -// ListMonitoringInstancesWithResponse request returning *ListMonitoringInstancesResponse -func (c *ClientWithResponses) ListMonitoringInstancesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListMonitoringInstancesResponse, error) { - rsp, err := c.ListMonitoringInstances(ctx, reqEditors...) +// DeleteDatabaseClusterWithResponse request returning *DeleteDatabaseClusterResponse +func (c *ClientWithResponses) DeleteDatabaseClusterWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*DeleteDatabaseClusterResponse, error) { + rsp, err := c.DeleteDatabaseCluster(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseListMonitoringInstancesResponse(rsp) + return ParseDeleteDatabaseClusterResponse(rsp) } -// CreateMonitoringInstanceWithBodyWithResponse request with arbitrary body returning *CreateMonitoringInstanceResponse -func (c *ClientWithResponses) CreateMonitoringInstanceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) { - rsp, err := c.CreateMonitoringInstanceWithBody(ctx, contentType, body, reqEditors...) +// GetDatabaseClusterWithResponse request returning *GetDatabaseClusterResponse +func (c *ClientWithResponses) GetDatabaseClusterWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterResponse, error) { + rsp, err := c.GetDatabaseCluster(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseCreateMonitoringInstanceResponse(rsp) + return ParseGetDatabaseClusterResponse(rsp) } -func (c *ClientWithResponses) CreateMonitoringInstanceWithResponse(ctx context.Context, body CreateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonitoringInstanceResponse, error) { - rsp, err := c.CreateMonitoringInstance(ctx, body, reqEditors...) +// UpdateDatabaseClusterWithBodyWithResponse request with arbitrary body returning *UpdateDatabaseClusterResponse +func (c *ClientWithResponses) UpdateDatabaseClusterWithBodyWithResponse(ctx context.Context, namespace string, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) { + rsp, err := c.UpdateDatabaseClusterWithBody(ctx, namespace, name, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateMonitoringInstanceResponse(rsp) + return ParseUpdateDatabaseClusterResponse(rsp) } -// DeleteMonitoringInstanceWithResponse request returning *DeleteMonitoringInstanceResponse -func (c *ClientWithResponses) DeleteMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteMonitoringInstanceResponse, error) { - rsp, err := c.DeleteMonitoringInstance(ctx, name, reqEditors...) +func (c *ClientWithResponses) UpdateDatabaseClusterWithResponse(ctx context.Context, namespace string, name string, body UpdateDatabaseClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseClusterResponse, error) { + rsp, err := c.UpdateDatabaseCluster(ctx, namespace, name, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteMonitoringInstanceResponse(rsp) + return ParseUpdateDatabaseClusterResponse(rsp) } -// GetMonitoringInstanceWithResponse request returning *GetMonitoringInstanceResponse -func (c *ClientWithResponses) GetMonitoringInstanceWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetMonitoringInstanceResponse, error) { - rsp, err := c.GetMonitoringInstance(ctx, name, reqEditors...) +// ListDatabaseClusterBackupsWithResponse request returning *ListDatabaseClusterBackupsResponse +func (c *ClientWithResponses) ListDatabaseClusterBackupsWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterBackupsResponse, error) { + rsp, err := c.ListDatabaseClusterBackups(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseGetMonitoringInstanceResponse(rsp) + return ParseListDatabaseClusterBackupsResponse(rsp) } -// UpdateMonitoringInstanceWithBodyWithResponse request with arbitrary body returning *UpdateMonitoringInstanceResponse -func (c *ClientWithResponses) UpdateMonitoringInstanceWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) { - rsp, err := c.UpdateMonitoringInstanceWithBody(ctx, name, contentType, body, reqEditors...) +// GetDatabaseClusterCredentialsWithResponse request returning *GetDatabaseClusterCredentialsResponse +func (c *ClientWithResponses) GetDatabaseClusterCredentialsWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterCredentialsResponse, error) { + rsp, err := c.GetDatabaseClusterCredentials(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseUpdateMonitoringInstanceResponse(rsp) + return ParseGetDatabaseClusterCredentialsResponse(rsp) } -func (c *ClientWithResponses) UpdateMonitoringInstanceWithResponse(ctx context.Context, name string, body UpdateMonitoringInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonitoringInstanceResponse, error) { - rsp, err := c.UpdateMonitoringInstance(ctx, name, body, reqEditors...) +// GetDatabaseClusterPitrWithResponse request returning *GetDatabaseClusterPitrResponse +func (c *ClientWithResponses) GetDatabaseClusterPitrWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*GetDatabaseClusterPitrResponse, error) { + rsp, err := c.GetDatabaseClusterPitr(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseUpdateMonitoringInstanceResponse(rsp) + return ParseGetDatabaseClusterPitrResponse(rsp) } -// ListNamespacesWithResponse request returning *ListNamespacesResponse -func (c *ClientWithResponses) ListNamespacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListNamespacesResponse, error) { - rsp, err := c.ListNamespaces(ctx, reqEditors...) +// ListDatabaseClusterRestoresWithResponse request returning *ListDatabaseClusterRestoresResponse +func (c *ClientWithResponses) ListDatabaseClusterRestoresWithResponse(ctx context.Context, namespace string, name string, reqEditors ...RequestEditorFn) (*ListDatabaseClusterRestoresResponse, error) { + rsp, err := c.ListDatabaseClusterRestores(ctx, namespace, name, reqEditors...) if err != nil { return nil, err } - return ParseListNamespacesResponse(rsp) + return ParseListDatabaseClusterRestoresResponse(rsp) } // ListDatabaseEnginesWithResponse request returning *ListDatabaseEnginesResponse @@ -4717,26 +4829,265 @@ func ParseGetKubernetesClusterInfoResponse(rsp *http.Response) (*GetKubernetesCl switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest KubernetesClusterInfo + var dest KubernetesClusterInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListMonitoringInstancesResponse parses an HTTP response from a ListMonitoringInstancesWithResponse call +func ParseListMonitoringInstancesResponse(rsp *http.Response) (*ListMonitoringInstancesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListMonitoringInstancesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MonitoringInstancesList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateMonitoringInstanceResponse parses an HTTP response from a CreateMonitoringInstanceWithResponse call +func ParseCreateMonitoringInstanceResponse(rsp *http.Response) (*CreateMonitoringInstanceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateMonitoringInstanceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MonitoringInstance + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteMonitoringInstanceResponse parses an HTTP response from a DeleteMonitoringInstanceWithResponse call +func ParseDeleteMonitoringInstanceResponse(rsp *http.Response) (*DeleteMonitoringInstanceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteMonitoringInstanceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetMonitoringInstanceResponse parses an HTTP response from a GetMonitoringInstanceWithResponse call +func ParseGetMonitoringInstanceResponse(rsp *http.Response) (*GetMonitoringInstanceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetMonitoringInstanceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MonitoringInstance + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateMonitoringInstanceResponse parses an HTTP response from a UpdateMonitoringInstanceWithResponse call +func ParseUpdateMonitoringInstanceResponse(rsp *http.Response) (*UpdateMonitoringInstanceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateMonitoringInstanceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MonitoringInstance + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListNamespacesResponse parses an HTTP response from a ListNamespacesWithResponse call +func ParseListNamespacesResponse(rsp *http.Response) (*ListNamespacesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListNamespacesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest NamespaceList if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - } return response, nil @@ -5431,245 +5782,6 @@ func ParseListDatabaseClusterRestoresResponse(rsp *http.Response) (*ListDatabase return response, nil } -// ParseListMonitoringInstancesResponse parses an HTTP response from a ListMonitoringInstancesWithResponse call -func ParseListMonitoringInstancesResponse(rsp *http.Response) (*ListMonitoringInstancesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListMonitoringInstancesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonitoringInstancesList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateMonitoringInstanceResponse parses an HTTP response from a CreateMonitoringInstanceWithResponse call -func ParseCreateMonitoringInstanceResponse(rsp *http.Response) (*CreateMonitoringInstanceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateMonitoringInstanceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonitoringInstance - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeleteMonitoringInstanceResponse parses an HTTP response from a DeleteMonitoringInstanceWithResponse call -func ParseDeleteMonitoringInstanceResponse(rsp *http.Response) (*DeleteMonitoringInstanceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteMonitoringInstanceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetMonitoringInstanceResponse parses an HTTP response from a GetMonitoringInstanceWithResponse call -func ParseGetMonitoringInstanceResponse(rsp *http.Response) (*GetMonitoringInstanceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetMonitoringInstanceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonitoringInstance - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateMonitoringInstanceResponse parses an HTTP response from a UpdateMonitoringInstanceWithResponse call -func ParseUpdateMonitoringInstanceResponse(rsp *http.Response) (*UpdateMonitoringInstanceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateMonitoringInstanceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonitoringInstance - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListNamespacesResponse parses an HTTP response from a ListNamespacesWithResponse call -func ParseListNamespacesResponse(rsp *http.Response) (*ListNamespacesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListNamespacesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest NamespaceList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - } - - return response, nil -} - // ParseListDatabaseEnginesResponse parses an HTTP response from a ListDatabaseEnginesWithResponse call func ParseListDatabaseEnginesResponse(rsp *http.Response) (*ListDatabaseEnginesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -5857,139 +5969,139 @@ func ParseVersionInfoResponse(rsp *http.Response) (*VersionInfoResponse, error) // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+x9bXPbNtboX8Gwz0yTrkTbSbuz6y87juNtfVu3HtvZO3fj3AYiIQlrEmABULaS5r8/", - "gwOAr6BESbbjbPglsUgQL+f9HBwcfAwinmacEaZkcPgxkNGcpBj+fIWjmzy7VFzgGdEPcBxTRTnDybng", - "GRGKEhkcTnEiySiIiYwEzfT74NB+i6T5GFE25SLF8HIUZJWvPwaTPLoh6lecwhhqmZHgMJBKUDYLPjX6", - "9bxnXR8KMvN+MwruxjM+1g/H8oZmY56ZRY0zTpkiIjhUIiefRoHCYmZmJjMcmdnWl/kLlQrxKWJFG4ST", - "hN+SGCmOckmQmlOJJjVoBKOAKpJK76ztAywEXpa/PwaE5Wlw+DaQL4NRgD/kggTvRu3Pc5F4ugVo/JFT", - "QWLdB4BsVAW87cmz5HIQPvkPiZQepEYYUsNAj1ms6X8EmQaHwTd7JWXtWbLaq9OUZ73HgmBFas3OscCm", - "5+0JMNN9EEWEbNEfjiIi5c9k6cVHnTrrY1zNCYoSnsfFMKb1XsSZwpQRgVgFuttQdX3AI01SAsVkShnR", - "o+rmMIYmQjUnFYaDn69/vTSvDfuhuVKZPNzbu8knRDCiiAwp34t5JPWcI5IpuccXRCwoud275eKGstn4", - "lqr52GBf7gGl730TMzlO8IQkY3gQjAJyh9MsAVzeynFMFr5l786TkkSCqC5sfU0cW9JtFSqbcfJrrPAE", - "S3Kc5BKg3ARXowGiEujqEthZUxX8jG2ryLSS6Oj8NGwzWkb/RYS0BNCg7PNT+85StxlnYZ5pWjcjAplT", - "iQTJBJGEKdAp+jFmyKwrRJdE6A+RnPM8iVHE2YIIhQSJ+IzRD0VvUqNcD5NgRaRCQGkMJ2iBk5yMEGYx", - "SvESCaL7RTmr9ABNZIjOuDDq7bBgrhlV4c3fgLMinqY5o2oJIkHQSa64kHsxWZBkT9LZGItoThWJVC7I", - "Hs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/ct6n2DGc0OAxehvvhC1vLAqhoz2zzju02LzybEdW9a2xuIzZh1PoWsUZsQXinsf2mtpMvIdHF", - "+LIw1Iv9fbeDR8z+CVwkYlC79x/L43Zta4RIfSTIPAA6aupB4IJpnpRcomH0/T3OxGQhewZ/w2TH8D88", - "xvCnzpKxAQhiG44CmacpFsveeFZ4Jlt1UiAlKeO+wxEmR8ve51zvztlnmqG++87F5L77DqJy79+/1/99", - "1P+UMTotzeRLR7PXwci91lLEva48LnM4zEvz+6DSosgBMQ3Mz99v9O+iTZF3YUeAn402Jm3DNCD5OCJM", - "CZyMD64D3eJTsaTVa8MfckFWLg9arFhhkYCyYpG2/99xBEHl3834nctttC7XXa6qJQAM2muMGRTXbr3i", - "poT+vdC8ZySbNuThg6tKvaMaEdotBVfwuJqQYbM8Hkd6DYJrc8G1XsSskFufRi1NuPdRM8QnI8sS4i2F", - "BM+NinYRk3beVJ0lzDdNlqikpx2+9V7CaEVyOysLSjFiNXd5oYfugv867Y4qOGiaX+9adP29z4Ec6G8V", - "/fUjhm7F6bW6fiRqM/L6kainTluDzHwyNNuDvFZYelhF3kp8QlGcuPxjFzboGCFEJuHXVuWoNzX7UWGL", - "yD05wk+Dzu/frulOh+5n1wBQZIh+64JusSvoQlWD1fMlcfBm3LbGArJnM8cu8rJSJbmDnLAfDJu/1Xv9", - "zRXdGLVPfvpUlv9I7QPSnX/Agf621iA7UIOjyJu/SUuHrgbC2BGkrQcLh5hWxxc6rhvp8Ez9d148jCTv", - "uF/DL8U7lvH53dTeq+hinBf7B48/GXdRkWUnM48Xjz+PI1sTd5AgHr+9m3WdhIi9cF4tM7Z149fID/NN", - "l/zobYp2rBm2EDWLT3nOYpsbdWY30966UOG7omi09+ZEG1f9Avy4DdMSBjV9P8GJjfmsI0hxAbkEcjMG", - "+pGogXuehkoemMQwSU863kobuTre25iw9tt+NuxF0fgRjNii6nVPK9ZdZPDUzNgV6/gMduyK2TyuIbti", - "IoMlu4klW3Jwh/BwkF4jPXY1ZrskideaLSXJ9grZXXSxk0a+qEmNwaAdeK03ma9lt61M2i42atu0Aw99", - "RhU98Eofu3YjZslyL7NkCY421TlmZ+sr5Jcvwyq324GDVb65VT7Nk0H8VMVPP/GwlWm8WcJy615ob8py", - "A/EPmrTsuxZ7UHH3krXsQ3YHjfXJXG521y8c8zhxmN6i/qkFXp6IbO8n1JPlA8dbhkDLjoGWlRzuVR/b", - "RlTWSgNvSGUXu3Y3e3YIngz8szp4shEv9U5XXssn7ZjJwCQPq0cHLuhKft6QBTYIhqxlA2805L+LE56o", - "FfwEAh0D995XVOHeDMK9Ssrp1uEF5DrpEWV4VTQdlN9WGS9D6OThQicVQt4m+6VgqkgQqFuEE7n2fEE3", - "U6NqN+vtyeNa64G7NuSuEnwDdz2Ekdmg5i3VVUaVWMtS55wyNaZsfEVTggRJCmYvr9HexXM715MYWGxj", - "FgO4Dcy1NXPtStdb8lw1p3N7G7HopYeReFG2HZhsu/3bwUx8QDOxQsu9dnPLewfH7t6qzbjJc3Ghn5E8", - "91495LZu1zVbA+HdC+F1oN3RXOpBdvcO75Gvu7I+JIgyid5r0fW+vDcjvGavsCSxK+zu3pt6sBmJFF0Q", - "dEOWppRc/dIcRkgsa31d5tEcYTlCdGq6OkRZmr63V5m8139DZ9UvbUHq2BWrq40RdpZj8lzh9jDhuTVX", - "NXZE6866kfH5tq19194NrLxTiaZuplvLyV2qY9vN3DPv9be+/Vwv7/Q2xTqu2f3KKzh9b+b6sMP7pArj", - "yhjBT39z1k+h6/Rdz/ha2oP8fyRqN9o/e0TaH+T+wFh9QnHpVlzVUffK7OBuoVnMh09aszyGbVi7WLnD", - "NkzX2YafpYjVICT+e4TEBly83kZltVuYO7UxTpLqZcwpZnhmaojb4t7eiEbtRvgHo+36Td69yboleNev", - "sQExY8vD35/KECxhM8p6xIjKW2+LGJX7dFWY9aRo01vyFrPslrfu9dMKi5q1DlGp3aNSK4mtGQc1YG8J", - "iJXkXvFrN90yNz2s2rs7cS0+L8mPeu1hFMv5UjYfLHQHDrvPnfOCCjqZqyM506vd1/FKPTXzK2eXh0vi", - "7OaUp53DOXD4vdraGzC51qDlTWhr69XiDEdULaE6aamyiw52qld7UbmQ7fGK1pajDtS3feXa7emiXbl2", - "Ud5k2EmM7samVzi6ISwubr+npuZxndjs9YcPXQ/Z3cC4vYO3clXQrcGF0Za5SILDYG9xEGi1YuHYBJbu", - "cqnm2u12OT32QqzKdfKVQ9pWsWlstPVjd2dOkHu6aiYEbdVt6VQ2enWaY4e5okpGkH/ORdmCXUYpk9P9", - "g7iagxuM8apZmNz2XK9L/undp/8NAAD//x3W6+QZ9AAA", + "H4sIAAAAAAAC/+x9+3PbNvbvv4JRvzNNuhJtJ+3Orn/ZsR1v69u69djO3rkb5zYQCUlYkwALgLKVNP/7", + "d3AA8AlK1MOOveEvbSyCeByc5wcHh58GIU9SzghTcnD4aSDDGUkw/PMYh7dZeqW4wFOif8BRRBXlDMcX", + "gqdEKErk4HCCY0mGg4jIUNBUPx8c2neRNC8jyiZcJBgeDgdp6e1Pg3EW3hL1K05gDLVIyeBwIJWgbDr4", + "XOvX85y1vSjI1PvOcHA/mvKR/nEkb2k64qlZ1CjllCkiBodKZOTzcKCwmJqZyRSHZrbVZf5CpUJ8glje", + "BuE45nckQoqjTBKkZlSicYUag+GAKpJI76ztD1gIvCj+/jQgLEsGh+8G8vVgOMAfM0EG74fN1zMRe7oF", + "avyRUUEi3QeQbFgmvO3Js+RiED7+DwmVHqTCGFLTQI+Zr+l/BJkMDgff7BWctWfZaq/KU571ngiCFak0", + "u8ACm543Z8BU90EUEbLBfzgMiZQ/k4V3P6rcWR3jekZQGPMsyocxrfdCzhSmjAjEStTdhKurAx5plhIo", + "IhPKiB5VN4cxNBOqGSkJHPz55tcr89iIH5oplcrDvb3bbEwEI4rIgPK9iIdSzzkkqZJ7fE7EnJK7vTsu", + "bimbju6omo3M7ss94PS9byImRzEek3gEPwyGA3KPkzSGvbyTo4jMfcveXiYlCQVRbbv1NUlswbdlqqwn",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jZU3rfIbdJSpmUH99U837CiOy+KH3NHh", + "0cWZK5KOPuiXuLDQxSE6JlgQgW6y/f3XIQD/8E/yAc0g6jXeGEYQn9iTAcpQGmPKRorcKwAQrqESs35m", + "LTofW6h9vLCHFx+ImU2oYttUqxv1wXoC8Icr6ayfAoYiqI7MaH78I0NBCAtuICGGKiggdEFEyBnOV2tE", + "qXRSeDg4CPaDfZtqz3BKB4eD18F+8MrWsgAu2jPHvCN7zAu/TYlqPzU2XyM2MGr1iFhvbM54Z5F9p3KS", + "LyHRxcSyMNSr/X13gkfM+Ql8SMRs7d5/rIzbta1QItWRIPMA+KhuB0EKJllcSImm0fc7nInJQvYM/pbJ", + "luF/eIzhz5wnYwEIYhsOBzJLEiwWnfdZ4als1EmBlKSU+y5HmBwt+z3nanfOP9MC9d13DpP77jtA5T58", + "+KD/90n/p8DotDaTrx3P3gyG7rHWIu5x6ecih8M8NH8flFrkOSCmgfnz91v9d94mz7uwI8CftTYmbcM0", + "INkoJEwJHI8Obga6xed8ScvXhj9mgixdHrRYssI8AWXJIm3/v+MQQOXfzfity621LtZdrKqhAMy2VwRz", + "kH9265ibEvo74XnPSDZtyCMH16V6RxUmtEcKruBxOSHDZnk8jvbqFdf6imu1ilmitz4PG5Zw75MWiM9G", + "l8XEWwoJfjcm2iEmzbypqkiYd+oiUUpPO3zn/QijVcnNrCwoxYjVzOWFHroP/Fd5d1jag7r79b7B19/7", + "Asie/5bxXzdmaDecXq/rR6LWY68fiXrqvNXrzCfDsx3Ya4mnh1XorcQnFMWxyz92sEHLCAEyCb+2Kke1", + "qTmPChpM7skRfhp8vnu/pj0duptfA0SRAfqtjbr5qaCDqnqv5zlJ8HrStsIDsnczRw55WWqS3EVOOA+G", + "w9/yd/3NJ7oxat789Jks/5XaB+Q7/4A9/21sQbbgBseRt3+Tlg+L64gjd51lPWDKc5/Rj055rsM8JNu1", + "3b7pGW8nOFXLtjsGSzyb3Q5ZHfm6K46NwEJK9EEz/IcinTa4YcdYksjle7nn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emgcjerffqTSute", + "zJ+8mBcb1ov5Qzj6NfnZrQFPqRIrZfuCU6ZGlI2uaUKQIHGujOy3NbYM4y/0JHpZfwayDjvVS/nGUr6t", + "JO1W+MuZ/5u773kvHfz3y6JtL+3PJbmu9+Af0IMvSc9O8k4Im1LWQaSL7+bnU3KvLpPj07zNf3/KiVlr", + "z/3bc/9SZquzvSH7euxeOg1eN0o1PSzzUk9di+dgsvLlPBdbY6nbS9guQ8ecC1qFq+WEyFsIaJWsVM+H", + "vnJxebhznXZJedrHOr2E77Qs1xpCri1o8S3VlRXvcYpDqhZQ37ww2XkHW1W8vyx90vXxyt4Xo/bct3nt", + "+835oln7fl58C7mVGd03H49xeEtY5L6HDJ/wbDCb/YDyQ39RwX3DefNacEtXBd2avTDWMhPx4HCwNz8Y", + "aLNi6Vgnlu5yoWaUTXMsyX5Ss5AEVLomYA2b3o2mfWzvzClyT1d1IGqjbougstarsxxbzBWVICf/nPP7", + "NNuMUhxM+wdxFVHWGOO4/mkT23P1yyaf33/+3wAAAP//6jMNuFv8AAA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/deploy/quickstart-k8s.yaml b/deploy/quickstart-k8s.yaml index f5100758..83f63a85 100644 --- a/deploy/quickstart-k8s.yaml +++ b/deploy/quickstart-k8s.yaml @@ -8,12 +8,9 @@ kind: Role metadata: name: everest-admin-role rules: - - apiGroups: ["operator.victoriametrics.com"] - resources: ["vmagents"] - verbs: ["*"] - apiGroups: [""] resources: ["namespaces"] - verbs: ["*"] + verbs: ["get", "list"] - apiGroups: ["apps"] resources: ["deployments"] verbs: ["get"] @@ -23,6 +20,15 @@ kind: ClusterRole metadata: name: everest-admin-cluster-role rules: + - apiGroups: ["everest.percona.com"] + resources: ["databaseengines"] + verbs: ["get", "list"] + - apiGroups: ["everest.percona.com"] + resources: ["databaseclusters", "databaseclusterbackups", "databaseclusterrestores", "backupstorages", "monitoringconfigs"] + verbs: ["*"] + - apiGroups: [""] + resources: ["secrets"] + verbs: ["*"] - apiGroups: [""] resources: ["secrets"] verbs: ["*"] diff --git a/docs/spec/openapi.yml b/docs/spec/openapi.yml index bcb1295c..6ef1de6a 100644 --- a/docs/spec/openapi.yml +++ b/docs/spec/openapi.yml @@ -100,13 +100,20 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-clusters': + '/namespaces/{namespace}/database-clusters': post: tags: - databaseCluster summary: Create a database cluster description: Create a database cluster operationId: createDatabaseCluster + parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string responses: '200': description: Successful operation @@ -151,6 +158,13 @@ paths: summary: List of the created database clusters description: List of the created database clusters operationId: listDatabaseClusters + parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string responses: '200': description: Successful operation @@ -170,7 +184,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-clusters/{name}': + '/namespaces/{namespace}/database-clusters/{name}': get: tags: - databaseCluster @@ -178,6 +192,12 @@ paths: description: Get the specified database cluster operationId: getDatabaseCluster parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster. Can be found under Metadata["name"] of the DatabaseCluster object. @@ -210,6 +230,12 @@ paths: description: Replace the specified database cluster operationId: updateDatabaseCluster parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster. Can be found under Metadata["name"] of the DatabaseCluster object. @@ -249,6 +275,12 @@ paths: description: Delete the specified database cluster operationId: deleteDatabaseCluster parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster. Can be found under Metadata["name"] of the DatabaseCluster object. @@ -274,7 +306,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-clusters/{name}/backups': + '/namespaces/{namespace}/database-clusters/{name}/backups': get: tags: - databaseClusterBackup @@ -282,6 +314,12 @@ paths: description: List of the created database cluster backups operationId: listDatabaseClusterBackups parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster. Can be found under Metadata["name"] of the DatabaseCluster object. @@ -307,7 +345,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-clusters/{name}/restores': + '/namespaces/{namespace}/database-clusters/{name}/restores': get: tags: - databaseClusterRestore @@ -315,6 +353,12 @@ paths: description: List of the created database cluster restores operationId: listDatabaseClusterRestores parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster. Can be found under Metadata["name"] of the DatabaseCluster object. @@ -340,7 +384,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-clusters/{name}/credentials': + '/namespaces/{namespace}/database-clusters/{name}/credentials': get: tags: - databaseCluster @@ -348,6 +392,12 @@ paths: description: Get the specified database cluster credentials operationId: getDatabaseClusterCredentials parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster. Can be found under Metadata["name"] of the DatabaseCluster object. @@ -373,7 +423,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-clusters/{name}/pitr': + '/namespaces/{namespace}/database-clusters/{name}/pitr': get: tags: - databaseCluster @@ -381,6 +431,12 @@ paths: description: Get the Point-in-Time related data for the specified database cluster operationId: getDatabaseClusterPitr parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster. Can be found under Metadata["name"] of the DatabaseCluster object. @@ -523,13 +579,20 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-cluster-restores': + '/namespaces/{namespace}/database-cluster-restores': post: tags: - databaseClusterRestore summary: Create a database cluster restore description: Create a database cluster restore operationId: createDatabaseClusterRestore + parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string responses: '200': description: Successful operation @@ -568,7 +631,7 @@ paths: application/json: schema: $ref: '#/components/schemas/DatabaseClusterRestore' - '/database-cluster-restores/{name}': + '/namespaces/{namespace}/database-cluster-restores/{name}': get: tags: - databaseClusterRestore @@ -576,6 +639,12 @@ paths: description: Returns the specified cluster restore operationId: getDatabaseClusterRestore parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster restore. Can be found under Metadata["name"] of the DatabaseClusterRestore object. @@ -608,6 +677,12 @@ paths: description: Replace the specified cluster restore operationId: updateDatabaseClusterRestore parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster restore. Can be found under Metadata["name"] of the DatabaseClusterRestore object. @@ -653,6 +728,12 @@ paths: description: Delete the specified cluster restore operationId: deleteDatabaseClusterRestore parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster restore. Can be found under Metadata["name"] of the DatabaseClusterRestore object. @@ -678,13 +759,20 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/database-cluster-backups': + '/namespaces/{namespace}/database-cluster-backups': post: tags: - databaseClusterBackup summary: Create a database cluster backup description: Create a database cluster backup operationId: createDatabaseClusterBackup + parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string responses: '200': description: Successful operation @@ -723,7 +811,7 @@ paths: application/json: schema: $ref: '#/components/schemas/DatabaseClusterBackup' - '/database-cluster-backups/{name}': + '/namespaces/{namespace}/database-cluster-backups/{name}': get: tags: - databaseClusterBackup @@ -731,7 +819,14 @@ paths: description: Returns the specified cluster backup operationId: getDatabaseClusterBackup parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name + in: path description: Name of the database cluster backup. Can be found under Metadata["name"] of the DatabaseClusterBackup object. required: true @@ -763,6 +858,12 @@ paths: description: Delete the specified cluster backup operationId: deleteDatabaseClusterBackup parameters: + - name: namespace + in: path + description: Name of the namespace + required: true + schema: + type: string - name: name in: path description: Name of the database cluster backup. Can be found under Metadata["name"] of the DatabaseClusterBackup object. diff --git a/go.mod b/go.mod index 7ffa596f..2e3b6d91 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/labstack/echo/v4 v4.11.4 github.com/oapi-codegen/echo-middleware v1.0.1 github.com/oapi-codegen/runtime v1.1.1 - github.com/percona/everest-operator v0.6.0-dev1.0.20240205163640-b47371dba0a5 + github.com/percona/everest-operator v0.6.0-dev1.0.20240207144724-d5253b875e28 github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.26.0 golang.org/x/crypto v0.18.0 diff --git a/go.sum b/go.sum index 3075f959..258256d5 100644 --- a/go.sum +++ b/go.sum @@ -420,8 +420,8 @@ github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8P github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/percona/everest-operator v0.6.0-dev1.0.20240205163640-b47371dba0a5 h1:qtLttjvVyc276YEZVdQ/aO8h+/M69Yyj5BcOnTBHY2M= -github.com/percona/everest-operator v0.6.0-dev1.0.20240205163640-b47371dba0a5/go.mod h1:45pGpvWrPy495qiQqxNuOJor4wif+vTTTJP4Qee8qZk= +github.com/percona/everest-operator v0.6.0-dev1.0.20240207144724-d5253b875e28 h1:N9dZVyeXzUTK+xRdz9DBcaWj3X6oUPpezEwdH2jT4cg= +github.com/percona/everest-operator v0.6.0-dev1.0.20240207144724-d5253b875e28/go.mod h1:45pGpvWrPy495qiQqxNuOJor4wif+vTTTJP4Qee8qZk= github.com/percona/percona-backup-mongodb v1.8.1-0.20230920143330-3b1c2e263901 h1:BDgsZRCjEuxl2/z4yWBqB0s8d20shuIDks7/RVdZiLs= github.com/percona/percona-backup-mongodb v1.8.1-0.20230920143330-3b1c2e263901/go.mod h1:fZRCMpUqkWlLVdRKqqaj001LoVP2eo6F0ZhoMPeXDng= github.com/percona/percona-postgresql-operator v0.0.0-20231220140959-ad5eef722609 h1:+UOK4gcHrRgqjo4smgfwT7/0apF6PhAJdQIdAV4ub/M= diff --git a/pkg/kubernetes/backup_storage.go b/pkg/kubernetes/backup_storage.go index 286246c2..4565f8a0 100644 --- a/pkg/kubernetes/backup_storage.go +++ b/pkg/kubernetes/backup_storage.go @@ -60,6 +60,12 @@ func (k *Kubernetes) IsBackupStorageUsed(ctx context.Context, backupStorageName if err != nil { return false, err } + + namespaces, err := k.GetDBNamespaces(ctx, k.Namespace()) + if err != nil { + return false, err + } + options := metav1.ListOptions{ LabelSelector: metav1.FormatLabelSelector(&metav1.LabelSelector{ MatchLabels: map[string]string{ @@ -67,26 +73,30 @@ func (k *Kubernetes) IsBackupStorageUsed(ctx context.Context, backupStorageName }, }), } - list, err := k.client.ListDatabaseClusters(ctx, options) - if err != nil { - return false, err - } - if len(list.Items) > 0 { - return true, nil - } - bList, err := k.client.ListDatabaseClusterBackups(ctx, options) - if err != nil { - return false, err - } - if len(bList.Items) > 0 { - return true, nil - } - rList, err := k.client.ListDatabaseClusterRestores(ctx, options) - if err != nil { - return false, err - } - if len(rList.Items) > 0 { - return true, nil + + for _, namespace := range namespaces { + list, err := k.client.ListDatabaseClusters(ctx, namespace, options) + if err != nil { + return false, err + } + if len(list.Items) > 0 { + return true, nil + } + bList, err := k.client.ListDatabaseClusterBackups(ctx, namespace, options) + if err != nil { + return false, err + } + if len(bList.Items) > 0 { + return true, nil + } + rList, err := k.client.ListDatabaseClusterRestores(ctx, namespace, options) + if err != nil { + return false, err + } + if len(rList.Items) > 0 { + return true, nil + } } + return false, nil } diff --git a/pkg/kubernetes/client/database_cluster.go b/pkg/kubernetes/client/database_cluster.go index 36e90fad..5ccfaca8 100644 --- a/pkg/kubernetes/client/database_cluster.go +++ b/pkg/kubernetes/client/database_cluster.go @@ -8,11 +8,11 @@ import ( ) // ListDatabaseClusters returns list of managed database clusters. -func (c *Client) ListDatabaseClusters(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterList, error) { - return c.customClientSet.DBClusters(c.namespace).List(ctx, options) +func (c *Client) ListDatabaseClusters(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterList, error) { + return c.customClientSet.DBClusters(namespace).List(ctx, options) } // GetDatabaseCluster returns database clusters by provided name. -func (c *Client) GetDatabaseCluster(ctx context.Context, name string) (*everestv1alpha1.DatabaseCluster, error) { - return c.customClientSet.DBClusters(c.namespace).Get(ctx, name, metav1.GetOptions{}) +func (c *Client) GetDatabaseCluster(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseCluster, error) { + return c.customClientSet.DBClusters(namespace).Get(ctx, name, metav1.GetOptions{}) } diff --git a/pkg/kubernetes/client/database_cluster_backup.go b/pkg/kubernetes/client/database_cluster_backup.go index 2ae089a0..83dbfc0d 100644 --- a/pkg/kubernetes/client/database_cluster_backup.go +++ b/pkg/kubernetes/client/database_cluster_backup.go @@ -8,11 +8,11 @@ import ( ) // ListDatabaseClusterBackups returns list of managed database cluster backups. -func (c *Client) ListDatabaseClusterBackups(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterBackupList, error) { - return c.customClientSet.DBClusterBackups(c.namespace).List(ctx, options) +func (c *Client) ListDatabaseClusterBackups(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterBackupList, error) { + return c.customClientSet.DBClusterBackups(namespace).List(ctx, options) } // GetDatabaseClusterBackup returns database cluster backups by provided name. -func (c *Client) GetDatabaseClusterBackup(ctx context.Context, name string) (*everestv1alpha1.DatabaseClusterBackup, error) { - return c.customClientSet.DBClusterBackups(c.namespace).Get(ctx, name, metav1.GetOptions{}) +func (c *Client) GetDatabaseClusterBackup(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseClusterBackup, error) { + return c.customClientSet.DBClusterBackups(namespace).Get(ctx, name, metav1.GetOptions{}) } diff --git a/pkg/kubernetes/client/database_cluster_restore.go b/pkg/kubernetes/client/database_cluster_restore.go index e341b064..c0a70ce6 100644 --- a/pkg/kubernetes/client/database_cluster_restore.go +++ b/pkg/kubernetes/client/database_cluster_restore.go @@ -8,11 +8,11 @@ import ( ) // ListDatabaseClusterRestores returns list of managed database clusters. -func (c *Client) ListDatabaseClusterRestores(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterRestoreList, error) { - return c.customClientSet.DBClusterRestores(c.namespace).List(ctx, options) +func (c *Client) ListDatabaseClusterRestores(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterRestoreList, error) { + return c.customClientSet.DBClusterRestores(namespace).List(ctx, options) } // GetDatabaseClusterRestore returns database clusters by provided name. -func (c *Client) GetDatabaseClusterRestore(ctx context.Context, name string) (*everestv1alpha1.DatabaseClusterRestore, error) { - return c.customClientSet.DBClusterRestores(c.namespace).Get(ctx, name, metav1.GetOptions{}) +func (c *Client) GetDatabaseClusterRestore(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseClusterRestore, error) { + return c.customClientSet.DBClusterRestores(namespace).Get(ctx, name, metav1.GetOptions{}) } diff --git a/pkg/kubernetes/client/database_engine.go b/pkg/kubernetes/client/database_engine.go index 452598df..3cc4ca16 100644 --- a/pkg/kubernetes/client/database_engine.go +++ b/pkg/kubernetes/client/database_engine.go @@ -8,11 +8,11 @@ import ( ) // ListDatabaseEngines returns list of managed database clusters. -func (c *Client) ListDatabaseEngines(ctx context.Context) (*everestv1alpha1.DatabaseEngineList, error) { - return c.customClientSet.DBEngines(c.namespace).List(ctx, metav1.ListOptions{}) +func (c *Client) ListDatabaseEngines(ctx context.Context, namespace string) (*everestv1alpha1.DatabaseEngineList, error) { + return c.customClientSet.DBEngines(namespace).List(ctx, metav1.ListOptions{}) } // GetDatabaseEngine returns database clusters by provided name. -func (c *Client) GetDatabaseEngine(ctx context.Context, name string) (*everestv1alpha1.DatabaseEngine, error) { - return c.customClientSet.DBEngines(c.namespace).Get(ctx, name, metav1.GetOptions{}) +func (c *Client) GetDatabaseEngine(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseEngine, error) { + return c.customClientSet.DBEngines(namespace).Get(ctx, name, metav1.GetOptions{}) } diff --git a/pkg/kubernetes/client/kubeclient_interface.go b/pkg/kubernetes/client/kubeclient_interface.go index 997cd68b..002325d7 100644 --- a/pkg/kubernetes/client/kubeclient_interface.go +++ b/pkg/kubernetes/client/kubeclient_interface.go @@ -50,21 +50,21 @@ type KubeClientConnector interface { // GetDeployment returns deployment by name. GetDeployment(ctx context.Context, name string, namespace string) (*appsv1.Deployment, error) // ListDatabaseClusters returns list of managed database clusters. - ListDatabaseClusters(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterList, error) + ListDatabaseClusters(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterList, error) // GetDatabaseCluster returns database clusters by provided name. - GetDatabaseCluster(ctx context.Context, name string) (*everestv1alpha1.DatabaseCluster, error) + GetDatabaseCluster(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseCluster, error) // ListDatabaseClusterBackups returns list of managed database cluster backups. - ListDatabaseClusterBackups(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterBackupList, error) + ListDatabaseClusterBackups(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterBackupList, error) // GetDatabaseClusterBackup returns database cluster backups by provided name. - GetDatabaseClusterBackup(ctx context.Context, name string) (*everestv1alpha1.DatabaseClusterBackup, error) + GetDatabaseClusterBackup(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseClusterBackup, error) // ListDatabaseClusterRestores returns list of managed database clusters. - ListDatabaseClusterRestores(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterRestoreList, error) + ListDatabaseClusterRestores(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterRestoreList, error) // GetDatabaseClusterRestore returns database clusters by provided name. - GetDatabaseClusterRestore(ctx context.Context, name string) (*everestv1alpha1.DatabaseClusterRestore, error) + GetDatabaseClusterRestore(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseClusterRestore, error) // ListDatabaseEngines returns list of managed database clusters. - ListDatabaseEngines(ctx context.Context) (*everestv1alpha1.DatabaseEngineList, error) + ListDatabaseEngines(ctx context.Context, namespace string) (*everestv1alpha1.DatabaseEngineList, error) // GetDatabaseEngine returns database clusters by provided name. - GetDatabaseEngine(ctx context.Context, name string) (*everestv1alpha1.DatabaseEngine, error) + GetDatabaseEngine(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseEngine, error) // CreateMonitoringConfig creates an monitoringConfig. CreateMonitoringConfig(ctx context.Context, config *everestv1alpha1.MonitoringConfig) error // UpdateMonitoringConfig updates an monitoringConfig. diff --git a/pkg/kubernetes/client/mock_kube_client_connector.go b/pkg/kubernetes/client/mock_kube_client_connector.go index 5bd561dd..d77a86fa 100644 --- a/pkg/kubernetes/client/mock_kube_client_connector.go +++ b/pkg/kubernetes/client/mock_kube_client_connector.go @@ -276,9 +276,9 @@ func (_m *MockKubeClientConnector) GetConfigMap(ctx context.Context, namespace s return r0, r1 } -// GetDatabaseCluster provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDatabaseCluster(ctx context.Context, name string) (*v1alpha1.DatabaseCluster, error) { - ret := _m.Called(ctx, name) +// GetDatabaseCluster provides a mock function with given fields: ctx, namespace, name +func (_m *MockKubeClientConnector) GetDatabaseCluster(ctx context.Context, namespace string, name string) (*v1alpha1.DatabaseCluster, error) { + ret := _m.Called(ctx, namespace, name) if len(ret) == 0 { panic("no return value specified for GetDatabaseCluster") @@ -286,19 +286,19 @@ func (_m *MockKubeClientConnector) GetDatabaseCluster(ctx context.Context, name var r0 *v1alpha1.DatabaseCluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.DatabaseCluster, error)); ok { - return rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.DatabaseCluster, error)); ok { + return rf(ctx, namespace, name) } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.DatabaseCluster); ok { - r0 = rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.DatabaseCluster); ok { + r0 = rf(ctx, namespace, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseCluster) } } - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) + if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = rf(ctx, namespace, name) } else { r1 = ret.Error(1) } @@ -306,9 +306,9 @@ func (_m *MockKubeClientConnector) GetDatabaseCluster(ctx context.Context, name return r0, r1 } -// GetDatabaseClusterBackup provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDatabaseClusterBackup(ctx context.Context, name string) (*v1alpha1.DatabaseClusterBackup, error) { - ret := _m.Called(ctx, name) +// GetDatabaseClusterBackup provides a mock function with given fields: ctx, namespace, name +func (_m *MockKubeClientConnector) GetDatabaseClusterBackup(ctx context.Context, namespace string, name string) (*v1alpha1.DatabaseClusterBackup, error) { + ret := _m.Called(ctx, namespace, name) if len(ret) == 0 { panic("no return value specified for GetDatabaseClusterBackup") @@ -316,19 +316,19 @@ func (_m *MockKubeClientConnector) GetDatabaseClusterBackup(ctx context.Context, var r0 *v1alpha1.DatabaseClusterBackup var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.DatabaseClusterBackup, error)); ok { - return rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.DatabaseClusterBackup, error)); ok { + return rf(ctx, namespace, name) } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.DatabaseClusterBackup); ok { - r0 = rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.DatabaseClusterBackup); ok { + r0 = rf(ctx, namespace, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseClusterBackup) } } - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) + if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = rf(ctx, namespace, name) } else { r1 = ret.Error(1) } @@ -336,9 +336,9 @@ func (_m *MockKubeClientConnector) GetDatabaseClusterBackup(ctx context.Context, return r0, r1 } -// GetDatabaseClusterRestore provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDatabaseClusterRestore(ctx context.Context, name string) (*v1alpha1.DatabaseClusterRestore, error) { - ret := _m.Called(ctx, name) +// GetDatabaseClusterRestore provides a mock function with given fields: ctx, namespace, name +func (_m *MockKubeClientConnector) GetDatabaseClusterRestore(ctx context.Context, namespace string, name string) (*v1alpha1.DatabaseClusterRestore, error) { + ret := _m.Called(ctx, namespace, name) if len(ret) == 0 { panic("no return value specified for GetDatabaseClusterRestore") @@ -346,19 +346,19 @@ func (_m *MockKubeClientConnector) GetDatabaseClusterRestore(ctx context.Context var r0 *v1alpha1.DatabaseClusterRestore var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.DatabaseClusterRestore, error)); ok { - return rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.DatabaseClusterRestore, error)); ok { + return rf(ctx, namespace, name) } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.DatabaseClusterRestore); ok { - r0 = rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.DatabaseClusterRestore); ok { + r0 = rf(ctx, namespace, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseClusterRestore) } } - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) + if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = rf(ctx, namespace, name) } else { r1 = ret.Error(1) } @@ -366,9 +366,9 @@ func (_m *MockKubeClientConnector) GetDatabaseClusterRestore(ctx context.Context return r0, r1 } -// GetDatabaseEngine provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDatabaseEngine(ctx context.Context, name string) (*v1alpha1.DatabaseEngine, error) { - ret := _m.Called(ctx, name) +// GetDatabaseEngine provides a mock function with given fields: ctx, namespace, name +func (_m *MockKubeClientConnector) GetDatabaseEngine(ctx context.Context, namespace string, name string) (*v1alpha1.DatabaseEngine, error) { + ret := _m.Called(ctx, namespace, name) if len(ret) == 0 { panic("no return value specified for GetDatabaseEngine") @@ -376,19 +376,19 @@ func (_m *MockKubeClientConnector) GetDatabaseEngine(ctx context.Context, name s var r0 *v1alpha1.DatabaseEngine var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.DatabaseEngine, error)); ok { - return rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.DatabaseEngine, error)); ok { + return rf(ctx, namespace, name) } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.DatabaseEngine); ok { - r0 = rf(ctx, name) + if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.DatabaseEngine); ok { + r0 = rf(ctx, namespace, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseEngine) } } - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) + if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = rf(ctx, namespace, name) } else { r1 = ret.Error(1) } @@ -714,9 +714,9 @@ func (_m *MockKubeClientConnector) ListBackupStorages(ctx context.Context, optio return r0, r1 } -// ListDatabaseClusterBackups provides a mock function with given fields: ctx, options -func (_m *MockKubeClientConnector) ListDatabaseClusterBackups(ctx context.Context, options metav1.ListOptions) (*v1alpha1.DatabaseClusterBackupList, error) { - ret := _m.Called(ctx, options) +// ListDatabaseClusterBackups provides a mock function with given fields: ctx, namespace, options +func (_m *MockKubeClientConnector) ListDatabaseClusterBackups(ctx context.Context, namespace string, options metav1.ListOptions) (*v1alpha1.DatabaseClusterBackupList, error) { + ret := _m.Called(ctx, namespace, options) if len(ret) == 0 { panic("no return value specified for ListDatabaseClusterBackups") @@ -724,19 +724,19 @@ func (_m *MockKubeClientConnector) ListDatabaseClusterBackups(ctx context.Contex var r0 *v1alpha1.DatabaseClusterBackupList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1alpha1.DatabaseClusterBackupList, error)); ok { - return rf(ctx, options) + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.ListOptions) (*v1alpha1.DatabaseClusterBackupList, error)); ok { + return rf(ctx, namespace, options) } - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *v1alpha1.DatabaseClusterBackupList); ok { - r0 = rf(ctx, options) + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.ListOptions) *v1alpha1.DatabaseClusterBackupList); ok { + r0 = rf(ctx, namespace, options) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseClusterBackupList) } } - if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { - r1 = rf(ctx, options) + if rf, ok := ret.Get(1).(func(context.Context, string, metav1.ListOptions) error); ok { + r1 = rf(ctx, namespace, options) } else { r1 = ret.Error(1) } @@ -744,9 +744,9 @@ func (_m *MockKubeClientConnector) ListDatabaseClusterBackups(ctx context.Contex return r0, r1 } -// ListDatabaseClusterRestores provides a mock function with given fields: ctx, options -func (_m *MockKubeClientConnector) ListDatabaseClusterRestores(ctx context.Context, options metav1.ListOptions) (*v1alpha1.DatabaseClusterRestoreList, error) { - ret := _m.Called(ctx, options) +// ListDatabaseClusterRestores provides a mock function with given fields: ctx, namespace, options +func (_m *MockKubeClientConnector) ListDatabaseClusterRestores(ctx context.Context, namespace string, options metav1.ListOptions) (*v1alpha1.DatabaseClusterRestoreList, error) { + ret := _m.Called(ctx, namespace, options) if len(ret) == 0 { panic("no return value specified for ListDatabaseClusterRestores") @@ -754,19 +754,19 @@ func (_m *MockKubeClientConnector) ListDatabaseClusterRestores(ctx context.Conte var r0 *v1alpha1.DatabaseClusterRestoreList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1alpha1.DatabaseClusterRestoreList, error)); ok { - return rf(ctx, options) + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.ListOptions) (*v1alpha1.DatabaseClusterRestoreList, error)); ok { + return rf(ctx, namespace, options) } - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *v1alpha1.DatabaseClusterRestoreList); ok { - r0 = rf(ctx, options) + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.ListOptions) *v1alpha1.DatabaseClusterRestoreList); ok { + r0 = rf(ctx, namespace, options) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseClusterRestoreList) } } - if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { - r1 = rf(ctx, options) + if rf, ok := ret.Get(1).(func(context.Context, string, metav1.ListOptions) error); ok { + r1 = rf(ctx, namespace, options) } else { r1 = ret.Error(1) } @@ -774,9 +774,9 @@ func (_m *MockKubeClientConnector) ListDatabaseClusterRestores(ctx context.Conte return r0, r1 } -// ListDatabaseClusters provides a mock function with given fields: ctx, options -func (_m *MockKubeClientConnector) ListDatabaseClusters(ctx context.Context, options metav1.ListOptions) (*v1alpha1.DatabaseClusterList, error) { - ret := _m.Called(ctx, options) +// ListDatabaseClusters provides a mock function with given fields: ctx, namespace, options +func (_m *MockKubeClientConnector) ListDatabaseClusters(ctx context.Context, namespace string, options metav1.ListOptions) (*v1alpha1.DatabaseClusterList, error) { + ret := _m.Called(ctx, namespace, options) if len(ret) == 0 { panic("no return value specified for ListDatabaseClusters") @@ -784,19 +784,19 @@ func (_m *MockKubeClientConnector) ListDatabaseClusters(ctx context.Context, opt var r0 *v1alpha1.DatabaseClusterList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1alpha1.DatabaseClusterList, error)); ok { - return rf(ctx, options) + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.ListOptions) (*v1alpha1.DatabaseClusterList, error)); ok { + return rf(ctx, namespace, options) } - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *v1alpha1.DatabaseClusterList); ok { - r0 = rf(ctx, options) + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.ListOptions) *v1alpha1.DatabaseClusterList); ok { + r0 = rf(ctx, namespace, options) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseClusterList) } } - if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { - r1 = rf(ctx, options) + if rf, ok := ret.Get(1).(func(context.Context, string, metav1.ListOptions) error); ok { + r1 = rf(ctx, namespace, options) } else { r1 = ret.Error(1) } @@ -804,9 +804,9 @@ func (_m *MockKubeClientConnector) ListDatabaseClusters(ctx context.Context, opt return r0, r1 } -// ListDatabaseEngines provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) ListDatabaseEngines(ctx context.Context) (*v1alpha1.DatabaseEngineList, error) { - ret := _m.Called(ctx) +// ListDatabaseEngines provides a mock function with given fields: ctx, namespace +func (_m *MockKubeClientConnector) ListDatabaseEngines(ctx context.Context, namespace string) (*v1alpha1.DatabaseEngineList, error) { + ret := _m.Called(ctx, namespace) if len(ret) == 0 { panic("no return value specified for ListDatabaseEngines") @@ -814,19 +814,19 @@ func (_m *MockKubeClientConnector) ListDatabaseEngines(ctx context.Context) (*v1 var r0 *v1alpha1.DatabaseEngineList var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*v1alpha1.DatabaseEngineList, error)); ok { - return rf(ctx) + if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.DatabaseEngineList, error)); ok { + return rf(ctx, namespace) } - if rf, ok := ret.Get(0).(func(context.Context) *v1alpha1.DatabaseEngineList); ok { - r0 = rf(ctx) + if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.DatabaseEngineList); ok { + r0 = rf(ctx, namespace) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.DatabaseEngineList) } } - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, namespace) } else { r1 = ret.Error(1) } diff --git a/pkg/kubernetes/database_cluster.go b/pkg/kubernetes/database_cluster.go index 1aebc859..edeac38a 100644 --- a/pkg/kubernetes/database_cluster.go +++ b/pkg/kubernetes/database_cluster.go @@ -24,11 +24,11 @@ import ( ) // ListDatabaseClusters returns list of managed database clusters. -func (k *Kubernetes) ListDatabaseClusters(ctx context.Context) (*everestv1alpha1.DatabaseClusterList, error) { - return k.client.ListDatabaseClusters(ctx, metav1.ListOptions{}) +func (k *Kubernetes) ListDatabaseClusters(ctx context.Context, namespace string) (*everestv1alpha1.DatabaseClusterList, error) { + return k.client.ListDatabaseClusters(ctx, namespace, metav1.ListOptions{}) } // GetDatabaseCluster returns database clusters by provided name. -func (k *Kubernetes) GetDatabaseCluster(ctx context.Context, name string) (*everestv1alpha1.DatabaseCluster, error) { - return k.client.GetDatabaseCluster(ctx, name) +func (k *Kubernetes) GetDatabaseCluster(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseCluster, error) { + return k.client.GetDatabaseCluster(ctx, namespace, name) } diff --git a/pkg/kubernetes/database_cluster_backup.go b/pkg/kubernetes/database_cluster_backup.go index 7c3c2338..b8e0432f 100644 --- a/pkg/kubernetes/database_cluster_backup.go +++ b/pkg/kubernetes/database_cluster_backup.go @@ -23,11 +23,11 @@ import ( ) // GetDatabaseClusterBackup returns database cluster backup by name. -func (k *Kubernetes) GetDatabaseClusterBackup(ctx context.Context, name string) (*everestv1alpha1.DatabaseClusterBackup, error) { - return k.client.GetDatabaseClusterBackup(ctx, name) +func (k *Kubernetes) GetDatabaseClusterBackup(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseClusterBackup, error) { + return k.client.GetDatabaseClusterBackup(ctx, namespace, name) } // ListDatabaseClusterBackups returns database cluster backups. -func (k *Kubernetes) ListDatabaseClusterBackups(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterBackupList, error) { - return k.client.ListDatabaseClusterBackups(ctx, options) +func (k *Kubernetes) ListDatabaseClusterBackups(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterBackupList, error) { + return k.client.ListDatabaseClusterBackups(ctx, namespace, options) } diff --git a/pkg/kubernetes/database_cluster_restore.go b/pkg/kubernetes/database_cluster_restore.go index cced895e..f46d7e96 100644 --- a/pkg/kubernetes/database_cluster_restore.go +++ b/pkg/kubernetes/database_cluster_restore.go @@ -23,11 +23,11 @@ import ( ) // GetDatabaseClusterRestore returns database cluster restore by name. -func (k *Kubernetes) GetDatabaseClusterRestore(ctx context.Context, name string) (*everestv1alpha1.DatabaseClusterRestore, error) { - return k.client.GetDatabaseClusterRestore(ctx, name) +func (k *Kubernetes) GetDatabaseClusterRestore(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseClusterRestore, error) { + return k.client.GetDatabaseClusterRestore(ctx, namespace, name) } // ListDatabaseClusterRestores returns database cluster restores. -func (k *Kubernetes) ListDatabaseClusterRestores(ctx context.Context, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterRestoreList, error) { - return k.client.ListDatabaseClusterRestores(ctx, options) +func (k *Kubernetes) ListDatabaseClusterRestores(ctx context.Context, namespace string, options metav1.ListOptions) (*everestv1alpha1.DatabaseClusterRestoreList, error) { + return k.client.ListDatabaseClusterRestores(ctx, namespace, options) } diff --git a/pkg/kubernetes/database_engine.go b/pkg/kubernetes/database_engine.go index b14ee9be..862742ae 100644 --- a/pkg/kubernetes/database_engine.go +++ b/pkg/kubernetes/database_engine.go @@ -23,11 +23,11 @@ import ( ) // ListDatabaseEngines returns list of managed database clusters. -func (k *Kubernetes) ListDatabaseEngines(ctx context.Context) (*everestv1alpha1.DatabaseEngineList, error) { - return k.client.ListDatabaseEngines(ctx) +func (k *Kubernetes) ListDatabaseEngines(ctx context.Context, namespace string) (*everestv1alpha1.DatabaseEngineList, error) { + return k.client.ListDatabaseEngines(ctx, namespace) } // GetDatabaseEngine returns database clusters by provided name. -func (k *Kubernetes) GetDatabaseEngine(ctx context.Context, name string) (*everestv1alpha1.DatabaseEngine, error) { - return k.client.GetDatabaseEngine(ctx, name) +func (k *Kubernetes) GetDatabaseEngine(ctx context.Context, namespace, name string) (*everestv1alpha1.DatabaseEngine, error) { + return k.client.GetDatabaseEngine(ctx, namespace, name) } diff --git a/pkg/kubernetes/kubernetes.go b/pkg/kubernetes/kubernetes.go index 35cb6c1e..c2c8220e 100644 --- a/pkg/kubernetes/kubernetes.go +++ b/pkg/kubernetes/kubernetes.go @@ -46,8 +46,9 @@ const ( // EverestOperatorDeploymentName is the name of the deployment for everest operator. EverestOperatorDeploymentName = "everest-operator-controller-manager" - // EverestWatchNamespacesEnvVar is the name of the environment variable. - EverestWatchNamespacesEnvVar = "WATCH_NAMESPACES" + // EverestDBNamespacesEnvVar is the name of the environment variable that + // contains the list of monitored namespaces. + EverestDBNamespacesEnvVar = "DB_NAMESPACES" ) // Kubernetes is a client for Kubernetes. @@ -113,8 +114,8 @@ func (k *Kubernetes) GetClusterType(ctx context.Context) (ClusterType, error) { return ClusterTypeGeneric, nil } -// GetWatchedNamespaces returns list of watched namespaces. -func (k *Kubernetes) GetWatchedNamespaces(ctx context.Context, namespace string) ([]string, error) { +// GetDBNamespaces returns a list of namespaces that are monitored by the Everest operator. +func (k *Kubernetes) GetDBNamespaces(ctx context.Context, namespace string) ([]string, error) { deployment, err := k.GetDeployment(ctx, EverestOperatorDeploymentName, namespace) if err != nil { return nil, err @@ -125,7 +126,7 @@ func (k *Kubernetes) GetWatchedNamespaces(ctx context.Context, namespace string) continue } for _, envVar := range container.Env { - if envVar.Name != EverestWatchNamespacesEnvVar { + if envVar.Name != EverestDBNamespacesEnvVar { continue } return strings.Split(envVar.Value, ","), nil diff --git a/pkg/kubernetes/monitoring_config.go b/pkg/kubernetes/monitoring_config.go index 5a39584b..cbf0435f 100644 --- a/pkg/kubernetes/monitoring_config.go +++ b/pkg/kubernetes/monitoring_config.go @@ -21,7 +21,6 @@ import ( everestv1alpha1 "github.com/percona/everest-operator/api/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) const ( @@ -66,7 +65,7 @@ func (k *Kubernetes) IsMonitoringConfigUsed(ctx context.Context, namespace, moni }, }), } - list, err := k.client.ListDatabaseClusters(ctx, options) + list, err := k.client.ListDatabaseClusters(ctx, "percona-everest", options) if err != nil { return false, err } @@ -76,39 +75,6 @@ func (k *Kubernetes) IsMonitoringConfigUsed(ctx context.Context, namespace, moni return false, nil } -// SecretNamesFromVMAgent returns a list of secret names as used by VMAgent's remoteWrite password field. -func (k *Kubernetes) SecretNamesFromVMAgent(vmAgent *unstructured.Unstructured) []string { - rws, ok, err := unstructured.NestedSlice(vmAgent.Object, "spec", "remoteWrite") - if err != nil { - // We can ignore the error because it has to be an interface. - k.l.Debug(err) - } - if !ok { - return []string{} - } - - res := make([]string, 0, len(rws)) - for _, rw := range rws { - rw, ok := rw.(map[string]interface{}) - if !ok { - continue - } - - secretName, ok, err := unstructured.NestedString(rw, "basicAuth", "password", "name") - if err != nil { - // We can ignore the error because it has to be a string. - k.l.Debug(err) - continue - } - if !ok { - continue - } - res = append(res, secretName) - } - - return res -} - // GetMonitoringConfigsBySecretName returns a list of monitoring configs which use // the provided secret name. func (k *Kubernetes) GetMonitoringConfigsBySecretName( diff --git a/pkg/kubernetes/vmagent.go b/pkg/kubernetes/vmagent.go deleted file mode 100644 index c1e9d9b7..00000000 --- a/pkg/kubernetes/vmagent.go +++ /dev/null @@ -1,197 +0,0 @@ -// percona-everest-backend -// Copyright (C) 2023 Percona LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package kubernetes - -import ( - "context" - "encoding/json" - "errors" - "fmt" - - corev1 "k8s.io/api/core/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - // VMAgentResourceName is the name of the VMAgent resource in k8s. - VMAgentResourceName = "everest-cluster-monitoring" - vmAgentUsernameSecretName = "everest-cluster-vmagent-username" -) - -// DeployVMAgent deploys a default VMAgent used by Everest. -func (k *Kubernetes) DeployVMAgent(ctx context.Context, secretName, monitoringURL string) error { - k.l.Debug("Creating VMAgent username secret") - _, err := k.CreateSecret(ctx, &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: vmAgentUsernameSecretName, - Namespace: k.namespace, - }, - StringData: map[string]string{ - "username": "api_key", - }, - }) - - if err != nil && !k8serrors.IsAlreadyExists(err) { - return errors.Join(err, errors.New("could not create VMAgent username secret")) - } - - k.l.Debug("Applying VMAgent spec") - vmagent, err := vmAgentSpec(k.namespace, secretName, monitoringURL) - if err != nil { - return errors.Join(err, errors.New("cannot generate VMAgent spec")) - } - - err = k.client.ApplyObject(vmagent) - if err != nil && !k8serrors.IsAlreadyExists(err) { - return errors.Join(err, errors.New("cannot apply VMAgent spec")) - } - k.l.Debug("VMAgent spec has been applied") - - return nil -} - -// DeleteVMAgent deletes the default VMAgent as installed by Everest. -func (k *Kubernetes) DeleteVMAgent() error { - vmagent, err := vmAgentSpec(k.namespace, "", "") - if err != nil { - return errors.Join(err, errors.New("cannot generate VMAgent spec")) - } - - err = k.client.DeleteObject(vmagent) - if err != nil { - return errors.Join(err, errors.New("cannot delete VMAgent")) - } - - return nil -} - -// ListVMAgents returns list of VMAgents. -func (k *Kubernetes) ListVMAgents() (*unstructured.UnstructuredList, error) { - vmAgents := &unstructured.UnstructuredList{} - err := k.client.ListObjects(schema.FromAPIVersionAndKind("operator.victoriametrics.com/v1beta1", "VMAgent"), vmAgents) - return vmAgents, err -} - -// GetVMAgent returns VMAgent by name. -func (k *Kubernetes) GetVMAgent(name string) (*unstructured.Unstructured, error) { - vmAgent := &unstructured.Unstructured{} - err := k.client.GetObject( - schema.FromAPIVersionAndKind("operator.victoriametrics.com/v1beta1", "VMAgent"), name, vmAgent, - ) - return vmAgent, err -} - -const specVMAgent = ` -{ - "kind": "VMAgent", - "apiVersion": "operator.victoriametrics.com/v1beta1", - "metadata": { - "name": %[4]s, - "namespace": %[3]s, - "creationTimestamp": null, - "labels": { - "app.kubernetes.io/managed-by": "everest", - "everest.percona.com/type": "monitoring" - } - }, - "spec": { - "image": {}, - "replicaCount": 1, - "resources": { - "limits": { - "cpu": "500m", - "memory": "850Mi" - }, - "requests": { - "cpu": "250m", - "memory": "350Mi" - } - }, - "remoteWrite": [ - { - "url": %[2]s, - "basicAuth": { - "username": { - "name": %[5]s, - "key": "username" - }, - "password": { - "name": %[1]s, - "key": "apiKey" - } - }, - "tlsConfig": { - "ca": {}, - "cert": {}, - "insecureSkipVerify": true - } - } - ], - "selectAllByDefault": true, - "serviceScrapeSelector": {}, - "serviceScrapeNamespaceSelector": {}, - "podScrapeSelector": {}, - "podScrapeNamespaceSelector": {}, - "probeSelector": {}, - "probeNamespaceSelector": {}, - "staticScrapeSelector": {}, - "staticScrapeNamespaceSelector": {}, - "arbitraryFSAccessThroughSMs": {}, - "extraArgs": { - "memory.allowedPercent": "40" - } - } -}` - -func vmAgentSpec(namespace, secretName, address string) (runtime.Object, error) { //nolint:ireturn - jName, err := json.Marshal(VMAgentResourceName) - if err != nil { - return nil, err - } - - jSecret, err := json.Marshal(secretName) - if err != nil { - return nil, err - } - - jAddress, err := json.Marshal(address + "/victoriametrics/api/v1/write") - if err != nil { - return nil, err - } - - jNamespace, err := json.Marshal(namespace) - if err != nil { - return nil, err - } - - jUser, err := json.Marshal(vmAgentUsernameSecretName) - if err != nil { - return nil, err - } - - manifest := fmt.Sprintf(specVMAgent, jSecret, jAddress, jNamespace, jName, jUser) - - o, _, err := unstructured.UnstructuredJSONScheme.Decode([]byte(manifest), nil, nil) - if err != nil { - return nil, err - } - - return o, nil -}