Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cnpg-cluster): add Values.logLevel #55

Merged
merged 3 commits into from
Nov 12, 2023
Merged
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
1 change: 1 addition & 0 deletions charts/cnpg-cluster/templates/cluster.cnpg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
annotations:
{{- include "cnpg-cluster.annotations" . | nindent 4 }}
spec:
logLevel: {{ .Values.logLevel }}
instances: {{ .Values.instances }}
{{- if .Values.image.repository }}
imageName: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ cluster with enabled backup and recovery:
imageName: ghcr.io/cloudnative-pg/postgis:15
imagePullPolicy: IfNotPresent
instances: 1
logLevel: info
maxSyncReplicas: 0
minSyncReplicas: 0
monitoring:
Expand Down Expand Up @@ -158,6 +159,7 @@ cluster with latest recovery enabled:
imageName: ghcr.io/cloudnative-pg/postgis:15
imagePullPolicy: IfNotPresent
instances: 1
logLevel: info
maxSyncReplicas: 0
minSyncReplicas: 0
monitoring:
Expand Down Expand Up @@ -213,6 +215,7 @@ cluster with recovery enabled:
imageName: ghcr.io/cloudnative-pg/postgis:15
imagePullPolicy: IfNotPresent
instances: 1
logLevel: info
maxSyncReplicas: 0
minSyncReplicas: 0
monitoring:
Expand Down Expand Up @@ -264,6 +267,7 @@ cluster with scheduled backup enabled:
imageName: ghcr.io/cloudnative-pg/postgis:15
imagePullPolicy: IfNotPresent
instances: 1
logLevel: info
maxSyncReplicas: 0
minSyncReplicas: 0
monitoring:
Expand Down
4 changes: 4 additions & 0 deletions charts/cnpg-cluster/tests/cnpg-cluster_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,7 @@ tests:
- template: pooler.cnpg.yaml
matchSnapshot:
path: spec
- template: cluster.cnpg.yaml
equal:
path: spec.logLevel
value: "debug"
2 changes: 2 additions & 0 deletions charts/cnpg-cluster/tests/values/monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
monitoring:
enablePodMonitor: true

logLevel: debug

poolers:
rw:
instances: 3
13 changes: 9 additions & 4 deletions charts/cnpg-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"title": "Number of Postgres instances in the cluster",
"default": "1"
},
"logLevel": {
"type": ["string"],
"title": "The instances log level, one of the following values: error, warning, info (default), debug, trace",
"default": "info"
},
"annotations": {
"type": ["object"],
"title": "CNPG cluster annotations"
Expand Down Expand Up @@ -260,11 +265,11 @@
}
},
"postInitApplicationSQL": {
"type": ["array"],
"type": "array",
"title": "List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty)",
"items": {
"type": "string"
},
"title": "List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty)"
"type": ["string"]
}
},
"postInitApplicationSQLRefs": {
"type": ["object", "null"],
Expand Down
3 changes: 3 additions & 0 deletions charts/cnpg-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# @param {number} [instances] Number of Postgres instances in the cluster
instances: 1

# @param {string} [logLevel] The instances log level, one of the following values: error, warning, info (default), debug, trace
logLevel: info

# @param {object} [annotations] CNPG cluster annotations
annotations: {}

Expand Down
Loading