Updates
This commit is contained in:
21
lowcoder/deploy/helm/templates/node-service/configMap.yaml
Normal file
21
lowcoder/deploy/helm/templates/node-service/configMap.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- $nameSpace := include "lowcoder.namespace" . -}}
|
||||
{{- $name := include "lowcoder.fullname" . -}}
|
||||
{{- $lowcoderDatabase := first .Values.mongodb.auth.databases -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
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 | quote }}
|
||||
{{- else }}
|
||||
LOWCODER_API_SERVICE_URL: "http://{{ $name }}-api-service:{{ .Values.apiService.service.port }}"
|
||||
{{- end }}
|
||||
69
lowcoder/deploy/helm/templates/node-service/deployment.yaml
Normal file
69
lowcoder/deploy/helm/templates/node-service/deployment.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
labels:
|
||||
{{- include "lowcoder.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.nodeService.autoscaling.enabled }}
|
||||
replicas: {{ .Values.nodeService.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "lowcoder.selectorLabels" (dict "component" "node-service" "Values" .Values "Release" .Release "Chart" .Chart) | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "lowcoder.selectorLabels" (dict "component" "node-service" "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.nodeService.image.repository }}:{{ .Values.nodeService.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.nodeService.image.pullPolicy }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
- secretRef:
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
ports:
|
||||
- name: lowcoder-node
|
||||
containerPort: 6060
|
||||
protocol: TCP
|
||||
# Uncomment when /status endpoint is implemented
|
||||
# livenessProbe:
|
||||
# initialDelaySeconds: 15
|
||||
# httpGet:
|
||||
# path: /plugins
|
||||
# port: lowcoder-node
|
||||
# readinessProbe:
|
||||
# initialDelaySeconds: 15
|
||||
# httpGet:
|
||||
# path: /plugins
|
||||
# port: lowcoder-node
|
||||
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/node-service/hpa.yaml
Normal file
32
lowcoder/deploy/helm/templates/node-service/hpa.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
{{- if .Values.nodeService.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
labels:
|
||||
{{- include "lowcoder.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
minReplicas: {{ .Values.nodeService.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.nodeService.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.nodeService.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.nodeService.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeService.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.nodeService.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
15
lowcoder/deploy/helm/templates/node-service/secrets.yaml
Normal file
15
lowcoder/deploy/helm/templates/node-service/secrets.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: Opaque
|
||||
metadata:
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
labels:
|
||||
{{- include "lowcoder.labels" . | nindent 4 }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
stringData:
|
||||
LOWCODER_NODE_SERVICE_SECRET: {{ .values.global.config.nodeServiceSecret | default "62e348319ab9f5c43c3b5a380b4d82525cdb68740f21140e767989b509ab0aa2" | quote }}
|
||||
LOWCODER_NODE_SERVICE_SECRET_SALT: {{ .values.global.config.nodeServiceSalt | default "lowcoder.org" | quote }}
|
||||
|
||||
20
lowcoder/deploy/helm/templates/node-service/service.yaml
Normal file
20
lowcoder/deploy/helm/templates/node-service/service.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "lowcoder.fullname" . }}-node-service
|
||||
labels:
|
||||
{{- include "lowcoder.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.nodeService.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.nodeService.service.port }}
|
||||
targetPort: lowcoder-node
|
||||
protocol: TCP
|
||||
name: lowcoder-node
|
||||
{{- if .Values.nodeService.service.nodePort }}
|
||||
{{- if or (eq .Values.nodeService.service.type "NodePort") (eq .Values.nodeService.service.type "LoadBalancer") }}
|
||||
nodePort: {{ .Values.nodeService.service.nodePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "lowcoder.selectorLabels" (dict "component" "node-service" "Values" .Values "Release" .Release "Chart" .Chart) | nindent 4 }}
|
||||
Reference in New Issue
Block a user