Skip to content

Commit d120aa8

Browse files
committed
chore(postgresql-cluster): add plan 4t
1 parent ae37743 commit d120aa8

4 files changed

Lines changed: 130 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
credential:
2+
{{- if (eq .Values.service.type "LoadBalancer") }}
3+
- name: EXTRANET_MASTER_HOST
4+
valueFrom:
5+
serviceRef:
6+
name: {{ include "common.names.fullname" . }}-master
7+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
8+
- name: EXTRANET_REPL_HOST
9+
valueFrom:
10+
serviceRef:
11+
name: {{ template "common.names.fullname" . }}-repl
12+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
13+
{{- end }}
14+
- name: MASTER_HOST
15+
valueFrom:
16+
serviceRef:
17+
name: {{ include "common.names.fullname" . }}-master
18+
jsonpath: '{ .spec.clusterIP }'
19+
- name: REPL_HOST
20+
valueFrom:
21+
serviceRef:
22+
name: {{ include "common.names.fullname" . }}-repl
23+
jsonpath: '{ .spec.clusterIP }'
24+
- name: PASSWORD
25+
valueFrom:
26+
secretKeyRef:
27+
name: {{ template "common.names.fullname" . }}
28+
jsonpath: '{ .data.admin-password }'
29+
- name: USERNAME
30+
valueFrom:
31+
secretKeyRef:
32+
name: {{ template "common.names.fullname" . }}
33+
jsonpath: '{ .data.admin-user }'
34+
- name: PORT
35+
value: 5432
36+
- name: DADABASE
37+
value: postgres
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"imagePullPolicy": {
6+
"type": "string",
7+
"enum": ["Always", "IfNotPresent", "Never"],
8+
"default": "IfNotPresent",
9+
"title": "Image pull policy"
10+
}
11+
}
12+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "standard-4t"
2+
id: 138f8059-a3f6-4efe-a210-09d9ff00f9a9
3+
description: "PostgreSQL Cluster standard-4t plan: Disk 4Ti ,vCPUs 32 , RAM 64G , DB MAX Connection 2000"
4+
displayName: "standard-4t"
5+
bindable: true
6+
maximum_polling_duration: 1800
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
## @param fullnameOverride String to fully override common.names.fullname template
2+
##
3+
fullnameOverride: hb-postgresql-cluster-standard-800
4+
5+
postgresql:
6+
config: |-
7+
# Connectivity
8+
max_connections = 2000
9+
superuser_reserved_connections = 3
10+
11+
# Memory Settings
12+
shared_buffers = '16384 MB'
13+
work_mem = '256 MB'
14+
maintenance_work_mem = '2048 MB'
15+
huge_pages = try # NB! requires also activation of huge pages via kernel params, see here for more: https://www.postgresql.org/docs/current/static/kernel-resources.html#LINUX-HUGE-PAGES
16+
effective_cache_size = '45 GB'
17+
effective_io_concurrency = 100 # concurrent IO only really activated if OS supports posix_fadvise function
18+
random_page_cost = 1.25 # speed of random disk access relative to sequential access (1.0)
19+
20+
# Monitoring
21+
track_io_timing=on # measure exact block IO times
22+
track_functions=pl # track execution times of pl-language procedures if any
23+
24+
# Replication
25+
max_wal_senders = 10
26+
synchronous_commit = on
27+
28+
# Checkpointing:
29+
checkpoint_timeout = '30 min'
30+
checkpoint_completion_target = 0.9
31+
max_wal_size = '32 GB'
32+
min_wal_size = '16 GB'
33+
34+
# WAL writing
35+
wal_compression = on
36+
wal_buffers = -1 # auto-tuned by Postgres till maximum of segment size (16MB by default)
37+
wal_writer_delay = 200ms
38+
wal_writer_flush_after = 1MB
39+
wal_keep_size = '60 GB'
40+
41+
# Background writer
42+
bgwriter_delay = 200ms
43+
bgwriter_lru_maxpages = 100
44+
bgwriter_lru_multiplier = 2.0
45+
bgwriter_flush_after = 0
46+
47+
# Parallel queries:
48+
max_worker_processes = 32
49+
max_parallel_workers_per_gather = 16
50+
max_parallel_maintenance_workers = 16
51+
max_parallel_workers = 32
52+
parallel_leader_participation = on
53+
54+
# Advanced features
55+
enable_partitionwise_join = on
56+
enable_partitionwise_aggregate = on
57+
jit = on
58+
max_slot_wal_keep_size = '1000 MB'
59+
track_wal_io_timing = on
60+
maintenance_io_concurrency = 100
61+
62+
resources:
63+
# If you do want to specify resources, uncomment the following
64+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
65+
limits:
66+
cpu: 32000m
67+
memory: 64Gi
68+
hugepages-2Mi: 80Mi
69+
requests:
70+
cpu: 32000m
71+
memory: 64Gi
72+
73+
persistentVolume:
74+
enabled: true
75+
size: 4Ti

0 commit comments

Comments
 (0)