This commit is contained in:
2025-11-17 18:45:35 +01:00
parent 0f58e3bdff
commit 14d6f9aa73
7607 changed files with 1969407 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
{{- $nameSpace := include "lowcoder.namespace" . -}}
{{- $name := include "lowcoder.fullname" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "lowcoder.fullname" . }}-frontend
labels:
{{- include "lowcoder.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
LOWCODER_PUID: {{ .Values.global.config.userId | default "9001" | quote }}
LOWCODER_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.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 }}

View File

@@ -0,0 +1,64 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "lowcoder.fullname" . }}-frontend
labels:
{{- include "lowcoder.labels" . | nindent 4 }}
spec:
{{- if not .Values.frontend.autoscaling.enabled }}
replicas: {{ .Values.frontend.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "lowcoder.selectorLabels" (dict "component" "frontend" "Values" .Values "Release" .Release "Chart" .Chart) | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "lowcoder.selectorLabels" (dict "component" "frontend" "Values" .Values "Release" .Release "Chart" .Chart) | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "lowcoder.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "lowcoder.fullname" . }}-frontend
ports:
- name: lowcoder
containerPort: 3000
protocol: TCP
livenessProbe:
httpGet:
path: {{ .Values.ingress.contextPath | default "" | trimSuffix "/" }}/apps
port: lowcoder
readinessProbe:
httpGet:
path: {{ .Values.ingress.contextPath | default "" | trimSuffix "/" }}/apps
port: lowcoder
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@@ -0,0 +1,32 @@
{{- if .Values.frontend.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "lowcoder.fullname" . }}-frontend
labels:
{{- include "lowcoder.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "lowcoder.fullname" . }}-frontend
minReplicas: {{ .Values.frontend.autoscaling.minReplicas }}
maxReplicas: {{ .Values.frontend.autoscaling.maxReplicas }}
metrics:
{{- if .Values.frontend.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.frontend.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.frontend.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.frontend.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "lowcoder.fullname" . }}-frontend
labels:
{{- include "lowcoder.labels" . | nindent 4 }}
spec:
type: {{ .Values.frontend.service.type }}
ports:
- port: {{ .Values.frontend.service.port }}
targetPort: lowcoder
protocol: TCP
name: lowcoder
{{- if .Values.frontend.service.nodePort }}
{{- if or (eq .Values.frontend.service.type "NodePort") (eq .Values.frontend.service.type "LoadBalancer") }}
nodePort: {{ .Values.frontend.service.nodePort }}
{{- end }}
{{- end }}
selector:
{{- include "lowcoder.selectorLabels" (dict "component" "frontend" "Values" .Values "Release" .Release "Chart" .Chart) | nindent 4 }}