2018-03-25 09:08:03 +02:00
|
|
|
variable "cluster_name" {
|
|
|
|
type = "string"
|
2018-03-31 22:11:42 +02:00
|
|
|
description = "Unique cluster name (prepended to dns_zone)"
|
2018-03-25 09:08:03 +02:00
|
|
|
}
|
|
|
|
|
2018-03-31 22:11:42 +02:00
|
|
|
# Digital Ocean
|
|
|
|
|
2018-03-25 09:08:03 +02:00
|
|
|
variable "region" {
|
|
|
|
type = "string"
|
|
|
|
description = "Digital Ocean region (e.g. nyc1, sfo2, fra1, tor1)"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "dns_zone" {
|
|
|
|
type = "string"
|
|
|
|
description = "Digital Ocean domain (i.e. DNS zone) (e.g. do.example.com)"
|
|
|
|
}
|
|
|
|
|
2018-03-31 22:11:42 +02:00
|
|
|
# instances
|
|
|
|
|
|
|
|
variable "controller_count" {
|
2018-03-25 09:08:03 +02:00
|
|
|
type = "string"
|
2018-03-31 22:11:42 +02:00
|
|
|
default = "1"
|
|
|
|
description = "Number of controllers (i.e. masters)"
|
2018-03-25 09:08:03 +02:00
|
|
|
}
|
|
|
|
|
2018-03-31 22:11:42 +02:00
|
|
|
variable "worker_count" {
|
2018-03-25 09:08:03 +02:00
|
|
|
type = "string"
|
|
|
|
default = "1"
|
2018-03-31 22:11:42 +02:00
|
|
|
description = "Number of workers"
|
2018-03-25 09:08:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "controller_type" {
|
|
|
|
type = "string"
|
|
|
|
default = "s-2vcpu-2gb"
|
2018-03-31 22:11:42 +02:00
|
|
|
description = "Droplet type for controllers (e.g. s-2vcpu-2gb, s-2vcpu-4gb, s-4vcpu-8gb)"
|
2018-03-25 09:08:03 +02:00
|
|
|
}
|
|
|
|
|
2018-03-31 22:11:42 +02:00
|
|
|
variable "worker_type" {
|
2018-03-25 09:08:03 +02:00
|
|
|
type = "string"
|
2018-03-31 22:11:42 +02:00
|
|
|
default = "s-1vcpu-1gb"
|
|
|
|
description = "Droplet type for workers (e.g. s-1vcpu-1gb, s-1vcpu-2gb, s-2vcpu-2gb)"
|
2018-03-25 09:08:03 +02:00
|
|
|
}
|
|
|
|
|
2018-03-31 22:11:42 +02:00
|
|
|
variable "image" {
|
2018-03-25 09:08:03 +02:00
|
|
|
type = "string"
|
2018-05-22 05:33:09 +02:00
|
|
|
default = "fedora-28-x64-atomic"
|
|
|
|
description = "OS image from which to initialize the disk (e.g. fedora-28-x64-atomic)"
|
2018-03-25 09:08:03 +02:00
|
|
|
}
|
|
|
|
|
2018-03-31 22:11:42 +02:00
|
|
|
# configuration
|
|
|
|
|
2018-03-25 09:08:03 +02:00
|
|
|
variable "ssh_authorized_key" {
|
|
|
|
type = "string"
|
|
|
|
description = "SSH public key for user 'fedora'"
|
|
|
|
}
|
|
|
|
|
2018-03-31 22:11:42 +02:00
|
|
|
variable "ssh_fingerprints" {
|
|
|
|
type = "list"
|
|
|
|
description = "SSH public key fingerprints. (e.g. see `ssh-add -l -E md5`)"
|
|
|
|
}
|
2018-03-25 09:08:03 +02:00
|
|
|
|
|
|
|
variable "asset_dir" {
|
|
|
|
description = "Path to a directory where generated assets should be placed (contains secrets)"
|
|
|
|
type = "string"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "pod_cidr" {
|
2018-03-31 22:11:42 +02:00
|
|
|
description = "CIDR IPv4 range to assign Kubernetes pods"
|
2018-03-25 09:08:03 +02:00
|
|
|
type = "string"
|
|
|
|
default = "10.2.0.0/16"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "service_cidr" {
|
|
|
|
description = <<EOD
|
2018-03-31 22:11:42 +02:00
|
|
|
CIDR IPv4 range to assign Kubernetes services.
|
2018-07-02 04:41:57 +02:00
|
|
|
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns.
|
2018-03-25 09:08:03 +02:00
|
|
|
EOD
|
|
|
|
|
|
|
|
type = "string"
|
|
|
|
default = "10.3.0.0/16"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "cluster_domain_suffix" {
|
2018-07-02 04:41:57 +02:00
|
|
|
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
|
2018-03-25 09:08:03 +02:00
|
|
|
type = "string"
|
|
|
|
default = "cluster.local"
|
|
|
|
}
|
2018-11-20 07:45:02 +01:00
|
|
|
|
|
|
|
variable "enable_reporting" {
|
|
|
|
type = "string"
|
|
|
|
description = "Enable usage or analytics reporting to upstreams (Calico)"
|
|
|
|
default = "false"
|
|
|
|
}
|