diff --git a/charts/incubator/privatebin/Chart.yaml b/charts/incubator/privatebin/Chart.yaml index a41511ae7fa..508033ff220 100644 --- a/charts/incubator/privatebin/Chart.yaml +++ b/charts/incubator/privatebin/Chart.yaml @@ -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 diff --git a/charts/incubator/privatebin/questions.yaml b/charts/incubator/privatebin/questions.yaml index 01982226303..28c905f89e3 100644 --- a/charts/incubator/privatebin/questions.yaml +++ b/charts/incubator/privatebin/questions.yaml @@ -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" diff --git a/charts/incubator/privatebin/templates/_configmap.tpl b/charts/incubator/privatebin/templates/_configmap.tpl index 553a394c6c6..7a1b53698df 100644 --- a/charts/incubator/privatebin/templates/_configmap.tpl +++ b/charts/incubator/privatebin/templates/_configmap.tpl @@ -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; diff --git a/charts/incubator/privatebin/templates/_secrets.tpl b/charts/incubator/privatebin/templates/_secrets.tpl index 20c3ff00885..26cb4a96c2e 100644 --- a/charts/incubator/privatebin/templates/_secrets.tpl +++ b/charts/incubator/privatebin/templates/_secrets.tpl @@ -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 }}