Improve logging recovery, resource scaling, and app deploy logging.

Auto-reconnect Elasticsearch port-forward after cluster or API restarts, poll log status in the UI, and apply storage changes through billing upgrade for all workloads. Add Redis/RabbitMQ PVC resize, Helm ES credentials for Fluent Bit, and fix deploy progress overlay behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
keyhan
2026-05-25 21:41:00 +03:30
parent bf9e827f85
commit dc9830383b
18 changed files with 1068 additions and 414 deletions
@@ -130,3 +130,21 @@ Default log paths based on runtime
{{- else }}/var/log/app/*.log
{{- end }}
{{- end }}
{{/*
Shell start command for stdout capture (must match CloudHost-generated images).
*/}}
{{- define "cloudhost-app.runtimeStartCommand" -}}
{{- if eq .Values.app.runtime "nodejs" -}}
if [ -f /app/.mode ] && [ "$(cat /app/.mode)" = "standalone" ] && [ -f server.js ]; then node server.js; else npm start; fi
{{- else if eq .Values.app.runtime "go" -}}
./main
{{- else if eq .Values.app.runtime "dotnet" -}}
DLL=$(find . -maxdepth 1 -name '*.dll' ! -name '*.deps.dll' ! -name '*.runtimeconfig.dll' | head -1) && dotnet "$DLL"
{{- else -}}
{{- end }}
{{- end }}
{{- define "cloudhost-app.loggingWrapEnabled" -}}
{{- and .Values.elasticsearch.enabled (include "cloudhost-app.runtimeStartCommand" .) -}}
{{- end }}
@@ -27,6 +27,11 @@ spec:
- name: {{ $name }}
image: {{ .Values.app.image | quote }}
imagePullPolicy: Always
{{- if include "cloudhost-app.loggingWrapEnabled" . }}
command: ["sh", "-c"]
args:
- mkdir -p /var/log/app && ({{ include "cloudhost-app.runtimeStartCommand" . | trim }}) >> /var/log/app/app.log 2>&1
{{- end }}
ports:
- containerPort: {{ .Values.app.port }}
{{- if and .Values.envVars (gt (len .Values.envVars) 0) }}
@@ -0,0 +1,14 @@
{{- if .Values.elasticsearch.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: elasticsearch-credentials
namespace: {{ include "cloudhost-app.namespace" . }}
labels:
{{- include "cloudhost-app.labels" . | nindent 4 }}
type: Opaque
stringData:
ELASTIC_PASSWORD: {{ .Values.elasticsearch.elasticPassword | default "CloudHost2024!Secure" | quote }}
FLUENTBIT_PASSWORD: {{ .Values.elasticsearch.fluentbitPassword | default "FluentBit2024!Writer" | quote }}
KIBANA_SYSTEM_PASSWORD: {{ .Values.elasticsearch.kibanaPassword | default "Kibana2024!System" | quote }}
{{- end }}
+3
View File
@@ -87,6 +87,9 @@ elasticsearch:
logPaths: []
ownerId: ""
applicationId: ""
elasticPassword: ""
fluentbitPassword: ""
kibanaPassword: ""
# ── Change metadata ─────────────────────────────────────
changeCause: ""