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:
@@ -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 }}
|
||||
Reference in New Issue
Block a user