Updates
This commit is contained in:
28
lowcoder/deploy/helm/templates/frontend/configMap.yaml
Normal file
28
lowcoder/deploy/helm/templates/frontend/configMap.yaml
Normal 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 }}
|
||||
|
||||
64
lowcoder/deploy/helm/templates/frontend/deployment.yaml
Normal file
64
lowcoder/deploy/helm/templates/frontend/deployment.yaml
Normal 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 }}
|
||||
32
lowcoder/deploy/helm/templates/frontend/hpa.yaml
Normal file
32
lowcoder/deploy/helm/templates/frontend/hpa.yaml
Normal 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 }}
|
||||
20
lowcoder/deploy/helm/templates/frontend/service.yaml
Normal file
20
lowcoder/deploy/helm/templates/frontend/service.yaml
Normal 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 }}
|
||||
Reference in New Issue
Block a user