fix(privatebin): fix errors (#3001)

* privatebin: fix expire.default question default

* privatebin: add workaround for Helm render issue of large ints

* privatebin: fix quoting in conf.php

* privatebin: bump chart version

* privatebin: fix trailing whitespace
This commit is contained in:
Michael Schnerring 2022-06-28 08:06:46 +02:00 committed by GitHub
parent 42a3456022
commit a1c901322f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 13 deletions

View File

@ -26,7 +26,7 @@ sources:
- https://github.com/PrivateBin/PrivateBin
- https://hub.docker.com/r/privatebin/pdo
type: application
version: 0.0.2
version: 0.0.3
annotations:
truecharts.org/catagories: |
- productivity

View File

@ -307,11 +307,9 @@ questions:
description: "Expire value that is selected per default"
schema:
type: string
default: ""
default: "1week"
required: true
enum:
- value: ""
description: "PrivateBin Default"
- value: "5min"
description: "5min"
- value: "10min"

View File

@ -6,9 +6,13 @@ kind: ConfigMap
metadata:
name: {{ include "tc.common.names.fullname" . }}-config
data:
{{/*
Multiply by 1, so large integers aren't rendered in scientific notation
See: https://github.com/helm/helm/issues/1707#issuecomment-1167860346
*/}}
sizelimits-php.ini: |-
upload_max_filesize = {{ .Values.privatebin.main.sizelimit }}
post_max_size = {{ .Values.privatebin.main.sizelimit }}
upload_max_filesize = {{ mul .Values.privatebin.main.sizelimit 1 }}
post_max_size = {{ mul .Values.privatebin.main.sizelimit 1 }}
memory_limit = {{ mul .Values.privatebin.main.sizelimit 2 }}
sizelimits-nginx.conf: |-
client_max_body_size {{ add (div (div .Values.privatebin.main.sizelimit 1024) 1024) 5 }}M;

View File

@ -57,7 +57,11 @@ stringData:
{{- end }}
; size limit per paste or comment in bytes, defaults to 10 Mebibytes
sizelimit = {{ .Values.privatebin.main.sizelimit }}
{{/*
Multiply by 1, so large integers aren't rendered in scientific notation
See: https://github.com/helm/helm/issues/1707#issuecomment-1167860346
*/}}
sizelimit = {{ mul .Values.privatebin.main.sizelimit 1 }}
; template to include, default is "bootstrap" (tpl/bootstrap.php)
template = "{{ .Values.privatebin.main.template }}"
@ -94,7 +98,7 @@ stringData:
; (optional) Let users create a QR code for sharing the paste URL with one click.
; It works both when a new paste is created and when you view a paste.
{{- with .Values.privatebin.main.qrcode }}
qrcode = "{{ . }}"
qrcode = {{ . }}
{{- end }}
; (optional) IP based icons are a weak mechanism to detect if a comment was from
@ -130,7 +134,7 @@ stringData:
; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of
; sha256 in HMAC for the deletion token
{{- with .Values.privatebin.main.zerobincompatibility }}
zerobincompatibility = "{{ . }}"
zerobincompatibility = {{ . }}
{{- end }}
; Enable or disable the warning message when the site is served over an insecure
@ -139,7 +143,7 @@ stringData:
; It is **strongly discouraged** to disable this.
; See https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-it-show-me-an-error-about-an-insecure-connection for more information.
{{- with .Values.privatebin.main.httpwarning }}
httpwarning = "{{ . }}"
httpwarning = {{ . }}
{{- end }}
; Pick compression algorithm or disable it. Only applies to pastes/comments
@ -212,13 +216,13 @@ stringData:
batchsize = {{ .Values.privatebin.purge.batchsize }}
[model]
; example of DB configuration for PostgreSQL
; DB configuration for PostgreSQL
class = Database
[model_options]
dsn = {{ printf "pgsql:host=%v-postgresql;dbname=%v" .Release.Name .Values.postgresql.postgresqlDatabase }}
dsn = "{{ printf "pgsql:host=%v-postgresql;dbname=%v" .Release.Name .Values.postgresql.postgresqlDatabase }}"
tbl = "privatebin_" ; table prefix
usr = "{{ .Values.postgresql.postgresqlUsername }}"
pwd = "{{ .Values.postgresql.postgresqlPassword }}"
pwd = {{ .Values.postgresql.postgresqlPassword }}
opt[12] = true ; PDO::ATTR_PERSISTENT
{{- end }}