ae978a0bb3
Closes leeworks-agents/api-company#46 Add flux/ directories for all three API services, each containing: - namespace.yaml — Kubernetes Namespace - helmrelease.yaml — HelmRelease using bedag/raw chart with Deployment, Service, and Ingress (TLS via cert-manager letsencrypt-prod) - externalsecret.yaml — placeholder/comment for RapidAPI proxy-secret; includes kubectl manual-create instructions until ESO is deployed - kustomization.yaml — per-directory Kustomize resources list Services and subdomains: zip-enrichment → zip.leeworks.dev holidays → holidays.leeworks.dev air-quality → aqi.leeworks.dev Images: registry.leeworks.dev/zip-enrichment/server:latest registry.leeworks.dev/holidays/server:latest registry.leeworks.dev/air-quality/server:latest Update root flux/kustomization.yaml to include all three new directories. kustomize build flux/ passes with zero errors.
102 lines
2.8 KiB
YAML
102 lines
2.8 KiB
YAML
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
kind: HelmRelease
|
|
metadata:
|
|
name: holidays
|
|
namespace: holidays
|
|
spec:
|
|
interval: 10m
|
|
chart:
|
|
spec:
|
|
chart: raw
|
|
version: ">=0.2.0"
|
|
sourceRef:
|
|
kind: HelmRepository
|
|
name: bedag
|
|
namespace: flux-system
|
|
interval: 60m
|
|
values:
|
|
resources:
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: holidays
|
|
namespace: holidays
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: holidays
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: holidays
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: gitea-registry
|
|
containers:
|
|
- name: holidays
|
|
image: registry.leeworks.dev/holidays/server:latest
|
|
ports:
|
|
- containerPort: 3000
|
|
env:
|
|
- name: RAPIDAPI_PROXY_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: rapidapi-proxy-secret
|
|
key: X-RapidAPI-Proxy-Secret
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
- apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: holidays
|
|
namespace: holidays
|
|
spec:
|
|
selector:
|
|
app: holidays
|
|
ports:
|
|
- port: 80
|
|
targetPort: 3000
|
|
- apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: holidays
|
|
namespace: holidays
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
spec:
|
|
ingressClassName: nginx
|
|
tls:
|
|
- hosts:
|
|
- holidays.leeworks.dev
|
|
secretName: holidays-tls
|
|
rules:
|
|
- host: holidays.leeworks.dev
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: holidays
|
|
port:
|
|
number: 80
|