Skip to content

Commit

Permalink
Merge pull request #618 from lowcoder-org/deployment_updates
Browse files Browse the repository at this point in the history
fix: updated helm chart to reflect all recent changes
  • Loading branch information
FalkWolsky authored Jan 11, 2024
2 parents b20c97f + 07b1484 commit 89b1acd
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 176 deletions.
1 change: 1 addition & 0 deletions deploy/docker/docker-compose-multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ services:
# - on linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256
#
LOWCODER_API_KEY_SECRET: "5a41b090758b39b226603177ef48d73ae9839dd458ccb7e66f7e7cc028d5a50b"
COMMON_WORKSPACE_MODE: SAAS
restart: unless-stopped
depends_on:
- mongodb
Expand Down
1 change: 1 addition & 0 deletions deploy/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ services:
# frontend parameters
LOWCODER_MAX_REQUEST_SIZE: 20m
LOWCODER_MAX_QUERY_TIMEOUT: 120
COMMON_WORKSPACE_MODE: SAAS
volumes:
- ./lowcoder-stacks:/lowcoder-stacks
- ./lowcoder-stacks/assets:/lowcoder/assets
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for Kubernetes for installing lowcoder

type: application
# Chart version (change every time you make changes to the chart)
version: 0.1.0
version: 1.0.0

# Lowcoder version
appVersion: "latest"
Expand Down
51 changes: 22 additions & 29 deletions deploy/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,28 @@ $ helm delete -n lowcoder my-lowcoder

## Parameters

## Global

| Name | Description | Value |
| --------------------------------------- | --------------------------------------------------------------------------------- | -------------- |
| `global.config.workspaceMode` | Sets the workspace mode. Possible types are: SAAS, ENTERPRISE | `SAAS` |
| `global.config.userId` | User ID of user running Lowcoder server application in container | `9001` |
| `global.config.groupId` | Group ID of user running Lowcoder server application in container | `9001` |
| `global.config.corsAllowedDomains` | CORS allowed domains | `*` |
| `global.config.enableUserSignUp` | Enable users signing up to lowcoder via login page | `true` |
| `global.config.encryption.password` | Encryption password - CHANGE IT! | `lowcoder.org` |
| `global.config.encryption.salt` | Encryption salt - CHANGE IT! | `lowcoder.org` |
| `global.config.apiKeySecret` | API-KEY secret, should be a string of at least 32 random characters - CHANGE IT | `5a41b090758b39b226603177ef48d73ae9839dd458ccb7e66f7e7cc028d5a50b` |
| `global.config.maxQueryTimeout` | Maximum query timeout in seconds | `120` |
| `global.config.maxRequestSize` | Maximum request size | `20m` |
| `global.config.nodeServiceUrl` | URL to node-service server if using external one (disabled by default) | |
| `global.config.apiServiceUrl` | URL to api-service server if using external one (disabled by default) | |
| `global.defaults.maxOrgsPerUser` | Maximum allowed organizations per user | `100` |
| `global.defaults.maxMembersPerOrg` | Maximum allowed members per organization | `1000` |
| `global.defaults.maxGroupsPerOrg` | Maximum groups allowed per organization | `100` |
| `global.defaults.maxAppsPerOrg` | Maximum allowed applications per organization | `1000` |
| `global.defaults.maxDevelopers` | Maximum allowed developer accounts | `100` |

### Redis

| Name | Description | Value |
Expand All @@ -56,32 +78,3 @@ All available parameters can be found in [Bitnami Redis Chart](https://github.co

All available parameters can be found in [Bitnami MongoDB Chart](https://github.com/bitnami/charts/tree/main/bitnami/mongodb/#parameters)

### Lowcoder server api-service

| Name | Description | Value |
| --------------------------------------- | --------------------------------------------------------------------------- | ---------------- |
| `apiService.config.userId` | User ID of user running Lowcoder server application in container | `9001` |
| `apiService.config.groupId` | Group ID of user running Lowcoder server application in container | `9001` |
| `apiService.config.corsAllowedDomains` | CORS allowed domains | `*` |
| `apiService.config.encryption.password` | Encryption password | `lowcoder.org` |
| `apiService.config.encryption.salt` | Encryption salt | `lowcoder.org` |
| `apiService.config.enableUserSignUp` | Enable users signing up to lowcoder via login page | `true` |
| `apiService.config.nodeServiceUrl` | URL to node-service server if using external Lowcoder server | |

### Lowcoder server node-service

| Name | Description | Value |
| --------------------------------------- | --------------------------------------------------------------------------- | ---------------- |
| `nodeService.config.userId` | User ID of user running Lowcoder service application in container | `9001` |
| `nodeService.config.groupId` | Group ID of user running Lowcoder service application in container | `9001` |
| `nodeService.config.apiServiceUrl` | URL to api-service server if using external Lowcoder server | |

### Lowcoder frontend (client)

| Name | Description | Value |
| --------------------------------------- | --------------------------------------------------------------------------- | ---------------- |
| `frontend.config.userId` | User ID of nginx user running Lowcoder client application in container | `9001` |
| `frontend.config.groupId` | Group ID of nginx user running Lowcoder client application in container | `9001` |
| `frontend.config.apiServiceUrl` | URL to api-service server if using external Lowcoder server | `""` |
| `frontend.config.nodeServiceUrl` | URL to node-service server if using external Lowcoder server | |

20 changes: 13 additions & 7 deletions deploy/helm/templates/api-service/configMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ data:
{{- else }}
REDIS_URL: {{ .Values.redis.externalUrl | quote }}
{{- end }}
{{- if .Values.apiService.nodeServiceUrl }}
LOWCODER_NODE_SERVICE_URL: {{ .Values.apiService.nodeServiceUrl | quote }}
{{- if .Values.global.config.nodeServiceUrl }}
LOWCODER_NODE_SERVICE_URL: {{ .Values.global.config.nodeServiceUrl | quote }}
{{- else }}
LOWCODER_NODE_SERVICE_URL: "http://{{ $name }}-node-service:{{ .Values.nodeService.service.port }}"
{{- end }}
PUID: {{ .Values.apiService.config.userId | default "9001" | quote }}
PGID: {{ .Values.apiService.config.groupId | default "9001" | quote }}
CORS_ALLOWED_DOMAINS: {{ .Values.apiService.config.corsAllowedDomains | default "*" | quote }}
ENABLE_USER_SIGN_UP: {{ .Values.apiService.config.enableUserSignUp | default "true" | quote }}

PUID: {{ .Values.global.config.userId | default "9001" | quote }}
PGID: {{ .Values.global.config.groupId | default "9001" | quote }}
CORS_ALLOWED_DOMAINS: {{ .Values.global.config.corsAllowedDomains | default "*" | quote }}
ENABLE_USER_SIGN_UP: {{ .Values.global.config.enableUserSignUp | default "true" | quote }}
LOWCODER_MAX_QUERY_TIMEOUT: {{ .Values.global.config.maxQueryTimeout | default "120" | quote }}
DEFAULT_ORGS_PER_USER: {{ .Values.global.defaults.maxOrgsPerUser | default "100" | quote }}
DEFAULT_ORG_MEMBER_COUNT: {{ .Values.global.defaults.maxMembersPerOrg | default "1000" | quote }}
DEFAULT_ORG_GROUP_COUNT: {{ .Values.global.defaults.maxGroupsPerOrg | default "100" | quote }}
DEFAULT_ORG_APP_COUNT: {{ .Values.global.defaults.maxAppsPerOrg | default "1000" | quote }}
DEFAULT_DEVELOPER_COUNT: {{ .Values.global.defaults.maxDevelopers | default "50" | quote }}
COMMON_WORKSPACE_MODE: {{ .Values.global.config.workspaceMode | default "SAAS" | quote }}
6 changes: 3 additions & 3 deletions deploy/helm/templates/api-service/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ stringData:
{{- else }}
MONGODB_URL: {{ .Values.mongodb.externalUrl | quote }}
{{- end }}
ENCRYPTION_PASSWORD: {{ .Values.apiService.config.encryption.password | default "lowcoder.org" | quote }}
ENCRYPTION_SALT: {{ .Values.apiService.config.encryption.salt | default "lowcoder.org" | quote }}

ENCRYPTION_PASSWORD: {{ .Values.global.config.encryption.password | default "lowcoder.org" | quote }}
ENCRYPTION_SALT: {{ .Values.global.config.encryption.salt | default "lowcoder.org" | quote }}
LOWCODER_API_KEY_SECRET: "{{ .Values.global.config.apiKeySecret }}"
14 changes: 8 additions & 6 deletions deploy/helm/templates/frontend/configMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
PUID: {{ .Values.frontend.config.userId | default "9001" | quote }}
PGID: {{ .Values.frontend.config.groupId | default "9001" | quote }}
{{- if .Values.frontend.config.apiServiceUrl }}
LOWCODER_API_SERVICE_URL: {{ .Values.frontend.config.apiServiceUrl | trimSuffix "/" | quote }}
PUID: {{ .Values.global.config.userId | default "9001" | quote }}
PGID: {{ .Values.global.config.groupId | default "9001" | quote }}
{{- if .Values.global.config.apiServiceUrl }}
LOWCODER_API_SERVICE_URL: {{ .Values.global.config.apiServiceUrl | trimSuffix "/" | quote }}
{{- else }}
LOWCODER_API_SERVICE_URL: "http://{{ $name }}-api-service:{{ .Values.apiService.service.port }}"
{{- end }}
{{- if .Values.frontend.config.nodeServiceUrl }}
LOWCODER_NODE_SERVICE_URL: {{ .Values.frontend.config.nodeServiceUrl | trimSuffix "/" | quote }}
{{- if .Values.global.config.nodeServiceUrl }}
LOWCODER_NODE_SERVICE_URL: {{ .Values.global.config.nodeServiceUrl | trimSuffix "/" | quote }}
{{- else }}
LOWCODER_NODE_SERVICE_URL: "http://{{ $name }}-node-service:{{ .Values.nodeService.service.port }}"
{{- end }}
LOWCODER_MAX_REQUEST_SIZE: {{ .Values.global.config.maxRequestSize | default "20m" | quote }}
LOWCODER_MAX_QUERY_TIMEOUT: {{ .Values.global.config.maxQueryTimeout | default "120" | quote }}

8 changes: 4 additions & 4 deletions deploy/helm/templates/node-service/configMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
PUID: {{ .Values.nodeService.config.userId | default "9001" | quote }}
PGID: {{ .Values.nodeService.config.groupId | default "9001" | quote }}
{{- if .Values.nodeService.apiServiceUrl }}
LOWCODER_API_SERVICE_URL: {{ .Values.nodeService.apiServiceUrl | quote }}
PUID: {{ .Values.global.config.userId | default "9001" | quote }}
PGID: {{ .Values.global.config.groupId | default "9001" | quote }}
{{- if .Values.global.config.apiServiceUrl }}
LOWCODER_API_SERVICE_URL: {{ .Values.global.config.apiServiceUrl | quote }}
{{- else }}
LOWCODER_API_SERVICE_URL: "http://{{ $name }}-api-service:{{ .Values.apiService.service.port }}"
{{- end }}
46 changes: 27 additions & 19 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,33 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

#
# Configuration values for Lowcoder
#
global:
config:
# This setting sets workspace mode. Possible values: SAAS, ENTERPRISE
workspaceMode: SAAS
# ID of user and group runnning the service within the container
userId: 9001
groupId: 9001
corsAllowedDomains: "*"
enableUserSignUp: true
encryption:
password: "lowcoder.org"
salt: "lowcoder.org"
#nodeServiceUrl:
#apiServiceUrl:
apiKeySecret: "5a41b090758b39b226603177ef48d73ae9839dd458ccb7e66f7e7cc028d5a50b"
maxQueryTimeout: 120
maxRequestSize: "20m"
defaults:
maxOrgsPerUser: 100
maxMembersPerOrg: 1000
maxGroupsPerOrg: 100
maxAppsPerOrg: 1000
maxDevelopers: 50

#
# Redis
#
Expand Down Expand Up @@ -59,15 +86,6 @@ apiService:
# Overrides the image tag whose default is the chart appVersion.
#tag: "latest"

config:
userId: 9001
groupId: 9001
corsAllowedDomains: "*"
enableUserSignUp: true
encryption:
password: "lowcoder.org"
salt: "lowcoder.org"
#nodeServiceUrl:

service:
type: ClusterIP
Expand All @@ -93,10 +111,6 @@ nodeService:
# Overrides the image tag whose default is the chart appVersion.
#tag: "latest"

config:
userId: 9001
groupId: 9001
#apiServiceUrl:

service:
type: ClusterIP
Expand All @@ -119,12 +133,6 @@ frontend:
# Overrides the image tag whose default is the chart appVersion.
#tag: "latest"

config:
userId: 9001
groupId: 9001
#apiServiceUrl:
#nodeServiceUrl:

service:
type: NodePort
port: 80
Expand Down
107 changes: 0 additions & 107 deletions yarn-error.log

This file was deleted.

0 comments on commit 89b1acd

Please sign in to comment.