JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q48222F
  • License ISC

Grucloud module for the k8s postgres

Package Exports

  • @grucloud/module-k8s-postgres

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@grucloud/module-k8s-postgres) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GruCloud Module for Postgres on K8s

This module defines the kubernetes resources required to run a Postgres database.

Graph

Config

The config.js file gathers the configuration for this module.

Resources

This module exports 3 kubernetes resources through the createResources function from the iac.js file.

ConfigMap

Define variables for the StatefulSet: username, database name and password.

StatefulSet

Define the postgres stateful set:

  • image name, version and port
  • readinessProbe and livenessProbe using the psql command to find out if the database is up and running
  • persistent volume claim to set the size of the disk.

Service

A headless service forwards traffic to the postgres database. The idea behind using a headless service is to get a unique dns entry that can be referenced by the backend and other (micro)services.

Usage

This module is being used in the following projects: