feat: added deployment
ci / image (push) Canceled after 0s
ci / build (push) Canceled after 4m19s

This commit is contained in:
Greboh committed 2026-11-07 18:44:09 +01:00
1 parent 91ae771ca2
commit 7cba626704
9 files changed
+208

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hearth-api
labels:
app: hearth-api
spec:
# One replica with Recreate: schema upgrades and scheduled syncs must run in one process at a time.
# Do not scale or switch to RollingUpdate before the worker split (Obsidian: Topics/Architecture, Singleton work).
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: hearth-api
template:
metadata:
labels:
app: hearth-api
spec:
containers:
- name: api
image: ghcr.io/greboh/hearth-api
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
readinessProbe:
httpGet:
path: /health
port: http
livenessProbe:
httpGet:
path: /alive
port: http
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
memory: 256Mi
+25
View File
@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hearth-api
annotations:
traefik.ingress.kubernetes.io/router.middlewares: services-hearth-api-strip@kubernetescrd
# Owns the certificate until the web ingress exists; the web ingress then reuses hearth-greboh-dev-tls.
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: traefik
tls:
- hosts:
- hearth.greboh.dev
secretName: hearth-greboh-dev-tls
rules:
- host: hearth.greboh.dev
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: hearth-api
port:
name: http
+9
View File
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: services
# No image tag here: Argo CD Image Updater (infrastructure repo) sets the newest released version on the Application.
resources:
- deployment.yaml
- service.yaml
- middleware.yaml
- ingress.yaml
+8
View File
@@ -0,0 +1,8 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: hearth-api-strip
spec:
stripPrefix:
prefixes:
- /api
+11
View File
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: hearth-api
spec:
selector:
app: hearth-api
ports:
- name: http
port: 80
targetPort: http