Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cloud-native-pg,inventory,workflow-manager] Helm charts for CloudNativePG cluster configuration #332

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

Jozefiel
Copy link
Collaborator

@Jozefiel Jozefiel commented Nov 24, 2023

Checklist

  • Title of the PR starts with chart name (e.g. [krakend])
  • Update the documentation if a new value has been added
  • Update chart release notes annotation

@Jozefiel Jozefiel force-pushed the cnpg branch 3 times, most recently from a6f2cd4 to 6b6af91 Compare November 24, 2023 15:24
@Jozefiel Jozefiel force-pushed the cnpg branch 5 times, most recently from 2410e84 to 78f8453 Compare November 27, 2023 12:06
@Jozefiel
Copy link
Collaborator Author

Jozefiel commented Nov 27, 2023

Example of configuration:

  # cat Chart.yaml
  ... 
  - condition: workflow-manager-postgres.enabled
    name: cloud-native-pg
    alias: workflow-manager-postgres
    version: "0.0.1"
    repository: "file://../cloud-native-pg"

  - condition: uniconfig-postgres.enabled
    name: cloud-native-pg
    alias: uniconfig-postgres
    version: "0.0.1"
    repository: "file://../cloud-native-pg"
# cat values.yaml
...
workflow-manager-postgres:
  enabled: true
  name: postgresql

  bootstrap:
    initdb:
      postInitApplicationSQLRefs:

  secrets:
    superuserSecret:
      username: postgres
      password: postgres
    userSecret:
      username: frinx
      password: postgres
    postInitSqlSecret:
      name: post-init-sql-secret
      sql: |-
        CREATE ROLE schellar LOGIN PASSWORD 'schellar';
        GRANT CONNECT ON DATABASE frinx TO schellar;
        CREATE USER schellar_user WITH PASSWORD 'schellar';
        GRANT schellar TO schellar_user;
        CREATE SCHEMA schellar AUTHORIZATION schellar;
        ALTER ROLE schellar SET search_path=schellar;
        ALTER USER schellar_user SET search_path TO schellar;

        CREATE ROLE inventory LOGIN PASSWORD 'inventory';
        GRANT CONNECT ON DATABASE frinx TO inventory;
        CREATE USER inventory_user WITH PASSWORD 'inventory';
        GRANT inventory TO inventory_user;
        CREATE SCHEMA inventory AUTHORIZATION inventory;
        ALTER ROLE inventory SET search_path=inventory;
        ALTER USER inventory_user SET search_path TO inventory;

        CREATE ROLE conductor LOGIN PASSWORD 'conductor';
        GRANT CONNECT ON DATABASE frinx TO conductor;
        CREATE USER conductor_user WITH PASSWORD 'conductor';
        GRANT conductor TO conductor_user;
        CREATE SCHEMA conductor AUTHORIZATION conductor;
        CREATE SCHEMA archive AUTHORIZATION conductor;
        CREATE SCHEMA external AUTHORIZATION conductor;
        ALTER ROLE conductor SET search_path=public,conductor,archive,external;
        ALTER USER conductor_user SET search_path TO conductor,archive,external;

        CREATE ROLE resource LOGIN PASSWORD 'resource';
        GRANT CONNECT ON DATABASE frinx TO resource;
        CREATE USER resource_user WITH PASSWORD 'resource';
        GRANT resource TO resource_user;
        CREATE SCHEMA resource AUTHORIZATION resource;
        ALTER ROLE resource SET search_path=resource;
        ALTER USER resource_user SET search_path TO resource;


uniconfig-postgres:
  enabled: true
  name: uniconfig-postgresql
  bootstrap:
    initdb:
      database: uniconfig
      owner: uniconfigU

  secrets:
    superuserSecret:
      username: postgres
      password: postgres
    userSecret:
      username: uniconfigU
      password: uniconfigP


@Jozefiel Jozefiel marked this pull request as ready for review November 27, 2023 12:18
@Jozefiel Jozefiel changed the title [cloud-native-pg] Helm charts for CloudNativePG cluster configuration [cloud-native-pg,inventory,workflow-manager] Helm charts for CloudNativePG cluster configuration Nov 27, 2023
@Jozefiel Jozefiel merged commit 5231673 into main Nov 28, 2023
3 checks passed
@Jozefiel Jozefiel deleted the cnpg branch November 28, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants