# rpi-cluster — k3s on ARM64 Raspberry Pi cluster.
#
# Standardised companion to the existing
# alphaswarm_platform/configs/terraform/rpi.yaml stack. Targets
# the home-lab / tower-cluster operator path. Reuses the
# rpi_kubernetes_target Terraform module.

name: alphaswarm-rpi-cluster
slug: rpi-cluster
module_kind: cell
description: |
  Raspberry Pi Kubernetes cluster (k3s on ARM64). Provisions the
  cluster bootstrap + the cell base workloads scaled down for
  ARM64 nodes (replicas=1, conservative resource requests). Uses
  local state since the operator typically owns the keys.

cloud_provider: rpi_cluster
environment: rpi

provider:
  kind: rpi_cluster

backend:
  kind: local
  config:
    path: data/terraform/state/rpi-cluster.tfstate

variables:
  - name: cell_name
    type: string
    default: rpi-cluster
  - name: cluster_name
    type: string
    default: alphaswarm-rpi
  - name: cell_replicas
    type: number
    default: 1
  - name: ingress_host
    type: string
    default: aqp.rpi.lan
  - name: tier
    type: string
    default: shared-std

required_providers:
  kubernetes:
    source: hashicorp/kubernetes
    version: ~> 2.30
  helm:
    source: hashicorp/helm
    version: ~> 2.15
  "null":
    source: hashicorp/null
    version: ~> 3.2

annotations:
  alphaswarm.io/template-name: rpi-cluster
  alphaswarm.io/template-kind: cell
  alphaswarm.io/composition: rpi_kubernetes_target + cell (single-replica)
  alphaswarm.io/target-cost-monthly: "$0 (electricity-only)"
  alphaswarm.io/arch: arm64
