Newer
Older
# ----------------------------------------------------------------------
# CLUSTER INFO
# ----------------------------------------------------------------------
variable "cluster_name" {
type = string
description = "Desired name of new cluster"
}
variable "cluster_description" {
type = string
description = "Description of new cluster"
default = ""
}
variable "cluster_direct_access" {
type = bool
description = "Allow for direct access"
default = true
}
variable "cluster_machines" {
type = set(map(any))
description = "machine definition"
default = []
}
# ----------------------------------------------------------------------
# RANCHER
# ----------------------------------------------------------------------
variable "rancher_url" {
type = string
description = "URL where rancher runs"
default = "https://gonzo-rancher.ncsa.illinois.edu"
}
variable "rancher_token" {
type = string
sensitive = true
description = "Access token for rancher, clusters are created as this user"
}
# curl -s https://releases.rancher.com/kontainer-driver-metadata/release-v2.6/data.json | jq -r '.K8sVersionRKESystemImages | keys'
variable "rke1_version" {
type = string
description = "Version of rke1 to install."
variable "network_plugin" {
type = string
description = "Network plugin to be used"
default = "weave"
}
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# ----------------------------------------------------------------------
# USERS
# ----------------------------------------------------------------------
variable "admin_users" {
type = set(string)
description = "List of LDAP users with admin access to cluster."
default = []
}
variable "admin_groups" {
type = set(string)
description = "List of LDAP groups with admin access to cluster."
default = []
}
variable "member_users" {
type = set(string)
description = "List of LDAP users with access to cluster."
default = []
}
variable "member_groups" {
type = set(string)
description = "List of LDAP groups with access to cluster."
default = []
}
# ----------------------------------------------------------------------
# OPENSTACK
# ----------------------------------------------------------------------
variable "openstack_url" {
type = string
description = "OpenStack URL"
variable "openstack_region_name" {
type = string
description = "OpenStack region name"
default = "RegionOne"
}
variable "openstack_credential_id" {
type = string
sensitive = true
description = "Openstack credentials"
}
variable "openstack_credential_secret" {
type = string
sensitive = true
description = "Openstack credentials"
}
variable "openstack_external_net" {
type = string
description = "OpenStack external network"
default = "ext-net"
}
type = map(any)
description = "IP address to allow connections to kube api port, default is rancher nodes"
default = {
"rancher-1" : "141.142.218.167/32"
"rancher-2" : "141.142.217.171/32"
"rancher-3" : "141.142.217.184/32"
variable "openstack_security_ssh" {
type = map(any)
description = "IP address to allow connections to ssh, default is open to NCSA"
variable "openstack_security_custom" {
type = map(any)
description = "ports to open for custom services to the world, assumed these are blocked in other ways"
default = {
}
}
variable "openstack_os_image" {
type = map(any)
description = "Map from short OS name to image"
default = {
"ubuntu" = {
"imagename": "Ubuntu Jammy (22.04) latest"
"username": "ubuntu"
}
"ubuntu22" = {
"imagename": "Ubuntu Jammy (22.04) latest"
"username": "ubuntu"
}
# ----------------------------------------------------------------------
# NETWORKING
# ----------------------------------------------------------------------
variable "network_cidr" {
type = string
description = "CIDR to be used for internal network"
default = "192.168.0.0/21"
}
variable "dns_servers" {
type = set(string)
description = "DNS Servers"
default = ["141.142.2.2", "141.142.230.144"]
}
variable "floating_ip" {
type = string
description = "Number of floating IP addresses available for loadbalancers"
default = 2
}
# ----------------------------------------------------------------------
# NODE CREATION OPTIONS
# ----------------------------------------------------------------------
variable "ncsa_security" {
type = bool
description = "Install NCSA security options, for example rsyslog"
default = false
}
variable "taiga_enabled" {
type = bool
description = "Enable Taiga mount"
default = true
}
variable "install_docker" {
type = bool
description = "Install Docker when provisioning node"
default = true
}