bcgov/common-forms-toolkit

View on GitHub
openshift/patroni.secret.yaml

Summary

Maintainability
Test Coverage
---
apiVersion: v1
kind: Template
metadata:
  annotations:
    description: Patroni Postgresql database cluster secret generator
    iconClass: icon-postgresql
    openshift.io/display-name: Patroni Postgresql
    openshift.io/long-description: This template creates a patroni postgresql secret.
    tags: postgresql
  name: patroni-pgsql-secret
labels:
  app.kubernetes.io/instance: "${INSTANCE}"
  app.kubernetes.io/component: database
  app.kubernetes.io/name: patroni
  app.kubernetes.io/managed-by: template
  app.kubernetes.io/version: "12"
  cluster-name: "${INSTANCE}"
objects:
  - apiVersion: v1
    kind: Secret
    metadata:
      name: "${NAME}-${INSTANCE}-secret"
    stringData:
      replication-username: "${PATRONI_REPLICATION_USERNAME}"
      replication-password: "${PATRONI_REPLICATION_PASSWORD}"
      superuser-username: "${PATRONI_SUPERUSER_USERNAME}"
      superuser-password: "${PATRONI_SUPERUSER_PASSWORD}"
      app-db-name: "${APP_DB_NAME}"
      app-db-username: "${APP_DB_USERNAME}"
      app-db-password: "${APP_DB_PASSWORD}"
parameters:
  - name: NAME
    description: The name of the application for labelling all artifacts.
    displayName: Application Name
    required: true
    value: patroni
  - name: INSTANCE
    description: The name of this instance of the application
    displayName: Application Instance Name
    required: true
  - name: APP_DB_NAME
    description: Name of the application database
    displayName: Application Database Name
    required: true
    value: app
  - name: APP_DB_USERNAME
    description: Username of the application database
    displayName: Application Database Username
    required: true
    value: app
  - name: APP_DB_PASSWORD
    description: Password of the application database
    displayName: Application Database Password
    generate: expression
    from: "[a-zA-Z0-9]{32}"
    required: true
  - name: PATRONI_SUPERUSER_USERNAME
    description: Username of the superuser account for initialization.
    displayName: Superuser Username
    required: true
    value: postgres
  - name: PATRONI_SUPERUSER_PASSWORD
    description: Password of the superuser account for initialization.
    displayName: Superuser Passsword
    generate: expression
    from: "[a-zA-Z0-9]{32}"
    required: true
  - name: PATRONI_REPLICATION_USERNAME
    description: Username of the replication account for initialization.
    displayName: Replication Username
    required: true
    value: replication
  - name: PATRONI_REPLICATION_PASSWORD
    description: Password of the replication account for initialization.
    displayName: Repication Passsword
    generate: expression
    from: "[a-zA-Z0-9]{32}"
    required: true