The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
feat: Helm chart for Kubernetes deployment (#159)
FrameAutomata17cf4e940e6b
diff --git a/.github/workflows/release-helm.yml b/.github/workflows/release-helm.ymlnew file mode 100644index 00000000..bd7100f5--- /dev/null+++ b/.github/workflows/release-helm.yml@@ -0,0 +1,100 @@+name: Release Helm Chart++on:+ push:+ tags:+ - 'backend/v*'+ workflow_dispatch:+ inputs:+ version:+ description: "Version to release (X.Y.Z, no v prefix)"+ required: true+ type: string++permissions:+ contents: write++jobs:+ release-helm:+ runs-on: ubuntu-latest+ steps:+ - name: Checkout+ uses: actions/checkout@v4++ - name: Determine version+ id: version+ run: |+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT"+ else+ TAG="${{ github.ref_name }}"+ echo "version=${TAG#backend/v}" >> "$GITHUB_OUTPUT"+ fi++ - name: Install Helm+ uses: azure/setup-helm@v4++ - name: Update chart version+ run: |+ VERSION="${{ steps.version.outputs.version }}"+ sed -i "s/^version:.*/version: ${VERSION}/" helm/traceway/Chart.yaml+ sed -i "s/^appVersion:.*/appVersion: \"${VERSION}\"/" helm/traceway/Chart.yaml++ - name: Lint chart+ run: |+ helm lint helm/traceway \+ --set app.jwtSecret=placeholder \+ --set clickhouse.server=placeholder \+ --set postgres.host=placeholder++ - name: Package chart+ run: helm package helm/traceway --destination ./chart-pkg++ - name: Upload package to GitHub Release+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ run: |+ VERSION="${{ steps.version.outputs.version }}"+ if gh release view "backend/v${VERSION}" &>/dev/null; then+ gh release upload "backend/v${VERSION}" chart-pkg/traceway-${VERSION}.tgz --clobber+ else+ echo "Release backend/v${VERSION} not found — skipping asset upload"+ fi++ - name: Fetch existing index+ run: |+ curl -sf https://charts.tracewayapp.com/index.yaml -o existing-index.yaml || true++ - name: Generate index.yaml+ run: |+ VERSION="${{ steps.version.outputs.version }}"+ RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/backend/v${VERSION}"++ if [ -f existing-index.yaml ]; then+ helm repo index chart-pkg/ --url "${RELEASE_URL}" --merge existing-index.yaml+ else+ helm repo index chart-pkg/ --url "${RELEASE_URL}"+ fi++ mkdir -p deploy+ cp chart-pkg/index.yaml deploy/++ - name: Deploy index.yaml to Cloudflare Pages+ uses: cloudflare/wrangler-action@v3+ with:+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}+ command: pages deploy deploy --project-name traceway-charts --commit-dirty=true++ - name: Summary+ run: |+ VERSION="${{ steps.version.outputs.version }}"+ echo "### Helm Chart Released" >> "$GITHUB_STEP_SUMMARY"+ echo "" >> "$GITHUB_STEP_SUMMARY"+ echo "**Version:** \`${VERSION}\`" >> "$GITHUB_STEP_SUMMARY"+ echo "" >> "$GITHUB_STEP_SUMMARY"+ echo '```sh' >> "$GITHUB_STEP_SUMMARY"+ echo "helm repo add traceway https://charts.tracewayapp.com" >> "$GITHUB_STEP_SUMMARY"+ echo "helm repo update" >> "$GITHUB_STEP_SUMMARY"+ echo "helm install traceway traceway/traceway -f my-values.yaml" >> "$GITHUB_STEP_SUMMARY"+ echo '```' >> "$GITHUB_STEP_SUMMARY"diff --git a/.github/workflows/release-traceway.yml b/.github/workflows/release-traceway.ymlindex a1103a4c..7aa13603 100644--- a/.github/workflows/release-traceway.yml+++ b/.github/workflows/release-traceway.yml@@ -75,9 +75,14 @@ jobs:working-directory: frontendrun: npm version "${{ inputs.version }}" --no-git-tag-version+ - name: Bump Helm chart version+ run: |+ sed -i "s/^version:.*/version: ${{ inputs.version }}/" helm/traceway/Chart.yaml+ sed -i "s/^appVersion:.*/appVersion: \"${{ inputs.version }}\"/" helm/traceway/Chart.yaml+- name: Commit version bumprun: |- git add frontend/package.json frontend/package-lock.json+ git add frontend/package.json frontend/package-lock.json helm/traceway/Chart.yamlgit commit -m "v to ${{ inputs.version }}"- name: Install frontend dependenciesdiff --git a/helm/traceway/Chart.yaml b/helm/traceway/Chart.yamlnew file mode 100644index 00000000..1c6dccdb--- /dev/null+++ b/helm/traceway/Chart.yaml@@ -0,0 +1,18 @@+apiVersion: v2+name: traceway+description: Error tracking and monitoring for Go applications+type: application+version: 0.1.0+appVersion: "1.7.24"+keywords:+ - monitoring+ - error-tracking+ - observability+ - apm+ - go+home: https://tracewayapp.com+sources:+ - https://github.com/tracewayapp/traceway+maintainers:+ - name: Traceway+ url: https://tracewayapp.comdiff --git a/helm/traceway/templates/NOTES.txt b/helm/traceway/templates/NOTES.txtnew file mode 100644index 00000000..1afb7188--- /dev/null+++ b/helm/traceway/templates/NOTES.txt@@ -0,0 +1,43 @@+Traceway has been installed!++ Variant: {{ .Values.variant }}+ Version: {{ include "traceway.imageTag" . }}+ Release: {{ .Release.Name }}+ Namespace: {{ .Release.Namespace }}++Get the application URL:+{{- if .Values.ingress.enabled }}+{{- range $host := .Values.ingress.hosts }}+ http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}+{{- end }}+{{- else if contains "NodePort" .Values.service.type }}+ export NODE_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "traceway.fullname" . }} -o jsonpath="{.spec.ports[0].nodePort}")+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")+ echo "http://$NODE_IP:$NODE_PORT"+{{- else if contains "LoadBalancer" .Values.service.type }}+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "traceway.fullname" . }} --template "{{ "{{" }} range (index .status.loadBalancer.ingress 0) {{ "}}" }}{{ "{{" }} . {{ "}}" }}{{ "{{" }} end {{ "}}" }}")+ echo "http://$SERVICE_IP"+{{- else }}+ kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "traceway.fullname" . }} 8080:80+ echo "Visit http://127.0.0.1:8080"+{{- end }}++Check pod status:+ kubectl get pods --namespace {{ .Release.Namespace }} -l "{{ include "traceway.selectorLabels" . }}"++{{- if eq .Values.variant "sqlite" }}++NOTE: SQLite variant — set replicaCount: 1 (SQLite does not support concurrent writes).+ Enable persistence to retain data across pod restarts:+ persistence:+ enabled: true+ size: 10Gi+{{- end }}++{{- if .Values.existingSecret }}++Using existing Secret: {{ .Values.existingSecret }}+Required keys: JWT_SECRET{{ if eq .Values.variant "minimal" }}, CLICKHOUSE_PASSWORD, POSTGRES_PASSWORD{{ end }}+Optional keys: SMTP_PASSWORD, S3_SECRET_KEY, OAUTH_SESSION_SECRET,+ GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_SECRET, OIDC_CLIENT_SECRET+{{- end }}diff --git a/helm/traceway/templates/_helpers.tpl b/helm/traceway/templates/_helpers.tplnew file mode 100644index 00000000..941043b7--- /dev/null+++ b/helm/traceway/templates/_helpers.tpl@@ -0,0 +1,73 @@+{{- define "traceway.name" -}}+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}+{{- end }}++{{- define "traceway.fullname" -}}+{{- if .Values.fullnameOverride }}+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}+{{- else }}+{{- $name := default .Chart.Name .Values.nameOverride }}+{{- if contains $name .Release.Name }}+{{- .Release.Name | trunc 63 | trimSuffix "-" }}+{{- else }}+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}+{{- end }}+{{- end }}+{{- end }}++{{- define "traceway.chart" -}}+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}+{{- end }}++{{- define "traceway.labels" -}}+helm.sh/chart: {{ include "traceway.chart" . }}+{{ include "traceway.selectorLabels" . }}+{{- if .Chart.AppVersion }}+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}+{{- end }}+app.kubernetes.io/managed-by: {{ .Release.Service }}+{{- end }}++{{- define "traceway.selectorLabels" -}}+app.kubernetes.io/name: {{ include "traceway.name" . }}+app.kubernetes.io/instance: {{ .Release.Name }}+{{- end }}++{{- define "traceway.serviceAccountName" -}}+{{- if .Values.serviceAccount.create }}+{{- default (include "traceway.fullname" .) .Values.serviceAccount.name }}+{{- else }}+{{- default "default" .Values.serviceAccount.name }}+{{- end }}+{{- end }}++{{/* Resolves the image tag based on the variant when not explicitly set */}}+{{- define "traceway.imageTag" -}}+{{- if .Values.image.tag -}}+{{ .Values.image.tag }}+{{- else if eq .Values.variant "sqlite" -}}+{{ .Chart.AppVersion }}-sqlite+{{- else if eq .Values.variant "minimal" -}}+{{ .Chart.AppVersion }}-minimal+{{- else -}}+{{ .Chart.AppVersion }}+{{- end -}}+{{- end }}++{{/* Name of the Secret to mount — either an existing one or the one we create */}}+{{- define "traceway.secretName" -}}+{{- if .Values.existingSecret -}}+{{ .Values.existingSecret }}+{{- else -}}+{{ include "traceway.fullname" . }}+{{- end -}}+{{- end }}++{{/* Name of the PVC to mount */}}+{{- define "traceway.pvcName" -}}+{{- if .Values.persistence.existingClaim -}}+{{ .Values.persistence.existingClaim }}+{{- else -}}+{{ include "traceway.fullname" . }}+{{- end -}}+{{- end }}diff --git a/helm/traceway/templates/configmap.yaml b/helm/traceway/templates/configmap.yamlnew file mode 100644index 00000000..c48e771c--- /dev/null+++ b/helm/traceway/templates/configmap.yaml@@ -0,0 +1,93 @@+apiVersion: v1+kind: ConfigMap+metadata:+ name: {{ include "traceway.fullname" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+data:+ GIN_MODE: "release"++ {{- if eq .Values.variant "sqlite" }}+ DB_TYPE: "sqlite"+ SQLITE_PATH: {{ .Values.sqlite.path | quote }}+ SQLITE_RETENTION_DAYS: {{ .Values.sqlite.retentionDays | quote }}+ {{- end }}++ {{- if eq .Values.variant "minimal" }}+ CLICKHOUSE_SERVER: {{ required "clickhouse.server is required when variant=minimal" .Values.clickhouse.server | quote }}+ CLICKHOUSE_DATABASE: {{ .Values.clickhouse.database | quote }}+ CLICKHOUSE_USERNAME: {{ .Values.clickhouse.username | quote }}+ CLICKHOUSE_TLS: {{ .Values.clickhouse.tls | quote }}+ POSTGRES_HOST: {{ required "postgres.host is required when variant=minimal" .Values.postgres.host | quote }}+ POSTGRES_PORT: {{ .Values.postgres.port | quote }}+ POSTGRES_DATABASE: {{ .Values.postgres.database | quote }}+ POSTGRES_USERNAME: {{ .Values.postgres.username | quote }}+ POSTGRES_SSLMODE: {{ .Values.postgres.sslmode | quote }}+ {{- end }}+ {{- /* full variant: ClickHouse and PostgreSQL run inside the container via supervisord — no external DB config needed */}}++ STORAGE_TYPE: {{ .Values.storage.type | quote }}+ STORAGE_PATH: {{ .Values.storage.path | quote }}+ {{- if eq .Values.storage.type "s3" }}+ S3_BUCKET: {{ .Values.storage.s3.bucket | quote }}+ S3_REGION: {{ .Values.storage.s3.region | quote }}+ S3_ACCESS_KEY: {{ .Values.storage.s3.accessKey | quote }}+ {{- if .Values.storage.s3.endpoint }}+ S3_ENDPOINT: {{ .Values.storage.s3.endpoint | quote }}+ {{- end }}+ {{- end }}++ SESSION_RECORDING_RETENTION_DAYS: {{ .Values.sessionRecording.retentionDays | quote }}+ SESSION_RECORDING_UPLOAD_WORKERS: {{ .Values.sessionRecording.uploadWorkers | quote }}+ SESSION_RECORDING_UPLOAD_QUEUE_SIZE: {{ .Values.sessionRecording.uploadQueueSize | quote }}++ {{- if .Values.app.baseURL }}+ APP_BASE_URL: {{ .Values.app.baseURL | quote }}+ {{- end }}+ {{- if .Values.app.apiOnly }}+ API_ONLY: {{ .Values.app.apiOnly | quote }}+ {{- end }}+ {{- if .Values.disablePasswordLogin }}+ DISABLE_PASSWORD_LOGIN: {{ .Values.disablePasswordLogin | quote }}+ {{- end }}++ SMTP_ENABLED: {{ .Values.smtp.enabled | quote }}+ {{- if eq .Values.smtp.enabled "true" }}+ SMTP_HOST: {{ .Values.smtp.host | quote }}+ SMTP_PORT: {{ .Values.smtp.port | quote }}+ SMTP_USERNAME: {{ .Values.smtp.username | quote }}+ SMTP_FROM: {{ .Values.smtp.from | quote }}+ {{- end }}++ {{- if .Values.oauth.google.clientID }}+ GOOGLE_CLIENT_ID: {{ .Values.oauth.google.clientID | quote }}+ {{- end }}+ {{- if .Values.oauth.github.clientID }}+ GITHUB_CLIENT_ID: {{ .Values.oauth.github.clientID | quote }}+ {{- end }}++ {{- if .Values.oidc.clientID }}+ OIDC_CLIENT_ID: {{ .Values.oidc.clientID | quote }}+ OIDC_DISCOVERY_URL: {{ .Values.oidc.discoveryURL | quote }}+ {{- if .Values.oidc.displayName }}+ OIDC_DISPLAY_NAME: {{ .Values.oidc.displayName | quote }}+ {{- end }}+ OIDC_AUTO_CREATE_USERS: {{ .Values.oidc.autoCreateUsers | quote }}+ {{- if .Values.oidc.orgClaim }}+ OIDC_ORG_CLAIM: {{ .Values.oidc.orgClaim | quote }}+ {{- end }}+ {{- if .Values.oidc.extraScopes }}+ OIDC_EXTRA_SCOPES: {{ .Values.oidc.extraScopes | quote }}+ {{- end }}+ {{- if .Values.oidc.roleClaim }}+ OIDC_ROLE_CLAIM: {{ .Values.oidc.roleClaim | quote }}+ {{- end }}+ {{- if .Values.oidc.roleMap }}+ OIDC_ROLE_MAP: {{ .Values.oidc.roleMap | quote }}+ {{- end }}+ {{- if .Values.oidc.authURL }}+ OIDC_AUTH_URL: {{ .Values.oidc.authURL | quote }}+ OIDC_TOKEN_URL: {{ .Values.oidc.tokenURL | quote }}+ OIDC_USER_INFO_URL: {{ .Values.oidc.userInfoURL | quote }}+ {{- end }}+ {{- end }}diff --git a/helm/traceway/templates/deployment.yaml b/helm/traceway/templates/deployment.yamlnew file mode 100644index 00000000..0494f497--- /dev/null+++ b/helm/traceway/templates/deployment.yaml@@ -0,0 +1,100 @@+apiVersion: apps/v1+kind: Deployment+metadata:+ name: {{ include "traceway.fullname" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+spec:+ {{- if not .Values.autoscaling.enabled }}+ replicas: {{ .Values.replicaCount }}+ {{- end }}+ selector:+ matchLabels:+ {{- include "traceway.selectorLabels" . | nindent 6 }}+ template:+ metadata:+ annotations:+ checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}+ checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}+ {{- with .Values.podAnnotations }}+ {{- toYaml . | nindent 8 }}+ {{- end }}+ labels:+ {{- include "traceway.selectorLabels" . | nindent 8 }}+ {{- with .Values.podLabels }}+ {{- toYaml . | nindent 8 }}+ {{- end }}+ spec:+ {{- with .Values.imagePullSecrets }}+ imagePullSecrets:+ {{- toYaml . | nindent 8 }}+ {{- end }}+ serviceAccountName: {{ include "traceway.serviceAccountName" . }}+ {{- with .Values.podSecurityContext }}+ securityContext:+ {{- toYaml . | nindent 8 }}+ {{- end }}+ containers:+ - name: {{ .Chart.Name }}+ {{- with .Values.securityContext }}+ securityContext:+ {{- toYaml . | nindent 12 }}+ {{- end }}+ image: "{{ .Values.image.repository }}:{{ include "traceway.imageTag" . }}"+ imagePullPolicy: {{ .Values.image.pullPolicy }}+ ports:+ - name: http+ containerPort: 80+ protocol: TCP+ envFrom:+ - configMapRef:+ name: {{ include "traceway.fullname" . }}+ - secretRef:+ name: {{ include "traceway.secretName" . }}+ livenessProbe:+ httpGet:+ path: /health+ port: http+ initialDelaySeconds: 10+ periodSeconds: 30+ timeoutSeconds: 3+ failureThreshold: 3+ readinessProbe:+ httpGet:+ path: /health+ port: http+ initialDelaySeconds: 5+ periodSeconds: 10+ timeoutSeconds: 3+ failureThreshold: 3+ {{- with .Values.resources }}+ resources:+ {{- toYaml . | nindent 12 }}+ {{- end }}+ {{- if or .Values.persistence.enabled (eq .Values.variant "sqlite") }}+ volumeMounts:+ - name: data+ mountPath: /data+ {{- end }}+ {{- if or .Values.persistence.enabled (eq .Values.variant "sqlite") }}+ volumes:+ - name: data+ {{- if .Values.persistence.enabled }}+ persistentVolumeClaim:+ claimName: {{ include "traceway.pvcName" . }}+ {{- else }}+ emptyDir: {}+ {{- end }}+ {{- end }}+ {{- with .Values.nodeSelector }}+ nodeSelector:+ {{- toYaml . | nindent 8 }}+ {{- end }}+ {{- with .Values.affinity }}+ affinity:+ {{- toYaml . | nindent 8 }}+ {{- end }}+ {{- with .Values.tolerations }}+ tolerations:+ {{- toYaml . | nindent 8 }}+ {{- end }}diff --git a/helm/traceway/templates/hpa.yaml b/helm/traceway/templates/hpa.yamlnew file mode 100644index 00000000..aaabdcae--- /dev/null+++ b/helm/traceway/templates/hpa.yaml@@ -0,0 +1,32 @@+{{- if .Values.autoscaling.enabled }}+apiVersion: autoscaling/v2+kind: HorizontalPodAutoscaler+metadata:+ name: {{ include "traceway.fullname" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+spec:+ scaleTargetRef:+ apiVersion: apps/v1+ kind: Deployment+ name: {{ include "traceway.fullname" . }}+ minReplicas: {{ .Values.autoscaling.minReplicas }}+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}+ metrics:+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}+ - type: Resource+ resource:+ name: cpu+ target:+ type: Utilization+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}+ {{- end }}+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}+ - type: Resource+ resource:+ name: memory+ target:+ type: Utilization+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}+ {{- end }}+{{- end }}diff --git a/helm/traceway/templates/ingress.yaml b/helm/traceway/templates/ingress.yamlnew file mode 100644index 00000000..e5f7a09e--- /dev/null+++ b/helm/traceway/templates/ingress.yaml@@ -0,0 +1,35 @@+{{- if .Values.ingress.enabled -}}+apiVersion: networking.k8s.io/v1+kind: Ingress+metadata:+ name: {{ include "traceway.fullname" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+ {{- with .Values.ingress.annotations }}+ annotations:+ {{- toYaml . | nindent 4 }}+ {{- end }}+spec:+ {{- if .Values.ingress.className }}+ ingressClassName: {{ .Values.ingress.className }}+ {{- end }}+ {{- if .Values.ingress.tls }}+ tls:+ {{- toYaml .Values.ingress.tls | nindent 4 }}+ {{- end }}+ rules:+ {{- range .Values.ingress.hosts }}+ - host: {{ .host | quote }}+ http:+ paths:+ {{- range .paths }}+ - path: {{ .path }}+ pathType: {{ .pathType }}+ backend:+ service:+ name: {{ include "traceway.fullname" $ }}+ port:+ number: {{ $.Values.service.port }}+ {{- end }}+ {{- end }}+{{- end }}diff --git a/helm/traceway/templates/pvc.yaml b/helm/traceway/templates/pvc.yamlnew file mode 100644index 00000000..90ff2f3c--- /dev/null+++ b/helm/traceway/templates/pvc.yaml@@ -0,0 +1,17 @@+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}+apiVersion: v1+kind: PersistentVolumeClaim+metadata:+ name: {{ include "traceway.fullname" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+spec:+ {{- if .Values.persistence.storageClass }}+ storageClassName: {{ .Values.persistence.storageClass | quote }}+ {{- end }}+ accessModes:+ - {{ .Values.persistence.accessMode }}+ resources:+ requests:+ storage: {{ .Values.persistence.size }}+{{- end }}diff --git a/helm/traceway/templates/secret.yaml b/helm/traceway/templates/secret.yamlnew file mode 100644index 00000000..4e848324--- /dev/null+++ b/helm/traceway/templates/secret.yaml@@ -0,0 +1,33 @@+{{- if not .Values.existingSecret -}}+apiVersion: v1+kind: Secret+metadata:+ name: {{ include "traceway.fullname" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+type: Opaque+stringData:+ JWT_SECRET: {{ required "app.jwtSecret is required (or set existingSecret to use a pre-existing Secret)" .Values.app.jwtSecret | quote }}+ {{- if eq .Values.variant "minimal" }}+ CLICKHOUSE_PASSWORD: {{ .Values.clickhouse.password | quote }}+ POSTGRES_PASSWORD: {{ .Values.postgres.password | quote }}+ {{- end }}+ {{- if eq .Values.storage.type "s3" }}+ S3_SECRET_KEY: {{ .Values.storage.s3.secretKey | quote }}+ {{- end }}+ {{- if eq .Values.smtp.enabled "true" }}+ SMTP_PASSWORD: {{ .Values.smtp.password | quote }}+ {{- end }}+ {{- if .Values.oauth.sessionSecret }}+ OAUTH_SESSION_SECRET: {{ .Values.oauth.sessionSecret | quote }}+ {{- end }}+ {{- if .Values.oauth.google.clientSecret }}+ GOOGLE_CLIENT_SECRET: {{ .Values.oauth.google.clientSecret | quote }}+ {{- end }}+ {{- if .Values.oauth.github.clientSecret }}+ GITHUB_CLIENT_SECRET: {{ .Values.oauth.github.clientSecret | quote }}+ {{- end }}+ {{- if .Values.oidc.clientSecret }}+ OIDC_CLIENT_SECRET: {{ .Values.oidc.clientSecret | quote }}+ {{- end }}+{{- end }}diff --git a/helm/traceway/templates/service.yaml b/helm/traceway/templates/service.yamlnew file mode 100644index 00000000..85aa2884--- /dev/null+++ b/helm/traceway/templates/service.yaml@@ -0,0 +1,15 @@+apiVersion: v1+kind: Service+metadata:+ name: {{ include "traceway.fullname" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+spec:+ type: {{ .Values.service.type }}+ ports:+ - port: {{ .Values.service.port }}+ targetPort: http+ protocol: TCP+ name: http+ selector:+ {{- include "traceway.selectorLabels" . | nindent 4 }}diff --git a/helm/traceway/templates/serviceaccount.yaml b/helm/traceway/templates/serviceaccount.yamlnew file mode 100644index 00000000..5bd8cbe8--- /dev/null+++ b/helm/traceway/templates/serviceaccount.yaml@@ -0,0 +1,13 @@+{{- if .Values.serviceAccount.create -}}+apiVersion: v1+kind: ServiceAccount+metadata:+ name: {{ include "traceway.serviceAccountName" . }}+ labels:+ {{- include "traceway.labels" . | nindent 4 }}+ {{- with .Values.serviceAccount.annotations }}+ annotations:+ {{- toYaml . | nindent 4 }}+ {{- end }}+automountServiceAccountToken: {{ .Values.serviceAccount.automount }}+{{- end }}diff --git a/helm/traceway/values.yaml b/helm/traceway/values.yamlnew file mode 100644index 00000000..4a10670a--- /dev/null+++ b/helm/traceway/values.yaml@@ -0,0 +1,157 @@+replicaCount: 1++image:+ repository: ghcr.io/tracewayapp/traceway+ pullPolicy: IfNotPresent+ # Overrides the image tag. Defaults to "<appVersion>-minimal" (or "<appVersion>-sqlite" when variant=sqlite).+ tag: ""++imagePullSecrets: []+nameOverride: ""+fullnameOverride: ""++serviceAccount:+ create: true+ automount: true+ annotations: {}+ name: ""++podAnnotations: {}+podLabels: {}++podSecurityContext: {}++securityContext: {}++service:+ type: ClusterIP+ port: 80++ingress:+ enabled: false+ className: ""+ annotations: {}+ hosts:+ - host: traceway.example.com+ paths:+ - path: /+ pathType: Prefix+ tls: []++resources: {}++autoscaling:+ enabled: false+ minReplicas: 1+ maxReplicas: 10+ targetCPUUtilizationPercentage: 80++nodeSelector: {}+tolerations: []+affinity: {}++# Deployment variant:+# "minimal" — external ClickHouse + PostgreSQL (recommended for production)+# "sqlite" — embedded SQLite, no external databases required+# "full" — all-in-one image with bundled ClickHouse + PostgreSQL (supervisord)+variant: minimal++# Core application settings+app:+ # Required. JWT signing secret (minimum 32 characters).+ jwtSecret: ""+ # Optional. Base URL used in password reset emails, e.g. "https://traceway.example.com"+ baseURL: ""+ # Optional. Set to "true" to serve only the API without the embedded frontend.+ apiOnly: ""++# ClickHouse configuration — required when variant=minimal+clickhouse:+ server: "" # e.g. "clickhouse.default.svc.cluster.local:9000"+ database: "traceway"+ username: "default"+ password: ""+ tls: "false"++# PostgreSQL configuration — required when variant=minimal+postgres:+ host: "" # e.g. "postgres.default.svc.cluster.local"+ port: "5432"+ database: "traceway"+ username: "traceway"+ password: ""+ sslmode: "disable"++# SQLite configuration — only used when variant=sqlite+sqlite:+ path: "/data/traceway.db"+ retentionDays: "30"++# Session recording storage+storage:+ type: "local" # "local" or "s3"+ path: "/data"+ s3:+ bucket: ""+ region: ""+ accessKey: ""+ secretKey: ""+ endpoint: "" # Leave empty for AWS S3; set for MinIO or other S3-compatible stores++sessionRecording:+ retentionDays: "30"+ uploadWorkers: "32"+ uploadQueueSize: "2048"++# SMTP — optional, enables password reset emails+smtp:+ enabled: "false"+ host: ""+ port: "587"+ username: ""+ password: ""+ from: ""++# OAuth — optional social login+oauth:+ google:+ clientID: ""+ clientSecret: ""+ github:+ clientID: ""+ clientSecret: ""+ sessionSecret: ""++# OIDC — optional single sign-on+oidc:+ clientID: ""+ clientSecret: ""+ discoveryURL: ""+ displayName: ""+ autoCreateUsers: "false"+ orgClaim: ""+ extraScopes: ""+ roleClaim: ""+ roleMap: ""+ authURL: ""+ tokenURL: ""+ userInfoURL: ""++# Set to "true" to disable username/password login (use with OIDC/OAuth only)+disablePasswordLogin: "false"++# Persistent volume for local session recordings and/or SQLite data.+# Strongly recommended when variant=sqlite or storage.type=local.+persistence:+ enabled: false+ storageClass: ""+ accessMode: ReadWriteOnce+ size: 10Gi+ existingClaim: ""++# Name of an existing Kubernetes Secret containing sensitive credentials.+# When set, the chart will NOT create its own Secret and will reference this one instead.+# The secret must contain: JWT_SECRET, and for variant=minimal: CLICKHOUSE_PASSWORD, POSTGRES_PASSWORD.+# Optional keys: SMTP_PASSWORD, S3_SECRET_KEY, OAUTH_SESSION_SECRET,+# GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_SECRET, OIDC_CLIENT_SECRET.+existingSecret: ""