Aller au contenu

Introduction

Le deployer transforme un fichier deployer.yaml en infrastructure complete sur Google Cloud Platform et Kubernetes.

A partir d’un seul fichier de configuration, le deployer :

  1. Cree les ressources GCP : service accounts, bases de donnees, buckets, topics PubSub
  2. Deploie sur Kubernetes : deployments, services, probes, VPA, workers, cronjobs
  3. Configure le reseau : Gateway API (Envoy), DNS, TLS (cert-manager), CORS, redirections
  4. Gere les secrets : integration Vault pour les variables d’environnement
flowchart TD
    A["deployer.yaml"] -->|parse| B["Platform"]
    B -->|"ApplyDefaultsOrchestrator"| C{"8 etapes"}
    C --> D["Databases"]
    C --> E["Pub/Sub"]
    C --> G["Buckets"]
    C --> H["Cloud Functions"]
    C --> I["K8s Inputs"]
    C --> J["Vault Secrets"]

    I --> I3["Network + DNS"]
    I --> I4["Gateway API"]
    I --> I5["Workers / CronJobs"]

    C -->|prettify| K["PrettyPlatform"]
    K -->|YAML| L["platform-pretty.yaml"]
    L -->|yamldecode| M["Terraform"]

    M --> N["gke/"]
    M --> O["gateway-api/"]
    M --> P["dns/"]
    M --> Q["bucket/"]
    M --> R["pubsub/"]
    M --> S["cloud-function/"]
sequenceDiagram
    participant CI as GitHub Actions
    participant D as Deployer CLI
    participant TF as Terraform
    participant GCP as Google Cloud
    participant K8s as Kubernetes

    CI->>D: deployer deploy
    D->>D: Parse deployer.yaml
    D->>D: ApplyDefaultsOrchestrator
    D->>D: Prettify → YAML
    D->>TF: terraform init + plan
    TF->>GCP: Service accounts, DNS, Buckets, Pub/Sub
    TF->>K8s: Deployments, Services, ConfigMaps
    TF->>K8s: Gateway API (HTTPRoute, Policies)
    TF-->>D: Apply complete
    D-->>CI: deploy.url
flowchart LR
    subgraph Web
        W1["Deployment K8s"]
        W2["Service ClusterIP"]
        W3["HTTPRoute"]
        W4["EnvoyExtensionPolicy"]
    end

    subgraph "Static / Spa"
        S1["Bucket GCS"]
        S2["HTTPRoute static"]
        S3["Backend GCS"]
    end

    subgraph Infra
        I1["Terraform only"]
        I2["Pas de pods"]
    end
TypeDescriptionExemple
WebApplication avec pods K8sAPI Node.js, app PHP/Symfony
StaticFichiers statiques sur GCSSite marketing, portail
SpaSingle Page Application sur GCSApp Vue.js, React
InfraTerraform uniquement, pas de podsInfrastructure pure
  • URL : {name}-{branch}.homeserve.io (preview), {host} (prod)
  • Namespace : defaut = name
  • Replicas : 3 (prod), 2 (non-prod)
  • Resources : adaptes par environnement (voir Valeurs par defaut)