Base configuration for building an empty cluster with one node
This commit is contained in:
parent
8a66a04337
commit
31cee5a125
1
infra/vultr-kubernetes/.gitignore
vendored
Normal file
1
infra/vultr-kubernetes/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
secrets.sh
|
@ -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)
|
||||||
|
@ -13,7 +13,7 @@ terraform {
|
|||||||
}
|
}
|
||||||
vultr = {
|
vultr = {
|
||||||
source = "vultr/vultr"
|
source = "vultr/vultr"
|
||||||
version = "2.19.0"
|
version = "2.16.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
12
infra/vultr-kubernetes/variables.tfvars
Normal file
12
infra/vultr-kubernetes/variables.tfvars
Normal 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
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user