TrueChartsClone/charts/enterprise/blocky/templates/_blockyConfig.tpl

224 lines
6.3 KiB
Smarty
Raw Normal View History

{{/* Define the config */}}
{{- define "blocky.configmap" -}}
BREAKING CHANGE refactor: port all enterprise apps to new common and add apps (#7738) * use new common * more porting and add notes.txt * portals * add vaultwarden and authelia to enterprise * some changes * authelia porting * fix grafana * fixup metallb * more * traefik * some initial blocky work * fixes * more work on enterprise train * containers * labels * no message * some more fixes * update questions for new enterprise apps * something * remove postgresql dependency from enterprise train apps * fix some traefik bugs * remove prometheus affinities for now * authelia postgresql fixes * bump and fix install test errors * bump common for probe fixes * fix questions * more questions fixes * add some metrics improvements * some more fixes * whoops * some authelia fixes * fix blocky and authelia * bump common for postgresql fixes * hmm * bump common * bump redis to disable double manifest loading * dont enc secrets for authelia * traefik, blocky and authelia fixes * traefik caps on protocols * bump redis for password fixes * ensure roles are clusterwide * ok * redis/common bumps * remove blocky webui and change config location * whoops * redis fix * more blocky tryouts * authelia whoops * bump blocky version * disable prometheus controller * oops * bump common on prometheus for custom service selector labels * rename prometheus selector labels on service * damn * more work * blocky 100 tryout * blocky root tryout * fix blocky config and remove fsgroup * dont drop caps * Update common.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * revert update for blocky * use old-style mount for blocky * put update back for blocky * add initial postgresl query log support * hmm * small lint * bump common --------- Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Co-authored-by: Stavros kois <s.kois@outlook.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
2023-03-04 12:42:14 +00:00
{{- $config := mustMerge ( include "blocky.config" . | fromYaml ) ( .Values.blockyConfig ) }}
enabled: true
data:
config.yml: |
{{ $config | toYaml | indent 4 }}
{{- end -}}
{{- define "blocky.config" -}}
redis:
address: {{ printf "%v-%v" .Release.Name "redis" }}:6379
password: {{ .Values.redis.creds.redisPassword | trimAll "\"" }}
database: 0
required: true
connectionAttempts: 10
connectionCooldown: 3s
prometheus:
enable: true
path: /metrics
BREAKING CHANGE refactor: port all enterprise apps to new common and add apps (#7738) * use new common * more porting and add notes.txt * portals * add vaultwarden and authelia to enterprise * some changes * authelia porting * fix grafana * fixup metallb * more * traefik * some initial blocky work * fixes * more work on enterprise train * containers * labels * no message * some more fixes * update questions for new enterprise apps * something * remove postgresql dependency from enterprise train apps * fix some traefik bugs * remove prometheus affinities for now * authelia postgresql fixes * bump and fix install test errors * bump common for probe fixes * fix questions * more questions fixes * add some metrics improvements * some more fixes * whoops * some authelia fixes * fix blocky and authelia * bump common for postgresql fixes * hmm * bump common * bump redis to disable double manifest loading * dont enc secrets for authelia * traefik, blocky and authelia fixes * traefik caps on protocols * bump redis for password fixes * ensure roles are clusterwide * ok * redis/common bumps * remove blocky webui and change config location * whoops * redis fix * more blocky tryouts * authelia whoops * bump blocky version * disable prometheus controller * oops * bump common on prometheus for custom service selector labels * rename prometheus selector labels on service * damn * more work * blocky 100 tryout * blocky root tryout * fix blocky config and remove fsgroup * dont drop caps * Update common.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * revert update for blocky * use old-style mount for blocky * put update back for blocky * add initial postgresl query log support * hmm * small lint * bump common --------- Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Co-authored-by: Stavros kois <s.kois@outlook.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
2023-03-04 12:42:14 +00:00
queryLog:
# optional one of: postgresql, csv, csv-client. If empty, log to console
type: {{ .Values.queryLog.type }}
# 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
{{- if eq .Values.queryLog.type "postgresql" }}
target: {{ .Values.cnpg.creds.std }}
{{- else }}
target: {{ .Values.queryLog.target }}
{{- end }}
# if > 0, deletes log files which are older than ... days
logRetentionDays: {{ .Values.queryLog.logRetentionDays | default 0 }}
# optional: Max attempts to create specific query log writer
creationAttempts: {{ .Values.queryLog.creationAttempts | default 3 }}
# optional: Time between the creation attempts
creationCooldown: {{ .Values.queryLog.creationAttempts | default "2s" }}
upstream:
default:
{{- .Values.defaultUpstreams | toYaml | nindent 8 }}
{{- range $id, $value := .Values.upstreams }}
{{ $value.name }}:
{{- $value.dnsservers | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.service.dnsudp.enabled }}
port: {{ .Values.service.dnsudp.ports.dnsudp.targetPort }}
{{- end }}
{{- if .Values.service.dot.enabled }}
tlsPort: {{ .Values.service.dot.ports.dot.targetPort }}
{{- end }}
BREAKING CHANGE refactor: port all enterprise apps to new common and add apps (#7738) * use new common * more porting and add notes.txt * portals * add vaultwarden and authelia to enterprise * some changes * authelia porting * fix grafana * fixup metallb * more * traefik * some initial blocky work * fixes * more work on enterprise train * containers * labels * no message * some more fixes * update questions for new enterprise apps * something * remove postgresql dependency from enterprise train apps * fix some traefik bugs * remove prometheus affinities for now * authelia postgresql fixes * bump and fix install test errors * bump common for probe fixes * fix questions * more questions fixes * add some metrics improvements * some more fixes * whoops * some authelia fixes * fix blocky and authelia * bump common for postgresql fixes * hmm * bump common * bump redis to disable double manifest loading * dont enc secrets for authelia * traefik, blocky and authelia fixes * traefik caps on protocols * bump redis for password fixes * ensure roles are clusterwide * ok * redis/common bumps * remove blocky webui and change config location * whoops * redis fix * more blocky tryouts * authelia whoops * bump blocky version * disable prometheus controller * oops * bump common on prometheus for custom service selector labels * rename prometheus selector labels on service * damn * more work * blocky 100 tryout * blocky root tryout * fix blocky config and remove fsgroup * dont drop caps * Update common.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * revert update for blocky * use old-style mount for blocky * put update back for blocky * add initial postgresl query log support * hmm * small lint * bump common --------- Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Co-authored-by: Stavros kois <s.kois@outlook.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
2023-03-04 12:42:14 +00:00
{{- if .Values.service.main.enabled }}
httpPort: {{ .Values.service.main.ports.main.targetPort }}
{{- end }}
{{- if .Values.service.https.enabled }}
httpsPort: {{ .Values.service.https.ports.https.targetPort }}
{{- end }}
BREAKING CHANGE refactor: port all enterprise apps to new common and add apps (#7738) * use new common * more porting and add notes.txt * portals * add vaultwarden and authelia to enterprise * some changes * authelia porting * fix grafana * fixup metallb * more * traefik * some initial blocky work * fixes * more work on enterprise train * containers * labels * no message * some more fixes * update questions for new enterprise apps * something * remove postgresql dependency from enterprise train apps * fix some traefik bugs * remove prometheus affinities for now * authelia postgresql fixes * bump and fix install test errors * bump common for probe fixes * fix questions * more questions fixes * add some metrics improvements * some more fixes * whoops * some authelia fixes * fix blocky and authelia * bump common for postgresql fixes * hmm * bump common * bump redis to disable double manifest loading * dont enc secrets for authelia * traefik, blocky and authelia fixes * traefik caps on protocols * bump redis for password fixes * ensure roles are clusterwide * ok * redis/common bumps * remove blocky webui and change config location * whoops * redis fix * more blocky tryouts * authelia whoops * bump blocky version * disable prometheus controller * oops * bump common on prometheus for custom service selector labels * rename prometheus selector labels on service * damn * more work * blocky 100 tryout * blocky root tryout * fix blocky config and remove fsgroup * dont drop caps * Update common.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * Update values.yaml Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> * revert update for blocky * use old-style mount for blocky * put update back for blocky * add initial postgresl query log support * hmm * small lint * bump common --------- Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Co-authored-by: Stavros kois <s.kois@outlook.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
2023-03-04 12:42:14 +00:00
{{- if .Values.certFile }}
certFile: {{ .Values.certFile }}
{{- end }}
{{- if .Values.keyFile }}
keyFile: {{ .Values.keyFile }}
{{- end }}
{{- if .Values.logLevel }}
logLevel: {{ .Values.logLevel }}
{{- end }}
{{- if .Values.logTimestamp }}
logTimestamp: {{ .Values.logTimestamp }}
{{- end }}
{{- if .Values.logPrivacy }}
logPrivacy: {{ .Values.logPrivacy }}
{{- end }}
{{- if .Values.dohUserAgent }}
dohUserAgent: {{ .Values.dohUserAgent }}
{{- end }}
{{- if .Values.minTlsServeVersion }}
minTlsServeVersion: {{ .Values.minTlsServeVersion }}
{{- end }}
caching:
{{ toYaml .Values.caching | indent 2 }}
{{- if .Values.hostsFile.enabled }}
{{ $hostsfile := omit .Values.hostsFile "enabled" }}
hostsFile:
{{ toYaml $hostsfile | indent 2 }}
{{- end }}
{{- if or .Values.bootstrapDns.upstream .Values.bootstrapDns.ips }}
bootstrapDns:
{{- if .Values.bootstrapDns.upstream }}
upstream: {{ .Values.bootstrapDns.upstream }}
{{- end }}
{{- if .Values.bootstrapDns.ips }}
ips:
{{- range $id, $value := .Values.bootstrapDns.ips }}
- {{ $value }}
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.filtering.filtering }}
filtering:
{{- if .Values.filtering.ips }}
queryTypes:
{{- range $id, $value := .Values.filtering.ips }}
- {{ $value }}
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.customDNS.filterUnmappedTypes .Values.customDNS.customTTL .Values.customDNS.rewrite .Values.customDNS.mapping }}
customDNS:
{{- if .Values.customDNS.upstream }}
upstream: {{ .Values.customDNS.upstream }}
{{- end }}
{{- if .Values.customDNS.customTTL }}
customTTL: {{ .Values.customDNS.customTTL }}
{{- end }}
{{- if .Values.customDNS.rewrite }}
rewrite:
{{- range $id, $value := .Values.customDNS.rewrite }}
{{ $value.in }}: {{ $value.out }}
{{- end }}
{{- end }}
{{- if .Values.customDNS.mapping }}
mapping:
{{- range $id, $value := .Values.customDNS.mapping }}
{{ $value.domain }}: {{ $value.dnsserver }}
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.clientLookup.upstream .Values.clientLookup.ips }}
clientLookup:
{{- if .Values.clientLookup.upstream }}
upstream: {{ .Values.clientLookup.upstream }}
{{- end }}
{{- if .Values.clientLookup.ips }}
singleNameOrder:
{{- range $id, $value := .Values.clientLookup.ips }}
- {{ $value }}
{{- end }}
{{- end }}
{{- if .Values.clientLookup.clients }}
clients:
{{- range $id, $value := .Values.clientLookup.clients }}
{{ $value.domain }}:
{{- range $id, $value := .ips }}
- {{ $value }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.conditional.rewrite .Values.conditional.mapping ( and .Values.k8sgateway.enabled .Values.k8sgateway.domains ) }}
conditional:
{{- if .Values.conditional.rewrite }}
rewrite:
{{- range $id, $value := .Values.conditional.rewrite }}
{{ $value.in }}: {{ $value.out }}
{{- end }}
{{- end }}
{{- if or .Values.conditional.mapping ( and .Values.k8sgateway.enabled .Values.k8sgateway.domains ) }}
mapping:
{{- if and .Values.k8sgateway.enabled .Values.k8sgateway.domains }}
{{- range $id, $value := .Values.k8sgateway.domains }}
{{ .domain }}: 127.0.0.1:{{ $.Values.service.k8sgateway.ports.k8sgateway.targetPort }}
{{- end }}
{{- end }}
{{- range $id, $value := .Values.conditional.mapping }}
{{ $value.domain }}: {{ $value.dnsserver }}
{{- end }}
{{- end }}
{{- end }}
blocking:
blockType: {{ .Values.blocking.blockType }}
blockTTL: {{ .Values.blocking.blockTTL }}
refreshPeriod: {{ .Values.blocking.refreshPeriod }}
downloadTimeout: {{ .Values.blocking.downloadTimeout }}
downloadAttempts: {{ .Values.blocking.downloadAttempts }}
downloadCooldown: {{ .Values.blocking.downloadCooldown }}
failStartOnListError: {{ .Values.blocking.failStartOnListError }}
processingConcurrency: {{ .Values.blocking.processingConcurrency }}
{{- if .Values.blocking.whitelist }}
whiteLists:
{{- range $id, $value := .Values.blocking.whitelist }}
{{ $value.name }}:
{{- $value.lists | toYaml | nindent 10 }}
{{- end }}
{{- end }}
{{- if .Values.blocking.blacklist }}
blackLists:
{{- range $id, $value := .Values.blocking.blacklist }}
{{ $value.name }}:
{{- $value.lists | toYaml | nindent 10 }}
{{- end }}
{{- end }}
{{- if .Values.blocking.clientGroupsBlock }}
clientGroupsBlock:
{{- range $id, $value := .Values.blocking.clientGroupsBlock }}
{{ $value.name }}:
{{- $value.groups | toYaml | nindent 10 }}
{{- end }}
{{- end }}
{{- end -}}