Skip to content

Commit

Permalink
feat: add [read-database] config
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Frayer authored and pfrayer committed Jun 26, 2024
1 parent 6987597 commit f203497
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ docker pull ghcr.io/voxpupuli/puppetdb:7.13.0-v1.2.1
| **PUPPETDB_POSTGRES_DATABASE** | The name of the puppetdb database in postgres<br><br>`puppetdb` |
| **PUPPETDB_USER** | The puppetdb database user<br><br>`puppetdb` |
| **PUPPETDB_PASSWORD** | The puppetdb database password<br><br>`puppetdb` |
| **PUPPETDB_READ_USER** | The puppetdb database read-only user<br><br>`puppetdb_read` |
| **PUPPETDB_READ_PASSWORD** | The puppetdb database read-only password<br><br>`puppetdb_read` |
| **PUPPETDB_NODE_TTL** | Mark as ‘expired’ nodes that haven’t seen any activity (no new catalogs, facts, or reports) in the specified amount of time<br><br>`7d` |
| **PUPPETDB_NODE_PURGE_TTL** | Automatically delete nodes that have been deactivated or expired for the specified amount of time<br><br>`14d` |
| **PUPPETDB_REPORT_TTL** | Automatically delete reports that are older than the specified amount of time<br><br>`14d` |
Expand Down
2 changes: 2 additions & 0 deletions puppetdb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ENV PUPPETDB_POSTGRES_HOSTNAME="postgres" \
WAITFORCERT="" \
PUPPETDB_USER=puppetdb \
PUPPETDB_PASSWORD=puppetdb \
PUPPETDB_READ_USER=puppetdb_read \
PUPPETDB_READ_PASSWORD=puppetdb_read \
PUPPETDB_NODE_TTL=7d \
PUPPETDB_NODE_PURGE_TTL=14d \
PUPPETDB_REPORT_TTL=14d \
Expand Down
5 changes: 5 additions & 0 deletions puppetdb/conf.d/read-database.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
read-database: {
subname: "//"${PUPPETDB_POSTGRES_HOSTNAME}":"${PUPPETDB_POSTGRES_PORT}"/"${PUPPETDB_POSTGRES_DATABASE}
username: ${PUPPETDB_READ_USER}
password: ${PUPPETDB_READ_PASSWORD}
}

0 comments on commit f203497

Please sign in to comment.