diff --git a/Chart.yaml b/Chart.yaml index 3fe89af..a6e2dc0 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: solidtime description: A Helm chart for Solidtime Time Tracker type: application -version: 0.1.2 +version: 0.1.3 appVersion: "1.0.0" dependencies: - name: postgresql diff --git a/templates/deployment-app.yaml b/templates/deployment-app.yaml index c1ed5e2..761a44d 100644 --- a/templates/deployment-app.yaml +++ b/templates/deployment-app.yaml @@ -65,4 +65,8 @@ spec: name: {{ .Values.secret.existingSecret | default (printf "%s-secret" (include "solidtime.fullname" .)) }} key: DB_PASSWORD - name: LOG_LEVEL - value: {{ .Values.config.logLevel | default "error" | quote }} \ No newline at end of file + value: {{ .Values.config.logLevel | default "error" | quote }} + - name: LOG_CHANNEL + value: {{ .Values.config.logChannel | default "stderr" | quote }} + - name: LOG_DEPRECATIONS_CHANNEL + value: {{ .Values.config.logDeprecationsChannel | default "null" | quote }} \ No newline at end of file diff --git a/templates/job-generate-keys.yaml b/templates/job-generate-keys.yaml index 2a8ef77..c6d1f08 100644 --- a/templates/job-generate-keys.yaml +++ b/templates/job-generate-keys.yaml @@ -19,24 +19,23 @@ spec: - | SECRET_NAME="solidtime-app-secrets" - # 1. Check if secret exists + # 1. Check if secret already exists if kubectl get secret $SECRET_NAME; then echo "Keys already exist. Skipping generation." exit 0 fi - echo "Generating keys..." + echo "Generating keys in /tmp..." - # Generate Passport Keys - openssl genrsa -out private.key 4096 - openssl rsa -in private.key -pubout -out public.key + # 2. Generate Keys into /tmp (which is writable) + openssl genrsa -out /tmp/private.key 4096 + openssl rsa -in /tmp/private.key -pubout -out /tmp/public.key - # Generate App Key (base64 encoded random 32 chars) + # Generate App Key APP_KEY="base64:$(openssl rand -base64 32)" - # 2. Create Secret with ALL keys - # We use --from-file for RSA keys to preserve newlines correctly + # 3. Create Secret reading from /tmp kubectl create secret generic $SECRET_NAME \ --from-literal=APP_KEY="$APP_KEY" \ - --from-file=PASSPORT_PRIVATE_KEY=private.key \ - --from-file=PASSPORT_PUBLIC_KEY=public.key \ No newline at end of file + --from-file=PASSPORT_PRIVATE_KEY=/tmp/private.key \ + --from-file=PASSPORT_PUBLIC_KEY=/tmp/public.key \ No newline at end of file diff --git a/values.yaml b/values.yaml index be738de..b36d6f2 100644 --- a/values.yaml +++ b/values.yaml @@ -26,6 +26,8 @@ env: config: # Valid Laravel log levels: debug, info, notice, warning, error, critical, alert, emergency logLevel: "error" + logChannel: "stderr" + logDeprecationsChannel: null # Secret Management secret: