Code Monkey home page Code Monkey logo

Comments (3)

litaocdl avatar litaocdl commented on May 12, 2024

There are different ways could be considered and want to hear more voice

We do support application database setup during initdb in this way

bootstrap:
    initdb:
       database: app
       owner: app
       secret:
           name: existed-secret-name

we want do similar for recovery and pg_basebackup

#1, one way we can choose is to have database owner secret added redundantly under recovery, pg_basebackup, we also want a new flag to indicates whether user want to setup the application database after restore.

bootstrap:
    recovery:
       database: app
       owner: app
     
bootstrap:
    pg_basebackup:
       database: app
       owner: app

#2, Exract the application database information into new struct, databaseInfo, and change the way initdb reference application db.
The benifit of this way is we reduce the redundant, and it is easy for user to decided setup a application databse or not after recovery (by specific databaseInfo or not )
The concern of this way is , we changed the way to specific appllication database for initDB, which could be a problem for existing clusters.


---
bootstrap:
    initdb:
       databaseinfo:
            name: app
            owner: app
            secret: 
                name: existed-secret-name

---
bootstrap:
    recovery:
       databaseinfo:
            name: app 
            owner: app 
            secret: 
                name: existed-secret-name

---
bootstrap:
    pg_basebackup:
       databaseinfo:
            name: app
            owner: app
            secret: 
                name: existed-secret-name

from cloudnative-pg.

litaocdl avatar litaocdl commented on May 12, 2024

Per the considering backward-compability and discussion, I am going to modify the pr using first solution.

from cloudnative-pg.

litaocdl avatar litaocdl commented on May 12, 2024

Use solution #1 , move code along with e2e test case into PR

from cloudnative-pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.