Skip to content

Commit

Permalink
Support to customize ndots
Browse files Browse the repository at this point in the history
  • Loading branch information
khanh-ph committed Oct 4, 2023
1 parent 11858d9 commit b058f37
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The project provides several Terraform variables that allow you to customize the
| <a name="input_location"></a> [location](#input\_location) | The city or region where the cluster is provisioned | `string` | `null` | no |
| <a name="input_cluster_number"></a> [cluster\_number](#input\_cluster\_number) | The instance count for the k8s cluster, to differentiate it from other clusters. Example: `00`, `01` | `string` | `"01"` | no |
| <a name="input_cluster_domain"></a> [cluster\_domain](#input\_cluster\_domain) | The cluster domain name | `string` | `"local"` | no |
| <a name="input_ndots"></a> [ndots](#input\_ndots) | Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods | `number` | `2` | no |
| <a name="input_use_legacy_naming_convention"></a> [use\_legacy\_naming\_convention](#input\_use\_legacy\_naming\_convention) | A boolean value that indicates whether to use legacy naming convention for the VM and cluster name. If your cluster was provisioned using version <= 3.x, set it to `true` | `bool` | `false` | no |
| <a name="input_pm_api_url"></a> [pm\_api\_url](#input\_pm\_api\_url) | The base URL for Proxmox VE API. See https://pve.proxmox.com/wiki/Proxmox_VE_API#API_URL | `string` | n/a | yes |
| <a name="input_pm_api_token_id"></a> [pm\_api\_token\_id](#input\_pm\_api\_token\_id) | The token ID to access Proxmox VE API. | `string` | n/a | yes |
Expand Down
2 changes: 1 addition & 1 deletion kubespray/k8s-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ kube_encrypt_secret_data: false
# Kubernetes cluster name, also will be used as DNS domain
cluster_name: ${cluster_name}
# Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods
ndots: 2
ndots: ${ndots}
# dns_timeout: 2
# dns_attempts: 2
# Custom search domains to be added in addition to the default cluster search domains
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ locals {
cluster_fqdn = "${local.cluster_name}.${var.cluster_domain}"
}

variable "ndots" {
type = number
description = "Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods"
default = 2
}

variable "use_legacy_naming_convention" {
type = bool
description = "A boolean value that indicates whether to use legacy naming convention for the VM and cluster name. If your cluster was provisioned using version <= 3.x, set it to `true`"
Expand Down
1 change: 1 addition & 0 deletions vm-kubespray-host.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ locals {
kube_version = var.kube_version
kube_network_plugin = var.kube_network_plugin
cluster_name = local.cluster_fqdn
ndots = var.ndots
enable_nodelocaldns = var.enable_nodelocaldns
podsecuritypolicy_enabled = var.podsecuritypolicy_enabled
persistent_volumes_enabled = var.persistent_volumes_enabled
Expand Down

0 comments on commit b058f37

Please sign in to comment.