feat(blocky): add support for more query logging options, including postgresql (#7760)
* feat(blocky): add support for more query logging options, including postgresql * std fix * handle database differently
This commit is contained in:
@@ -3,11 +3,11 @@ appVersion: "0.20.0"
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: common
|
- name: common
|
||||||
repository: https://library-charts.truecharts.org
|
repository: https://library-charts.truecharts.org
|
||||||
version: 12.2.20
|
version: 12.2.22
|
||||||
- condition: redis.enabled
|
- condition: redis.enabled
|
||||||
name: redis
|
name: redis
|
||||||
repository: https://deps.truecharts.org
|
repository: https://deps.truecharts.org
|
||||||
version: 6.0.11
|
version: 6.0.13
|
||||||
description: Blocky is a DNS proxy, DNS enhancer and ad-blocker for the local network written in Go
|
description: Blocky is a DNS proxy, DNS enhancer and ad-blocker for the local network written in Go
|
||||||
home: https://truecharts.org/charts/enterprise/blocky
|
home: https://truecharts.org/charts/enterprise/blocky
|
||||||
icon: https://truecharts.org/img/hotlink-ok/chart-icons/blocky.png
|
icon: https://truecharts.org/img/hotlink-ok/chart-icons/blocky.png
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
queryLog:
|
||||||
|
# optional one of: mysql, postgresql, csv, csv-client. If empty, log to console
|
||||||
|
type: "postgresql"
|
||||||
@@ -547,6 +547,48 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: 30m
|
default: 30m
|
||||||
|
- variable: queryLog
|
||||||
|
group: App Configuration
|
||||||
|
label: Query Logging configuration
|
||||||
|
schema:
|
||||||
|
additional_attrs: true
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: type
|
||||||
|
label: Type
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
enum:
|
||||||
|
- value: ""
|
||||||
|
description: Console
|
||||||
|
- value: postgresql
|
||||||
|
description: postgresql
|
||||||
|
- value: csv
|
||||||
|
description: csv
|
||||||
|
- value: csv-client
|
||||||
|
description: csv-client
|
||||||
|
- variable: target
|
||||||
|
label: Target
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
show_if: [["type", "!=", "postgresql"]]
|
||||||
|
default: "/var/log/something"
|
||||||
|
- variable: logRetentionDays
|
||||||
|
label: Log Retention Days
|
||||||
|
schema:
|
||||||
|
type: int
|
||||||
|
default: 0
|
||||||
|
- variable: creationAttempts
|
||||||
|
label: Creation Attempts
|
||||||
|
schema:
|
||||||
|
type: int
|
||||||
|
default: 3
|
||||||
|
- variable: creationCooldown
|
||||||
|
label: Creation Cooldown
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: 2s
|
||||||
- variable: k8sgateway
|
- variable: k8sgateway
|
||||||
group: App Configuration
|
group: App Configuration
|
||||||
label: k8s-Gateway Configuration
|
label: k8s-Gateway Configuration
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ queryLog:
|
|||||||
# directory (should be mounted as volume in docker) for csv, db connection string for mysql/postgresql
|
# directory (should be mounted as volume in docker) for csv, db connection string for mysql/postgresql
|
||||||
#postgresql target: postgres://user:password@db_host_or_ip:5432/db_name
|
#postgresql target: postgres://user:password@db_host_or_ip:5432/db_name
|
||||||
{{- if eq .Values.queryLog.type "postgresql" }}
|
{{- if eq .Values.queryLog.type "postgresql" }}
|
||||||
target: {{ .Values.cnpg.creds.std }}
|
target: {{ .Values.cnpg.main.creds.std }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
target: {{ .Values.queryLog.target }}
|
target: {{ .Values.queryLog.target }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{{/* Make sure all variables are set properly */}}
|
{{/* Make sure all variables are set properly */}}
|
||||||
|
{{- if eq .Values.queryLog.type "postgresql" -}}
|
||||||
|
{{- $_ := set .Values.cnpg.main "enabled" true -}}
|
||||||
|
{{- end }}
|
||||||
{{- include "tc.v1.common.loader.init" . }}
|
{{- include "tc.v1.common.loader.init" . }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ redis:
|
|||||||
queryLog:
|
queryLog:
|
||||||
# optional one of: mysql, postgresql, csv, csv-client. If empty, log to console
|
# optional one of: mysql, postgresql, csv, csv-client. If empty, log to console
|
||||||
type: ""
|
type: ""
|
||||||
# directory (should be mounted as volume in docker) for csv, db connection string for mysql/postgresql
|
# directory (should be mounted as volume in docker) for csv, db connection string for mysql, ignored for included postgresql
|
||||||
# target: /var/log/something
|
# target: /var/log/something
|
||||||
# postgresql target: postgres://user:password@db_host_or_ip:5432/db_name
|
# postgresql target: postgres://user:password@db_host_or_ip:5432/db_name
|
||||||
# if > 0, deletes log files which are older than ... days
|
# if > 0, deletes log files which are older than ... days
|
||||||
@@ -362,6 +362,6 @@ queryLog:
|
|||||||
|
|
||||||
cnpg:
|
cnpg:
|
||||||
main:
|
main:
|
||||||
enabled: true
|
enabled: false
|
||||||
user: blocky
|
user: blocky
|
||||||
database: blocky
|
database: blocky
|
||||||
|
|||||||
Reference in New Issue
Block a user