From 5da6a278b6b32d8c98a7b91c3c1a3f44016f25f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20K=C3=A4stner?= <8317993+fabiankaestner@users.noreply.github.com> Date: Mon, 18 Oct 2021 12:56:21 +0200 Subject: [PATCH 1/2] Make multitenancy configurable in values.yaml, set selfHosted by default. --- .../templates/app-service-deployment.yaml | 2 +- .../templates/worker-service-deployment.yaml | 2 +- hosting/kubernetes/budibase/values.yaml | 41 ++++++++++--------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/hosting/kubernetes/budibase/templates/app-service-deployment.yaml b/hosting/kubernetes/budibase/templates/app-service-deployment.yaml index bce532016a..fb26d329a1 100644 --- a/hosting/kubernetes/budibase/templates/app-service-deployment.yaml +++ b/hosting/kubernetes/budibase/templates/app-service-deployment.yaml @@ -77,7 +77,7 @@ spec: - name: PORT value: {{ .Values.services.apps.port | quote }} - name: MULTI_TENANCY - value: "1" + value: {{ .Values.globals.multiTenancy | quote }} - name: REDIS_PASSWORD value: {{ .Values.services.redis.password }} - name: REDIS_URL diff --git a/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml b/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml index 563b1b4193..77e8981efc 100644 --- a/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml +++ b/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml @@ -74,7 +74,7 @@ spec: - name: PORT value: {{ .Values.services.worker.port | quote }} - name: MULTI_TENANCY - value: "1" + value: {{ .Values.globals.multiTenancy | quote }} - name: REDIS_PASSWORD value: {{ .Values.services.redis.password | quote }} - name: REDIS_URL diff --git a/hosting/kubernetes/budibase/values.yaml b/hosting/kubernetes/budibase/values.yaml index 774f7ea102..bd9f6543b3 100644 --- a/hosting/kubernetes/budibase/values.yaml +++ b/hosting/kubernetes/budibase/values.yaml @@ -24,10 +24,12 @@ serviceAccount: podAnnotations: {} -podSecurityContext: {} +podSecurityContext: + {} # fsGroup: 2000 -securityContext: {} +securityContext: + {} # capabilities: # drop: # - ALL @@ -42,23 +44,24 @@ service: ingress: enabled: false aws: false - nginx: true - certificateArn: "" + nginx: true + certificateArn: "" className: "" - annotations: + annotations: kubernetes.io/ingress.class: nginx hosts: - host: # change if using custom domain paths: - - path: / - pathType: Prefix - backend: - service: - name: proxy-service - port: - number: 10000 + - path: / + pathType: Prefix + backend: + service: + name: proxy-service + port: + number: 10000 -resources: {} +resources: + {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -89,10 +92,11 @@ globals: sentryDSN: "" posthogToken: "" logLevel: info - selfHosted: "" - accountPortalUrl: "" + selfHosted: "1" # set to 0 for budibase cloud environment, set to 1 for self-hosted setup + multiTenancy: "0" # set to 0 to disable multiple orgs, set to 1 to enable multiple orgs + accountPortalUrl: "" accountPortalApiKey: "" - cookieDomain: "" + cookieDomain: "" platformUrl: "" createSecrets: true # creates an internal API key, JWT secrets and redis password for you @@ -128,7 +132,7 @@ services: # password: "" # only change if pointing to existing couch server port: 5984 storage: 100Mi - + redis: enabled: true # disable if using external redis port: 6379 @@ -136,7 +140,7 @@ services: url: "" # only change if pointing to existing redis cluster and enabled: false password: "budibase" # recommended to override if using built-in redis storage: 100Mi - + objectStore: minio: true browser: true @@ -147,4 +151,3 @@ services: region: "" # AWS_REGION if using S3 or existing minio secret url: "" # only change if pointing to existing minio cluster and minio: false storage: 100Mi - From ccdc5e7047b8d757268ef256ff9c092da6b96879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20K=C3=A4stner?= <8317993+fabiankaestner@users.noreply.github.com> Date: Mon, 18 Oct 2021 13:02:28 +0200 Subject: [PATCH 2/2] Add default value for minio-service URL --- .../kubernetes/budibase/templates/app-service-deployment.yaml | 4 ++++ .../budibase/templates/worker-service-deployment.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/hosting/kubernetes/budibase/templates/app-service-deployment.yaml b/hosting/kubernetes/budibase/templates/app-service-deployment.yaml index fb26d329a1..fcb8278ea5 100644 --- a/hosting/kubernetes/budibase/templates/app-service-deployment.yaml +++ b/hosting/kubernetes/budibase/templates/app-service-deployment.yaml @@ -73,7 +73,11 @@ spec: name: {{ template "budibase.fullname" . }} key: objectStoreSecret - name: MINIO_URL + {{ if .Values.services.objectStore.url }} value: {{ .Values.services.objectStore.url }} + {{ else }} + value: http://minio-service:{{ .Values.services.objectStore.port }} + {{ end }} - name: PORT value: {{ .Values.services.apps.port | quote }} - name: MULTI_TENANCY diff --git a/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml b/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml index 77e8981efc..101f0c9605 100644 --- a/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml +++ b/hosting/kubernetes/budibase/templates/worker-service-deployment.yaml @@ -70,7 +70,11 @@ spec: name: {{ template "budibase.fullname" . }} key: objectStoreSecret - name: MINIO_URL + {{ if .Values.services.objectStore.url }} value: {{ .Values.services.objectStore.url }} + {{ else }} + value: http://minio-service:{{ .Values.services.objectStore.port }} + {{ end }} - name: PORT value: {{ .Values.services.worker.port | quote }} - name: MULTI_TENANCY