Base configuration for building an empty cluster with one node

This commit is contained in:
shockrah 2024-01-16 19:07:55 -08:00
parent 8a66a04337
commit 31cee5a125
5 changed files with 19 additions and 6 deletions

1
infra/vultr-kubernetes/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
secrets.sh

View File

@ -3,20 +3,20 @@ plan=out.plan
SHELL := /bin/bash SHELL := /bin/bash
$(plan): *.tf $(plan): *.tf
source ./secrets.env && terraform plan -input=false -out $(plan) source ./secrets.sh && terraform plan -var-file variables.tfvars -input=false -out $(plan)
push: build push: build
source ./secrets.env && terraform apply $(plan) source ./secrets.sh && terraform apply $(plan)
refresh: refresh:
source ./secrets.env && terraform apply -refresh-only source ./secrets.sh && terraform apply -refresh-only
test: test:
terraform validate terraform validate
rip: rip:
source ./secrets.env && terraform destroy source ./secrets.sh && terraform destroy
clean: clean:
rm -f $(plan) rm -f $(plan)

View File

@ -13,7 +13,7 @@ terraform {
} }
vultr = { vultr = {
source = "vultr/vultr" source = "vultr/vultr"
version = "2.19.0" version = "2.16.4"
} }
} }
} }

View File

@ -6,7 +6,7 @@ resource vultr_kubernetes athens {
# how many pools do we want # how many pools do we want
node_quantity = 1 node_quantity = 1
plan = var.cluster.pool.plan plan = var.cluster.pool.plan
label = var.cluster.pool.label label = var.cluster.label
min_nodes = var.cluster.pool.min min_nodes = var.cluster.pool.min
max_nodes = var.cluster.pool.max max_nodes = var.cluster.pool.max
} }

View File

@ -0,0 +1,12 @@
cluster = {
region = "lax"
label = "athens-cluster"
version = "v1.28.3+2"
pool = {
plan = "vc2-1c-2gb"
autoscale = true
min = 1
max = 2
}
}