# Terraform module for Lawndale Kubernetes environment [![Build Status](https://drone.thomasklein.me/api/badges/thomasklein/terraform-lawndale-k8s/status.svg)](https://drone.thomasklein.me/thomasklein/terraform-lawndale-k8s) This module manages the core Kubernetes cluster components running on Lawndale including workers. ## Requirements The following requirements are needed by this module: - [aws](#requirement\_aws) (~> 4.9.0) - [cloudflare](#requirement\_cloudflare) (~> 3.15.0) - [dns](#requirement\_dns) (~> 3.2.3) - [helm](#requirement\_helm) (2.5.1) - [kubernetes](#requirement\_kubernetes) (~> 2.11.0) - [libvirt](#requirement\_libvirt) (0.6.14) - [macaddress](#requirement\_macaddress) (0.3.0) - [template](#requirement\_template) (~> 2.2.0) ## Providers The following providers are used by this module: - [helm](#provider\_helm) (2.5.1) - [kubernetes](#provider\_kubernetes) (2.11.0) - [libvirt](#provider\_libvirt) (0.6.14) - [random](#provider\_random) (3.2.0) - [template](#provider\_template) (2.2.0) - [time](#provider\_time) (0.7.2) ## Modules The following Modules are called: ### [flannel](#module\_flannel) Source: git@git.thomasklein.me:thomasklein/terraform-modules//kubernetes/flannel Version: ### [kube\_proxy](#module\_kube\_proxy) Source: git@git.thomasklein.me:thomasklein/terraform-modules//kubernetes/kube-proxy Version: ### [worker](#module\_worker) Source: git@git.thomasklein.me:thomasklein/terraform-modules//lawndale-vm Version: ## Resources The following resources are used by this module: - [helm_release.coredns](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource) - [helm_release.kube_state_metrics](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource) - [helm_release.metrics_server](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource) - [helm_release.traefik](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource) - [kubernetes_cluster_role.ci_cd](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role) (resource) - [kubernetes_cluster_role.prometheus](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role) (resource) - [kubernetes_cluster_role_binding.auto_approve_node_csrs](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_binding) (resource) - [kubernetes_cluster_role_binding.auto_approve_node_renewals](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_binding) (resource) - [kubernetes_cluster_role_binding.nodes_create_csrs](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_binding) (resource) - [kubernetes_cluster_role_binding.prometheus](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_binding) (resource) - [kubernetes_cluster_role_binding.terraform_ci_is_a_ci](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_binding) (resource) - [kubernetes_manifest.lawndale](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/manifest) (resource) - [kubernetes_namespace.prometheus](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) (resource) - [kubernetes_secret.bootstrap_token](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret) (resource) - [kubernetes_service_account.prometheus](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account) (resource) - [kubernetes_service_account.terraform_ci_cd](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account) (resource) - [libvirt_pool.kubernetes_workers](https://registry.terraform.io/providers/dmacvicar/libvirt/0.6.14/docs/resources/pool) (resource) - [random_password.bootstrap_token_id](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) (resource) - [random_password.bootstrap_token_secret](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) (resource) - [time_rotating.bootstrap_expiry_base](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/rotating) (resource) - [time_static.lawndale_node_registered](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/static) (resource) - [template_cloudinit_config.worker](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/cloudinit_config) (data source) ## Required Inputs The following input variables are required: ### [lawndale\_dns\_host](#input\_lawndale\_dns\_host) Description: Address to reach lawndale internal DNS server Type: `string` ### [lawndale\_dns\_key\_secret](#input\_lawndale\_dns\_key\_secret) Description: DNSSEC key to use sigining the NSUPDATE queries for Lawndale Type: `string` ### [lawndale\_libvirt\_uri\_transport](#input\_lawndale\_libvirt\_uri\_transport) Description: Transport protocol (could be ssh or tls) to dial Lawndale hypervisor Type: `string` ## Optional Inputs The following input variables are optional (have default values): ### [lawndale\_dns\_key\_algorithm](#input\_lawndale\_dns\_key\_algorithm) Description: DNSSEC key to use sigining the NSUPDATE queries for Lawndale Type: `string` Default: `"hmac-sha256"` ### [lawndale\_dns\_port](#input\_lawndale\_dns\_port) Description: Port where the lawndale internal DNS server listens on Type: `number` Default: `53` ### [lawndale\_dns\_transport](#input\_lawndale\_dns\_transport) Description: Port where the lawndale internal DNS server listens on Type: `string` Default: `"udp"` ### [lawndale\_libvirt\_uri](#input\_lawndale\_libvirt\_uri) Description: Libvirt URI to use accessing Lawndale hypervisor Type: `string` Default: `null` ### [lawndale\_libvirt\_uri\_extra](#input\_lawndale\_libvirt\_uri\_extra) Description: Libvirt URI extra parameters [https://libvirt.org/uri.html#transport-configuration](See Libvirt transport configuration) Type: `map(any)` Default: `{}` ### [lawndale\_libvirt\_uri\_path](#input\_lawndale\_libvirt\_uri\_path) Description: Libvirt URI path sent to the libvirt daemon Type: `string` Default: `"/system"` ### [lawndale\_libvirt\_uri\_userhostport](#input\_lawndale\_libvirt\_uri\_userhostport) Description: Libvirt URI username, hostname or ip address, and port to reach lawndale hypervisor, in the format of `[username@][:port]` Type: `string` Default: `"lawndale-hyper"` ## Outputs No outputs.