Skip to content

Latest commit

 

History

History
483 lines (262 loc) · 6.21 KB

USAGE.md

File metadata and controls

483 lines (262 loc) · 6.21 KB

Requirements

The following requirements are needed by this module:

  • terraform (>=0.13.1)

  • local (>=1.4.0)

  • null (>=2.1.2)

  • openstack (>=1.24.0)

  • rke (>=1.0.0)

Required Inputs

The following input variables are required:

public_net_name

Description: External network name

Type: string

image_name

Description: Name of image nodes (must fullfill RKE requirements)

Type: string

master_flavor_name

Description: Master flavor name

Type: string

worker_flavor_name

Description: Worker flavor name

Type: string

os_auth_url

Description: Openstack auth_url. Consider using export TF_VAR_os_auth_url=$OS_AUTH_URL

Type: string

os_password

Description: Openstack password. Consider using export TF_VAR_os_password=$OS_PASSWORD

Type: string

Optional Inputs

The following input variables are optional (have default values):

cluster_name

Description: Name of the cluster

Type: string

Default: "rke"

ssh_keypair_name

Description: SSH keypair name

Type: string

Default: null

ssh_key_file

Description: Local path to SSH key

Type: string

Default: "~/.ssh/id_rsa"

secgroup_rules

Description: Security group rules

Type: list(any)

Default:

[
  {
    "port": 22,
    "protocol": "tcp",
    "source": "0.0.0.0/0"
  },
  {
    "port": 6443,
    "protocol": "tcp",
    "source": "0.0.0.0/0"
  },
  {
    "port": 80,
    "protocol": "tcp",
    "source": "0.0.0.0/0"
  },
  {
    "port": 443,
    "protocol": "tcp",
    "source": "0.0.0.0/0"
  }
]

nodes_net_cidr

Description: Neutron network CIDR

Type: string

Default: "192.168.42.0/24"

dns_servers

Description: DNS servers

Type: list(string)

Default: null

dns_domain

Description: DNS domain for DNS integration. DNS domain names must have a dot at the end

Type: string

Default: null

enable_loadbalancer

Description: Enable Octabia LB for master/edge nodes

Type: bool

Default: false

master_count

Description: Number of master nodes (should be odd number...)

Type: number

Default: 1

edge_count

Description: Number of edge nodes

Type: number

Default: 0

worker_count

Description: Number of woker nodes

Type: number

Default: 2

edge_flavor_name

Description: Edge flavor name. Will use worker_flavor_name if not set

Type: string

Default: null

master_server_affinity

Description: Master server group affinity

Type: string

Default: "soft-anti-affinity"

worker_server_affinity

Description: Worker server group affinity

Type: string

Default: "soft-anti-affinity"

edge_server_affinity

Description: Edge server group affinity

Type: string

Default: "soft-anti-affinity"

nodes_config_drive

Description: Whether to use the config_drive feature to configure the instances

Type: bool

Default: "false"

user_data_file

Description: User data file to provide when launching the instance

Type: string

Default: null

boot_from_volume

Description: Boot nodes from volume

Type: bool

Default: false

boot_volume_size

Description: The size of the boot volume

Type: number

Default: 20

availability_zones

Description: The list of AZs to deploy nodes into

Type: list(string)

Default: []

use_octavia

Description: Use Octavia LBaaS instead of Neutron Networking

Type: bool

Default: false

system_user

Description: Default OS image user

Type: string

Default: "ubuntu"

use_ssh_agent

Description: Whether to use ssh agent

Type: bool

Default: "true"

bastion_host

Description: Bastion host. Will use first master node if not set

Type: string

Default: null

wait_for_commands

Description: Commands to run on nodes before running RKE

Type: list(string)

Default:

[
  "# Connected !"
]

master_labels

Description: Master labels. Ingress controller will run on nodes with egde label

Type: map(string)

Default:

{
  "node-role.kubernetes.io/edge": "true",
  "node-role.kubernetes.io/master": "true"
}

worker_labels

Description: Worker labels

Type: map(string)

Default:

{
  "node-role.kubernetes.io/worker": "true"
}

edge_labels

Description: Edge labels. Ingress controller will run on nodes with egde label

Type: map(string)

Default:

{
  "node-role.kubernetes.io/worker": "true"
}

master_taints

Description: Master taints

Type: list(map(string))

Default: []

worker_taints

Description: Worker taints

Type: list(map(string))

Default: []

edge_taints

Description: Edge taints

Type: list(map(string))

Default: []

kubernetes_version

Description: Kubernetes version (RKE)

Type: string

Default: null

cni_mtu

Description: CNI MTU

Type: number

Default: 0

cloud_provider

Description: Deploy cloud provider

Type: bool

Default: "true"

ignore_volume_az

Description: Ignore volume availability zone

Type: bool

Default: "false"

deploy_traefik

Description: Whether to deploy traefik. Mandatory if no edge nodes

Type: bool

Default: "true"

traefik_image_tag

Description: Traefik version

Type: string

Default: "2.2"

deploy_nginx

Description: Whether to deploy nginx RKE addon

Type: bool

Default: "false"

acme_email

Description: Email for Let's Encrypt

Type: string

Default: "example@example.com"

storage_types

Description: Cinder storage types

Type: list(string)

Default: null

default_storage

Description: Default storage class

Type: string

Default: null

addons_include

Description: RKE YAML files for add-ons

Type: list(string)

Default: null

write_kubeconfig

Description: Write kubeconfig file to disk

Type: bool

Default: "true"

Outputs

The following outputs are exported:

keypair_name

Description: The name of the keypair used for nodes

master_nodes

Description: The master nodes

edge_nodes

Description: The edge nodes

worker_nodes

Description: The worker nodes

rke_cluster

Description: RKE cluster spec

nodes_subnet

Description: The nodes subnet

loadbalancer_floating_ip

Description: The floating ip of the loadbalancer