Initial commit.
This commit is contained in:
commit
38c0b98fa8
8 changed files with 199 additions and 0 deletions
3
k3d-tf/.gitignore
vendored
Normal file
3
k3d-tf/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
.terraform*
|
||||
secrets.yaml
|
||||
terraform.tfstate*
|
48
k3d-tf/main.tf
Normal file
48
k3d-tf/main.tf
Normal file
|
@ -0,0 +1,48 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
k3d = {
|
||||
source = "moio/k3d"
|
||||
version = "0.0.12"
|
||||
}
|
||||
sops = {
|
||||
source = "carlpett/sops"
|
||||
version = "1.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data "sops_file" "secrets" {
|
||||
source_file = "secrets.yaml"
|
||||
}
|
||||
|
||||
resource "k3d_cluster" "argocd_cluster" {
|
||||
name = "argocd"
|
||||
servers = 1
|
||||
agents = 2
|
||||
|
||||
image = "rancher/k3s:v1.31.5-k3s1"
|
||||
network = "argocd"
|
||||
token = data.sops_file.secrets.data["token"]
|
||||
|
||||
port {
|
||||
host_port = 8443
|
||||
container_port = 443
|
||||
node_filters = [
|
||||
"loadbalancer",
|
||||
]
|
||||
}
|
||||
|
||||
k3d {
|
||||
disable_load_balancer = false
|
||||
disable_image_volume = false
|
||||
}
|
||||
|
||||
kubeconfig {
|
||||
update_default_kubeconfig = true
|
||||
switch_current_context = true
|
||||
}
|
||||
|
||||
runtime {
|
||||
gpu_request = "all"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue