-
-
Notifications
You must be signed in to change notification settings - Fork 4
feat: implement talos-cluster module and reorganize terraform #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Create comprehensive talos-cluster Terraform module for Proxmox - Single-block configuration for complete Kubernetes clusters - Supports control plane and worker node configurations - Automatic IP calculation for worker nodes - Configurable CNI, storage, and network settings - Comprehensive outputs for kubeconfig and talosconfig - Reorganize dev environment Terraform configuration - Split 459-line main.tf into logical files - providers.tf: Provider configurations - backend.tf: Backend configuration - data.tf: Data sources (1Password items) - locals.tf: Local values - clusters.tf: Kubernetes cluster resources - variables.tf: Variable definitions - versions.tf: Version constraints - vms.tf: Placeholder for standalone VMs - Add Terraform state sync tool with 1Password - Beautiful Catppuccin-themed CLI interface - Push/pull state to/from 1Password - Smart sync based on timestamp comparison - Status checking with SHA256 verification - Works from any directory location - Update dev environment README - Remove handholding and basic explanations - Focus on operational commands - Add state management documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a comprehensive talos-cluster Terraform module for simplified Kubernetes deployments and reorganizes the development environment configuration for better maintainability. The module provides single-block cluster configuration with automatic IP calculation, flexible storage distribution, and comprehensive outputs.
- New talos-cluster module for simplified Kubernetes cluster deployment
- Terraform reorganization splitting monolithic main.tf into logical files
- State sync tool with 1Password integration and Catppuccin UI
Reviewed Changes
Copilot reviewed 14 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
terraform/proxmox/modules/talos-cluster/variables.tf | Variable definitions with validation for the new cluster module |
terraform/proxmox/modules/talos-cluster/outputs.tf | Comprehensive outputs for cluster access and metadata |
terraform/proxmox/modules/talos-cluster/main.tf | Core module logic for Talos cluster creation |
terraform/proxmox/modules/talos-cluster/README.md | Detailed documentation for module usage |
terraform/proxmox/environments/dev/* | Reorganized dev environment files from monolithic structure |
scripts/tfstate | New CLI tool for Terraform state synchronization with 1Password |
Files not reviewed (3)
- terraform/proxmox/.terraform.lock.hcl: Language not supported
- terraform/proxmox/environments/dev/.terraform.lock.hcl: Language not supported
- terraform/proxmox/modules/talos-cluster/.terraform.lock.hcl: Language not supported
- Replace regex IPv4 validation with cidrhost() for proper octet range validation - Fix IP calculation logic to work correctly with any subnet size - Simplify worker IP generation using cidrhost() with offset The previous implementation had two critical issues: 1. IPv4 validation would accept invalid IPs like 999.999.999.999 2. IP calculation only used the last octet, breaking on non-/24 subnets
- Replace 386 lines of individual resource definitions with single module - Simplify cluster deployment to ~90 lines total - Update outputs to use module-provided values - Add example terraform.tfvars with minimal configuration - All functionality preserved with cleaner implementation
Summary
Changes
New Talos Cluster Module
Created a high-level Terraform module (
terraform/proxmox/modules/talos-cluster/
) that abstracts the complexity of deploying Talos Linux Kubernetes clusters on Proxmox:Terraform Reorganization
Split the 459-line
main.tf
in the dev environment into logical, maintainable files:versions.tf
- Terraform and provider version requirementsbackend.tf
- Backend configurationproviders.tf
- Provider configurationsdata.tf
- Data sources (1Password items)locals.tf
- Local values and common tagsclusters.tf
- All Kubernetes cluster resourcesvariables.tf
- Variable definitions with defaultsvms.tf
- Placeholder for standalone VMsState Sync Tool
Added
scripts/tfstate
- a Catppuccin-themed CLI tool for syncing Terraform state with 1Password:Documentation Updates
Test Plan
terraform init
successful in both module and dev environmentterraform validate
passesterraform fmt
applied to all filesMigration Notes
The reorganization maintains full compatibility with existing infrastructure. The main.tf was renamed to clusters.tf and all resources remain unchanged.