fix(apps): use proxy on vikunja and fix nocodb request body size (#2511)

This commit is contained in:
Stavros Kois
2022-04-19 13:10:08 +03:00
committed by GitHub
parent 7d37a9d212
commit 4dbe47f187
10 changed files with 120 additions and 13 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ name: nocodb
sources:
- https://hub.docker.com/r/nocodb/nocodb
- https://github.com/nocodb/nocodb
version: 0.0.4
version: 0.0.5
annotations:
truecharts.org/catagories: |
- productivity
+2 -2
View File
@@ -173,8 +173,8 @@ questions:
label: "Request Body Size"
description: "Request body size limit."
schema:
type: int
default: 1048576
type: string
default: "1MB"
- variable: NC_EXPORT_MAX_TIMEOUT
label: "Export Max Timeout"
description: "After timeout, csv gets downloaded in batches."
@@ -0,0 +1,20 @@
{{/* Define the secrets */}}
{{- define "nocodb.secrets" -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: nocodb-secrets
{{- $nocodbprevious := lookup "v1" "Secret" .Release.Namespace "nocodb-secrets" }}
{{- $auth_jwt_token := "" }}
data:
{{- if $nocodbprevious}}
NC_AUTH_JWT_SECRET: {{ index $nocodbprevious.data "NC_AUTH_JWT_SECRET" }}
{{- else }}
{{- $auth_jwt_token := randAlphaNum 32 }}
NC_AUTH_JWT_SECRET: {{ $auth_jwt_token | b64enc }}
{{- end }}
{{- end -}}
@@ -4,5 +4,8 @@
{{/* Render configmap for nocodb */}}
{{- include "nocodb.configmap" . }}
{{/* Render secrets for nocodb */}}
{{- include "nocodb.secrets" . }}
{{/* Render the templates */}}
{{ include "common.postSetup" . }}
+4
View File
@@ -24,6 +24,10 @@ envValueFrom:
secretKeyRef:
name: rediscreds
key: url
NC_AUTH_JWT_SECRET:
secretKeyRef:
name: nocodb-secrets
key: NC_AUTH_JWT_SECRET
envFrom:
- configMapRef:
+1 -1
View File
@@ -25,7 +25,7 @@ maintainers:
name: vikunja
sources:
- https://vikunja.io/docs
version: 0.0.3
version: 0.0.4
annotations:
truecharts.org/catagories: |
- productivity
@@ -0,0 +1,20 @@
{{/* Define the secrets */}}
{{- define "vikunja.secrets" -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: vikunja-secrets
{{- $vikunjaprevious := lookup "v1" "Secret" .Release.Namespace "vikunja-secrets" }}
{{- $jwt_secret := "" }}
data:
{{- if $vikunjaprevious}}
VIKUNJA_SERVICE_JWT_SECRET: {{ index $vikunjaprevious.data "VIKUNJA_SERVICE_JWT_SECRET" }}
{{- else }}
{{- $jwt_secret := randAlphaNum 32 }}
VIKUNJA_SERVICE_JWT_SECRET: {{ $jwt_secret | b64enc }}
{{- end }}
{{- end -}}
+19 -1
View File
@@ -1 +1,19 @@
{{- include "common.all" . }}
{{- include "common.setup" . }}
{{/* Append the general configMap volume to the volumes */}}
{{- define "vikunja.harcodedValues" -}}
persistence:
vikunja-config:
enabled: "true"
mountPath: "/etc/nginx/conf.d/default.conf"
subPath: "nginx-config"
type: "custom"
volumeSpec:
configMap:
name: {{ printf "%v-config" (include "common.names.fullname" .) }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "vikunja.harcodedValues" . | fromYaml) -}}
{{- include "vikunja.secrets" . }}
{{ include "common.postSetup" . }}
@@ -0,0 +1,30 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-config
labels:
{{- include "common.labels" . | nindent 4 }}
data:
nginx-config: |-
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml;
server {
listen 8080;
server_name localhost;
location / {
root /app/vikunja/files;
try_files $uri $uri/ /;
index index.html index.htm;
}
}
+20 -8
View File
@@ -8,6 +8,10 @@ frontendImage:
tag: v0.18.2@sha256:a5b2600ad6854e34d4ded50504b89dc37189ac80140edfbfbcbb25c1124b88ab
pullPolicy: IfNotPresent
nginxImage:
repository: tccr.io/truecharts/nginx
tag: v1.21.6@sha256:e530cd55de35803870c5c54ff5140f79807137937f7cfd9841fba73bee83d554
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
@@ -43,9 +47,6 @@ env:
VIKUNJA_RATELIMIT_PERIOD: 60
VIKUNJA_RATELIMIT_LIMIT: 100
frontendConfig:
VIKUNJA_API_URL: "http://localhost:3456/api/v1"
envValueFrom:
VIKUNJA_DATABASE_HOST:
secretKeyRef:
@@ -63,24 +64,35 @@ envValueFrom:
secretKeyRef:
name: rediscreds
key: redis-password
VIKUNJA_SERVICE_JWT_SECRET:
secretKeyRef:
name: vikunja-secrets
key: VIKUNJA_SERVICE_JWT_SECRET
service:
main:
ports:
main:
port: 10220
targetPort: 80
targetPort: 8080
additionalContainers:
frontend:
name: frontend
image: "{{ .Values.frontendImage.repository }}:{{ .Values.frontendImage.tag }}"
env:
- name: VIKUNJA_API_URL
value: "{{ .Values.frontendConfig.VIKUNJA_API_URL }}"
proxy:
name: proxy
image: "{{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }}"
ports:
- containerPort: 80
- containerPort: 8080
name: main
volumeMounts:
- name: vikunja-config
mountPath: "/etc/nginx/conf.d/default.conf"
subPath: nginx-config
readOnly: true
- name: files
mountPath: "/app/vikunja/files"
persistence:
files: