Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ spec:
containers:
- name: chat-api
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
# image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.containerPort }}
name: http
env:
# OpenTelemetry configuration
- name: OTEL_SERVICE_NAME
value: {{ .Values.env.OTEL_SERVICE_NAME | default "chat-api" | quote }}
- name: OTEL_EXPORTER_OTLP_ENDPOINT
Expand All @@ -39,20 +37,18 @@ spec:
- name: OTEL_LOGS_EXPORTER
value: {{ .Values.env.OTEL_LOGS_EXPORTER | quote }}

# Environment
- name: ENVIRONMENT
value: {{ .Values.env.ENVIRONMENT | default "production" | quote }}
- name: APP_VERSION
value: {{ .Values.image.tag | quote }}
# value: {{ .Chart.AppVersion | quote }}
- name: LOG_LEVEL
value: {{ .Values.env.LOG_LEVEL | default "INFO" | quote }}
- name: OPENROUTER_API_URL
value: {{ .Values.openrouter.apiUrl | quote }}
- name: OPENROUTER_MODEL
value: {{ .Values.openrouter.defaultModel | quote }}

# Kubernetes metadata
# Downward API metadata enriches application telemetry.
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
Expand Down
2 changes: 0 additions & 2 deletions templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# charts/chat/templates/secret.yaml
{{- if .Values.createInternalSecret }}
apiVersion: v1
kind: Secret
Expand All @@ -7,7 +6,6 @@ metadata:
namespace: {{ include "chat-api.namespace" . }}
type: Opaque
stringData:
# OpenRouter Configuration
OPENROUTER_API_URL: {{ .Values.openrouter.apiUrl | quote }}
OPENROUTER_MODEL: {{ .Values.openrouter.defaultModel | quote }}
{{- if .Values.openrouter.httpReferer }}
Expand Down
34 changes: 5 additions & 29 deletions values.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# charts/chat/values.yaml

# === Основные настройки приложения ===
replicaCount: 1
namespace: ""

# === Docker образ ===
image:
repository: ghcr.io/justgithubaccount/app-poly-gitops-fastapi
pullPolicy: IfNotPresent
tag: "1.1.2"

# === Сетевые настройки ===
containerPort: 8000
service:
type: ClusterIP
port: 80

# === Ресурсы ===
resources:
requests:
memory: "256Mi"
Expand All @@ -25,56 +19,45 @@ resources:
memory: "512Mi"
cpu: "500m"

# === Health checks ===
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
initialDelaySeconds: 10
periodSeconds: 30

# === Service Account ===
serviceAccount:
create: true
annotations: {}
name: ""

# === Environment Variables (публичные) ===
env:
# OpenTelemetry
OTEL_SERVICE_NAME: "chat-api"
OTEL_EXPORTER_OTLP_ENDPOINT: ""
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf"
OTEL_TRACES_EXPORTER: "none"
OTEL_LOGS_EXPORTER: "none"

# Application
ENVIRONMENT: "production"
LOG_LEVEL: "INFO"

# === OpenRouter Configuration ===
openrouter:
# API endpoint
apiUrl: "https://openrouter.ai/api/v1/chat/completions"
# Default model
defaultModel: "anthropic/claude-opus-4"
# Optional headers для рейтинга
# httpReferer: "https://your-domain.com" # Optional
# xTitle: "Chat Microservice" # Optional
# Optional provider attribution headers.
# httpReferer: "https://your-domain.com"
# xTitle: "Chat Microservice"

# === External Dependencies ===
# Secrets
# Existing Secrets are optional so the health endpoint can start offline.
openrouterSecretRefName: ""
postgresSecretRefName: ""

# PostgreSQL
postgres:
externalService:
enabled: false
host: ""
port: 5432

# Ingress
ingress:
enabled: false
className: nginx
Expand All @@ -83,14 +66,7 @@ ingress:
tls: false
tlsSecretName: ""

# Extra environment variables (for PGO secrets mapping, etc.)
# Additional container environment entries, including Secret key mappings.
extraEnv: []
# Example:
# - name: DATABASE_URL
# valueFrom:
# secretKeyRef:
# name: chat-db-pguser-chatapi
# key: uri

# Другие возможные секции
createInternalSecret: false
Loading