-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from adhoc-dev/az-t-42843
[FIX] Move cronjobs to the same node type as pg
- Loading branch information
Showing
13 changed files
with
875 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
annotations: | ||
category: DevOps | ||
apiVersion: v2 | ||
name: adhoc-pg | ||
description: "App de PG para Odoo by Adhoc. IMPORTANTE: configurar en GCP > Discos > Programación de instantáneas (actualmente es snap-us-east-1-nubeadhoc-v2)" | ||
|
||
type: application | ||
|
||
version: 0.20.3 | ||
|
||
appVersion: "2" | ||
|
||
home: "https://github.com/adhoc-dev/helm-charts" | ||
sources: | ||
- "https://github.com/adhoc-dev/" | ||
maintainers: | ||
- name: dbollini | ||
email: [email protected] | ||
- name: jjscarafia | ||
email: [email protected] | ||
- name: azacchino | ||
email: [email protected] | ||
|
||
icon: "https://github.com/adhoc-dev/helm-charts/raw/master/img/postgresql_horizontal_logo_icon.svg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# PG | ||
|
||
App de PG para Odoo by Adhoc. | ||
IMPORTANTE: refactorizamos el chart para poder seleccionar imagen / versión de Postgresql. | ||
Recordar activar políticas de snapshot en GCP para discos persistentes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Version changes | ||
|
||
## *0.20.3* | ||
|
||
Features: | ||
|
||
- Move cronjobs to the same node type as pg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
questions: | ||
# Docker image config | ||
- variable: image.repository | ||
group: "Docker" | ||
label: "Postgres repository" | ||
description: "For eg. postgres" | ||
type: "string" | ||
required: true | ||
default: "postgres" | ||
- variable: image.tag | ||
group: "Docker" | ||
label: "Postgres Image Tag" | ||
type: "string" | ||
required: true | ||
default: "15" | ||
|
||
# Pods limits and requests | ||
- variable: resources.requests.cpu | ||
group: "Resources" | ||
label: "Pods CPU Request (requests.cpu)" | ||
description: "Mismo valor que en PGTune para estimar el resto de los parámetros (los valores por defecto de todo el chart aplican a PG 'principales' vs 'PG 50%' como adhoc-pg-v13-3-0, ver app-readme.md)" | ||
type: "string" | ||
required: true | ||
default: "3000m" | ||
- variable: resources.requests.memory | ||
group: "Resources" | ||
label: "Pods Memory Request (requests.memory)" | ||
description: "Sumamos un 25% al valor usado en PGTune (pgtune 20 / 40GB, request 25 / 50GB)" | ||
type: "string" | ||
required: true | ||
default: "50Gi" | ||
- variable: pg.diskSize | ||
group: "Resources" | ||
label: "Disk size in GB (diskSize)" | ||
description: | | ||
Size of persistent in GB (prod = 500, demo = 100, boggio = 400) | ||
required: true | ||
default: "500" | ||
type: "int" | ||
# NodeTag - Affinity | ||
- variable: nodeTag | ||
group: "Resources" | ||
label: "Node tag for node affinity (nodeTag)" | ||
description: "Tag to schedule pods in nodes" | ||
type: "string" | ||
required: true | ||
default: "pg" | ||
|
||
# PG values | ||
- variable: pg.port | ||
group: "PG values" | ||
description: | | ||
Port where postgres server will listen. | ||
label: "Server Port" | ||
required: true | ||
default: "5432" | ||
type: "int" | ||
- variable: pg.db | ||
group: "PG values" | ||
description: "Postgres Database" | ||
label: "Postgres Database" | ||
required: true | ||
default: "postgres" | ||
type: "string" | ||
- variable: pg.user | ||
group: "PG values" | ||
description: "Postgres User" | ||
label: "Postgres User" | ||
required: true | ||
default: "odoo" | ||
type: "string" | ||
- variable: pg.pass | ||
group: "PG values" | ||
description: "Postgres Password (sólo usar alfanuméricos)" | ||
label: "Postgres Password" | ||
required: true | ||
default: "postgres_password" | ||
type: "password" | ||
- variable: pg.args.maxConn | ||
group: "PG values" | ||
label: "Max Connections (maxConn)" | ||
required: true | ||
default: "2000" | ||
type: "int" | ||
|
||
# PGTune performance parameters | ||
- variable: pg.args.logLinePrefix | ||
group: "PG Logs" | ||
description: | | ||
Defines the prefix for log lines in PostgreSQL. This prefix can include metadata about each log message, such as the date, time, user, database, and session ID, formatting the logs to improve visibility and diagnostics. Use %t for time, %u for user, %d for database, etc., as per PostgreSQL documentation. | ||
label: "Log line prefix format" | ||
required: false | ||
default: '[%u %d] [%p]' | ||
type: "string" | ||
- variable: pg.args.logMinDurationStatement | ||
group: "PG Logs" | ||
description: | | ||
Specifies the minimum duration in milliseconds that a statement must last for PostgreSQL to log its total execution time. Using this parameter helps identify slow queries that may need optimization. Set to 0 to log all queries or use a specific value to capture only queries that exceed this time threshold. | ||
label: "Threshold for tracing slow queries" | ||
required: false | ||
default: "600000" # 10 minutes | ||
type: "int" | ||
- variable: pg.args.sharedBuffers | ||
group: "PGtune performance" | ||
label: "Shared Buffers (sharedBuffers)" | ||
required: false | ||
default: "10GB" | ||
type: "string" | ||
valid_chars: "[0-9]{1,10}(GB|MB)" | ||
- variable: pg.args.ecs | ||
group: "PGtune performance" | ||
label: "Effective Cache Size (ecs)" | ||
required: true | ||
default: "30GB" | ||
type: "string" | ||
valid_chars: "[0-9]{1,10}(GB|MB)" | ||
- variable: pg.args.workMem | ||
group: "PGtune performance" | ||
label: "Work Mem (workMem)" | ||
required: true | ||
default: "18MB" | ||
type: "string" | ||
valid_chars: "[0-9]{1,10}(GB|MB)" | ||
- variable: pg.args.extraArgs | ||
group: "PGtune performance" | ||
label: "Additional configuration parameters (extraArgs)" | ||
required: false | ||
default: "" | ||
type: "string" | ||
- variable: pg.args.maxParallelWorkersPerGather | ||
group: "optionals" | ||
label: "Maximum number of workers per Gather (maxParallelWorkersPerGather)" | ||
description: | | ||
Para demo o PG "al 50%" = 1 | ||
required: false | ||
default: 2 | ||
type: "int" | ||
- variable: pg.args.maxWalSize | ||
group: "optionals" | ||
label: "Sets the WAL size that triggers a checkpoint (maxWalSize)" | ||
required: false | ||
default: "4GB" | ||
type: "string" | ||
valid_chars: "[0-9]{1,10}(GB|MB)" | ||
- variable: pg.args.minWalSize | ||
group: "optionals" | ||
label: "Sets the minimum size to shrink the WAL to (minWalSize)" | ||
required: false | ||
default: "1GB" | ||
type: "string" | ||
valid_chars: "[0-9]{1,10}(GB|MB)" | ||
- variable: pg.args.effectiveIOConcurrency | ||
group: "optionals" | ||
label: "Number of simultaneous requests that can be handled efficiently by the disk subsystem (effectiveIOConcurrency)" | ||
required: false | ||
default: 200 | ||
type: "int" | ||
- variable: pg.args.maintenanceWorkMem | ||
group: "optionals" | ||
label: "Sets the maximum memory to be used for maintenance operations (maintenanceWorkMem)" | ||
required: false | ||
default: "1920MB" | ||
type: "string" | ||
valid_chars: "[0-9]{1,10}(GB|MB)" | ||
- variable: pg.args.maxWorkerProcesses | ||
group: "optionals" | ||
label: "Maximum number of concurrent worker processes (maxWorkerProcesses)" | ||
required: false | ||
default: 4 | ||
type: "int" | ||
- variable: pg.args.maxParallelWorkers | ||
group: "optionals" | ||
label: "Sets the maximum number of parallel workers that can be active at one time (maxParallelWorkers)" | ||
required: false | ||
default: 4 | ||
type: "int" | ||
- variable: pg.args.maxParallelMaintenanceWorkers | ||
group: "optionals" | ||
label: "Sets the maximum number of parallel workers that can be active at one time (maxParallelMaintenanceWorkers)" | ||
required: false | ||
default: 1 | ||
type: "int" | ||
- variable: pg.args.randomPageCost | ||
group: "optionals" | ||
label: "Sets the planner's estimate of the cost of a nonsequentially fetched disk page (randomPageCost)" | ||
required: false | ||
default: "1.1" | ||
type: "string" | ||
valid_chars: "[0-9]{1}\\.[0-9]{1}" | ||
- variable: pg.args.checkpointCompletionTarget | ||
group: "optionals" | ||
label: "Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval (checkpointCompletionTarget)" | ||
required: false | ||
default: "0.9" | ||
type: "string" | ||
valid_chars: "[0-9]{1}\\.[0-9]{1}" | ||
- variable: pg.args.walBuffers | ||
group: "optionals" | ||
label: "Sets the number of disk-page buffers in shared memory for WAL (walBuffers)" | ||
required: false | ||
default: "256MB" | ||
type: "string" | ||
valid_chars: "[0-9]{1,10}(GB|MB)?" | ||
- variable: pg.libs | ||
group: "optionals" | ||
label: "pg shared libraries (libs)" | ||
description: | | ||
Comma separated list without spaces | ||
required: false | ||
default: "pg_stat_statements" | ||
type: "string" | ||
invalid_chars: "\\s+" | ||
- variable: pg.stats.target | ||
group: "stats" | ||
label: "Sets the default statistics target (stats.target)" | ||
required: false | ||
default: 100 | ||
type: "int" | ||
show_if: "pg.libs=pg_stat_statements" | ||
- variable: pg.stats.statementsMax | ||
group: "stats" | ||
label: "Maximum number of statements tracked (statementsMax)" | ||
required: false | ||
default: 10000 | ||
type: "int" | ||
show_if: "pg.libs=pg_stat_statements" | ||
- variable: pg.stats.statementsTrack | ||
group: "stats" | ||
label: "Which statements are counted by the module (statementsTrack)" | ||
required: false | ||
default: "all" | ||
type: "enum" | ||
options: | ||
- all | ||
- none | ||
- top | ||
show_if: "pg.libs=pg_stat_statements" | ||
|
||
# PG Killer | ||
- variable: killer.cron | ||
group: "killer" | ||
label: "Cron schedule for pgkiller" | ||
required: true | ||
# At every 30th minute past every hour from 9 through 19 (ARG_TIMEZONE) | ||
default: "*/30 12-22 * * *" | ||
type: "string" | ||
- variable: killer.max | ||
group: "killer" | ||
label: "Maximum time for idle connections in minutes" | ||
required: true | ||
default: "30" | ||
type: "int" |
Oops, something went wrong.