nanochat/helm/samosachaat/templates/chat-api-deployment.yaml
Manmohan Sharma 53f547fdef
feat(ci): CI/CD pipeline and Helm umbrella chart for samosaChaat (#8)
Adds GitHub Actions workflows for per-service CI (paths-filter gated),
dev image builds to ECR via OIDC, RC*-tag UAT promotion with image
re-tagging and Helm deploy, v*-tag blue/green prod release with smoke
test + ingress swap, and a nightly docker-compose integration suite.

Ships a Helm umbrella chart (dev/uat/prod values) with Deployments,
ClusterIP Services, ALB Ingress (samosachaat.art + grafana host), HPAs
for chat-api/inference in prod, PDBs, ConfigMap/Secret wiring, and an
alembic db-migrate Helm hook job.

Wires commitlint + husky for Conventional Commits at the repo root.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 12:09:43 -07:00

61 lines
1.9 KiB
YAML

{{- if .Values.chatApi.enabled -}}
{{- $svcName := include "samosachaat.svcName" (dict "root" . "svc" "chat-api") -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $svcName }}
namespace: {{ include "samosachaat.namespace" . }}
labels:
{{- include "samosachaat.labels" . | nindent 4 }}
{{- include "samosachaat.selectorLabels" (dict "root" . "svc" "chat-api") | nindent 4 }}
spec:
replicas: {{ .Values.chatApi.replicaCount }}
selector:
matchLabels:
{{- include "samosachaat.selectorLabels" (dict "root" . "svc" "chat-api") | nindent 6 }}
template:
metadata:
labels:
{{- include "samosachaat.selectorLabels" (dict "root" . "svc" "chat-api") | nindent 8 }}
spec:
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: chat-api
image: {{ include "samosachaat.image" (dict "root" . "svc" .Values.chatApi) }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
ports:
- name: http
containerPort: {{ .Values.chatApi.port }}
protocol: TCP
envFrom:
- configMapRef:
name: samosachaat-config
- secretRef:
name: samosachaat-secrets
optional: true
{{- with .Values.chatApi.env }}
env:
{{- range $k, $v := . }}
- name: {{ $k }}
value: {{ $v | quote }}
{{- end }}
{{- end }}
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 10
resources:
{{- toYaml .Values.chatApi.resources | nindent 12 }}
{{- end }}