IssueRaiser

[Feature]: managing cnpg in GitOps workflows (FluxCD, ArgoCD ...)

### Is there an existing issue already for this feature request/idea? - [X] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. ### What problem is this feature going to solve? Why should it be added? In kubernetes cluster manager using gitops tools like FluxCD, I faced a really annoying limiation, especially for restoring db cluster, which is the following: When defining a CNPG cluster resource for a db, we specify the initialization mode for the cluster of the database. There are two options: initdb: This mode creates an empty database without any data. Recovery: This mode restores the database from a backup in object storage. In the initdb mode, if the database crashes at some point and we need to restore it, we would have to restore it manually. However, since the database is managed by FluxCD, it will automatically recreate the cluster and initialize it without any data during the next reconciliation. This makes restoration impossible in this scenario it may seem to work momentarily, but all data will be lost shortly after (next FluxCD reconcialiation). On the other hand, using the recovery mode is a good solution for restoring databases after a failure. However, for newly created databases, the CNPG cluster needs to be initialized in initdb mode. If we do this, we encounter the same problem as before—FluxCD will recreate an empty database, making it difficult to restore any existing

Posted by relhajja on Oct 9, 2024, 11:07 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

ux (Sysadmin)

[Feature]: managing cnpg in GitOps workflows (FluxCD, ArgoCD ...)

relhajjaOct 9, 2024, 11:07 AM

### Is there an existing issue already for this feature request/idea? - [X] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. ### What problem is this feature going to solve? Why should it be added? In kubernetes cluster manager using gitops tools like FluxCD, I faced a really annoying limiation, especially for restoring db cluster, which is the following: When defining a CNPG cluster resource for a db, we specify the initialization mode for the cluster of the database. There are two options: initdb: This mode creates an empty database without any data. Recovery: This mode restores the database from a backup in object storage. In the initdb mode, if the database crashes at some point and we need to restore it, we would have to restore it manually. However, since the database is managed by FluxCD, it will automatically recreate the cluster and initialize it without any data during the next reconciliation. This makes restoration impossible in this scenario it may seem to work momentarily, but all data will be lost shortly after (next FluxCD reconcialiation). On the other hand, using the recovery mode is a good solution for restoring databases after a failure. However, for newly created databases, the CNPG cluster needs to be initialized in initdb mode. If we do this, we encounter the same problem as before—FluxCD will recreate an empty database, making it difficult to restore any existing

Comments (0)

No comments yet. Start the discussion.

Comment on this issue