6eeb4883af
* Fixes various issues in vSphere Terraform code Provided to address various shortcomings and to fix the following issue in upstream Kubespray: https://github.com/kubernetes-sigs/kubespray/issues/8176 * Resolves Terraform formatting issues * Sets default prefix to human-readable name * Documents new default prefix in README
94 lines
1.3 KiB
HCL
94 lines
1.3 KiB
HCL
## Global ##
|
|
|
|
# Required variables
|
|
|
|
variable "machines" {
|
|
description = "Cluster machines"
|
|
type = map(object({
|
|
node_type = string
|
|
ip = string
|
|
netmask = string
|
|
}))
|
|
}
|
|
|
|
variable "network" {}
|
|
|
|
variable "gateway" {}
|
|
|
|
variable "vsphere_datacenter" {}
|
|
|
|
variable "vsphere_compute_cluster" {}
|
|
|
|
variable "vsphere_datastore" {}
|
|
|
|
variable "vsphere_user" {}
|
|
|
|
variable "vsphere_password" {}
|
|
|
|
variable "vsphere_server" {}
|
|
|
|
variable "vsphere_hostname" {}
|
|
|
|
variable "ssh_public_keys" {
|
|
description = "List of public SSH keys which are injected into the VMs."
|
|
type = list(string)
|
|
}
|
|
|
|
variable "template_name" {}
|
|
|
|
# Optional variables (ones where reasonable defaults exist)
|
|
|
|
variable "folder" {
|
|
default = ""
|
|
}
|
|
|
|
variable "prefix" {
|
|
default = "k8s"
|
|
}
|
|
|
|
variable "inventory_file" {
|
|
default = "inventory.ini"
|
|
}
|
|
|
|
variable "dns_primary" {
|
|
default = "8.8.4.4"
|
|
}
|
|
|
|
variable "dns_secondary" {
|
|
default = "8.8.8.8"
|
|
}
|
|
|
|
variable "firmware" {
|
|
default = "bios"
|
|
}
|
|
|
|
variable "hardware_version" {
|
|
default = "15"
|
|
}
|
|
|
|
## Master ##
|
|
|
|
variable "master_cores" {
|
|
default = 4
|
|
}
|
|
|
|
variable "master_memory" {
|
|
default = 4096
|
|
}
|
|
|
|
variable "master_disk_size" {
|
|
default = "20"
|
|
}
|
|
|
|
## Worker ##
|
|
|
|
variable "worker_cores" {
|
|
default = 16
|
|
}
|
|
|
|
variable "worker_memory" {
|
|
default = 8192
|
|
}
|
|
variable "worker_disk_size" {
|
|
default = "100"
|
|
}
|