76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
# Flux Kustomization for Bakery-IA Production Deployment
|
|
# This resource tells Flux how to deploy the application
|
|
#
|
|
# Prerequisites:
|
|
# 1. Flux CD must be installed: flux install
|
|
# 2. GitRepository 'bakery-ia' must be created and ready
|
|
# 3. Secret 'gitea-credentials' must exist in flux-system namespace
|
|
|
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
kind: Kustomization
|
|
metadata:
|
|
name: bakery-ia-prod
|
|
namespace: flux-system
|
|
labels:
|
|
app.kubernetes.io/name: bakery-ia
|
|
app.kubernetes.io/component: flux
|
|
spec:
|
|
# Wait for GitRepository to be ready before reconciling
|
|
dependsOn: []
|
|
interval: 5m
|
|
path: ./infrastructure/environments/prod
|
|
prune: true
|
|
sourceRef:
|
|
kind: GitRepository
|
|
name: bakery-ia
|
|
targetNamespace: bakery-ia
|
|
timeout: 10m
|
|
retryInterval: 1m
|
|
wait: true
|
|
# Health checks for critical services
|
|
healthChecks:
|
|
# Core Infrastructure
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: gateway
|
|
namespace: bakery-ia
|
|
# Authentication & Authorization
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: auth-service
|
|
namespace: bakery-ia
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: tenant-service
|
|
namespace: bakery-ia
|
|
# Core Business Services
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: inventory-service
|
|
namespace: bakery-ia
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: orders-service
|
|
namespace: bakery-ia
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: pos-service
|
|
namespace: bakery-ia
|
|
# Data Services
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: forecasting-service
|
|
namespace: bakery-ia
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: notification-service
|
|
namespace: bakery-ia
|
|
# Post-build variable substitution
|
|
postBuild:
|
|
substituteFrom:
|
|
- kind: ConfigMap
|
|
name: bakery-ia-config
|
|
optional: true
|
|
- kind: Secret
|
|
name: bakery-ia-secrets
|
|
optional: true |