Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ expr: |
) or (
# Subscription is enabled but stuck (no worker process with significant lag)
label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_enabled), "cluster", "$1", "job", ".+/(.+)") == 1
and label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_pid), "cluster", "$1", "job", ".+/(.+)") == ""
and label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_pid), "cluster", "$1", "job", ".+/(.+)") <= 0
and label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_buffered_lag_bytes), "cluster", "$1", "job", ".+/(.+)") / 1024^3 > 0.1
)
for: 15m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ expr: |
) or (
# Subscription is enabled but stuck (no worker process with significant lag)
label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_enabled), "cluster", "$1", "job", ".+/(.+)") == 1
and label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_pid), "cluster", "$1", "job", ".+/(.+)") == ""
and label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_pid), "cluster", "$1", "job", ".+/(.+)") <= 0
and label_replace(max by (namespace, job, subname) (cnpg_pg_stat_subscription_buffered_lag_bytes), "cluster", "$1", "job", ".+/(.+)") / 1024^3 > 0.1
)
for: 5m
Expand Down
6 changes: 4 additions & 2 deletions charts/cluster/templates/_barman_object_store.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
{{- end }}

{{- if or (.scope.endpointCA.create) (.scope.endpointCA.name) }}
{{- $endpointCAName := coalesce .scope.endpointCA.name (printf "%s-ca-bundle" .chartFullname) }}
{{- $endpointCAKey := default "ca-bundle.crt" .scope.endpointCA.key }}
endpointCA:
name: {{ .scope.endpointCA.name }}
key: {{ .scope.endpointCA.key }}
name: {{ $endpointCAName }}
key: {{ $endpointCAKey }}
{{- end }}

{{- if .scope.destinationPath }}
Expand Down
17 changes: 9 additions & 8 deletions charts/cluster/templates/databases.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- range .Values.databases }}
{{- $dbOwner := default .name .owner }}
---
apiVersion: postgresql.cnpg.io/v1
kind: Database
Expand All @@ -19,18 +20,18 @@ spec:
cluster:
name: {{ include "cluster.fullname" $ }}
ensure: {{ .ensure | default "present" }}
owner: {{ .owner }}
owner: {{ $dbOwner }}
template: {{ .template | default "template1" }}
encoding: {{ .encoding | default "UTF8" }}
databaseReclaimPolicy: {{ .databaseReclaimPolicy | default "retain" }}
{{- with .isTemplate }}
isTemplate: {{ . }}
{{- if hasKey . "isTemplate" }}
isTemplate: {{ .isTemplate }}
{{- end }}
{{- with .allowConnections }}
allowConnections: {{ . }}
{{- if hasKey . "allowConnections" }}
allowConnections: {{ .allowConnections }}
{{- end }}
{{- with .connectionLimit }}
connectionLimit: {{ . }}
{{- if hasKey . "connectionLimit" }}
connectionLimit: {{ .connectionLimit }}
{{- end }}
{{- with .tablespace }}
tablespace: {{ . }}
Expand Down Expand Up @@ -63,7 +64,7 @@ spec:
schemas:
{{- range . }}
- name: {{ .name }}
owner: {{ .owner }}
owner: {{ default $dbOwner .owner }}
ensure: {{ .ensure | default "present" }}
{{- end }}
{{- end }}
Expand Down