Skip to content

Commit 0902a89

Browse files
authored
Merge pull request #48 from khanh-ph/release/2.0.0
Release version 2.0.0
2 parents 413c888 + 784e59e commit 0902a89

File tree

11 files changed

+46
-37
lines changed

11 files changed

+46
-37
lines changed

.github/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ changelog:
1515
- title: Bug Fixes
1616
labels:
1717
- bugfix
18-
- title: Other Changes
18+
- title: Documentation
19+
labels:
20+
- documentation
21+
- title: Other
1922
labels:
2023
- "*"

.github/workflows/add-pr-label.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ jobs:
3333
if: ${{ startsWith(github.head_ref, 'breakingchange/') }}
3434
with:
3535
labels: breaking-change
36+
37+
- name: Add `documentation` label
38+
uses: actions-ecosystem/action-add-labels@v1
39+
if: ${{ startsWith(github.head_ref, 'docs/') }}
40+
with:
41+
labels: documentation

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## About the project
22

3-
An Infrastructure as Code (IaC) project to build up a bare metal Kubernetes cluster on [Proxmox VE](https://pve.proxmox.com/wiki/Main_Page) using [Terraform](https://www.terraform.io/) and [Kubespray](https://github.com/kubernetes-sigs/kubespray).
3+
An Infrastructure as Code (IaC) project to create a Kubernetes cluster on [Proxmox VE](https://pve.proxmox.com/wiki/Main_Page) using [Terraform](https://www.terraform.io/) and [Kubespray](https://github.com/kubernetes-sigs/kubespray).
44

5-
![Bare metal Kubernetes](baremetal-kubernetes.png)
5+
![Proxmox Kubernetes clusters](proxmox-kubernetes.png)
66

77
## Terminology
88

@@ -27,8 +27,8 @@ Throughout the guide, the term `deployment agent` is used to mean the machine wh
2727

2828
```sh
2929
# Clone the repo
30-
git clone https://github.com/khanh-ph/baremetal-kubernetes.git
31-
cd baremetal-kubernetes
30+
git clone https://github.com/khanh-ph/proxmox-kubernetes.git
31+
cd proxmox-kubernetes
3232
```
3333

3434
3. Set up the required environment variables:
@@ -76,7 +76,7 @@ Throughout the guide, the term `deployment agent` is used to mean the machine wh
7676

7777
4. Once the deployment is complete, it's time to try `kubectl`:
7878
```sh
79-
ssh IP_OF_THE_CONTROL_PLANE_NODE
79+
ssh CONTROL_PLANE_IP
8080
sudo kubectl get all -A
8181
```
8282
@@ -109,9 +109,9 @@ Below is the list of available options:
109109
110110
##### Deploy Kubernetes cluster on a private network
111111
112-
* TF_VAR_vm_net_dhcp_enabled
112+
* TF_VAR_vm_net_use_dhcp
113113
* TF_VAR_vm_net_bridge
114114
* TF_VAR_vm_net_cidr
115-
* TF_VAR_bastion_host_ssh_ip
116-
* TF_VAR_bastion_host_ssh_user
117-
* TF_VAR_bastion_host_ssh_port
115+
* TF_VAR_bastion_ssh_ip
116+
* TF_VAR_bastion_ssh_user
117+
* TF_VAR_bastion_ssh_port

kube-config-vars.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ variable "base64_ansible_private_key" {
5353
description = "The ansible private key for SSH based authentication in base64"
5454
}
5555

56-
variable "bastion_host_ssh_ip" {
56+
variable "bastion_ssh_ip" {
5757
type = string
5858
description = "IP of the bastion host. It could be either a public IP or an internal IP that the deployment agent can reach to."
5959
default = ""
6060
}
6161

62-
variable "bastion_host_ssh_user" {
62+
variable "bastion_ssh_user" {
6363
type = string
6464
description = "Username of the bastion host"
6565
default = "ubuntu"
6666
}
6767

68-
variable "bastion_host_ssh_port" {
68+
variable "bastion_ssh_port" {
6969
type = number
7070
description = "SSH port of the bastion host"
7171
default = 22

kube-config.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resource "local_file" "inventory" {
44
{
55
control_plane_ips = "${join("\n", [for hostname, ip in module.infrastructure.control_planes : join("", [hostname, " ansible_ssh_host=${ip}", " ansible_connection=ssh"])])}"
66
worker_ips = "${join("\n", [for hostname, ip in module.infrastructure.workers : join("", [hostname, " ansible_ssh_host=${ip}", " ansible_connection=ssh"])])}"
7-
bastion = var.bastion_host_ssh_ip != "" ? "[bastion]\nbastion ansible_host=${var.bastion_host_ssh_ip} ansible_port=${var.bastion_host_ssh_port} ansible_user=${var.bastion_host_ssh_user}" : ""
7+
bastion = var.bastion_ssh_ip != "" ? "[bastion]\nbastion ansible_host=${var.bastion_ssh_ip} ansible_port=${var.bastion_ssh_port} ansible_user=${var.bastion_ssh_user}" : ""
88
}
99
)
1010
filename = "${var.ks_tmp}/inventory.ini"

kube-infra-vars.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ variable "base64_vm_authorized_keys" {
5858
default = ""
5959
}
6060

61-
variable "vm_net_dhcp_enabled" {
61+
variable "vm_net_use_dhcp" {
6262
type = bool
6363
description = "use DHCP for all VMs IP"
6464
default = true

kube-infra.tf

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ module "infrastructure" {
1010
name = var.cluster_name
1111

1212
control_plane = {
13-
vm_count = var.control_plane_node_count
14-
vm_disk_storage = var.vm_disk_storage
15-
vm_os_disk_size_gb = var.vm_os_disk_size_gb
16-
vm_memory_mb = var.vm_memory_mb
17-
vm_cpus = var.vm_cpus
18-
vm_authorized_keys = base64decode(var.base64_vm_authorized_keys)
19-
vm_net_dhcp_enabled = var.vm_net_dhcp_enabled
20-
vm_net_bridge = var.vm_net_bridge
21-
vm_net_cidr = var.vm_net_cidr
13+
vm_count = var.control_plane_node_count
14+
vm_disk_storage = var.vm_disk_storage
15+
vm_os_disk_size_gb = var.vm_os_disk_size_gb
16+
vm_memory_mb = var.vm_memory_mb
17+
vm_cpus = var.vm_cpus
18+
vm_authorized_keys = base64decode(var.base64_vm_authorized_keys)
19+
vm_net_use_dhcp = var.vm_net_use_dhcp
20+
vm_net_bridge = var.vm_net_bridge
21+
vm_net_cidr = var.vm_net_cidr
2222
}
2323

2424
worker = {
25-
vm_count = var.worker_node_count
26-
vm_disk_storage = var.vm_disk_storage
27-
vm_os_disk_size_gb = var.vm_os_disk_size_gb
28-
vm_memory_mb = var.vm_memory_mb
29-
vm_cpus = var.vm_cpus
30-
vm_authorized_keys = base64decode(var.base64_vm_authorized_keys)
31-
vm_net_dhcp_enabled = var.vm_net_dhcp_enabled
32-
vm_net_bridge = var.vm_net_bridge
33-
vm_net_cidr = var.vm_net_cidr
25+
vm_count = var.worker_node_count
26+
vm_disk_storage = var.vm_disk_storage
27+
vm_os_disk_size_gb = var.vm_os_disk_size_gb
28+
vm_memory_mb = var.vm_memory_mb
29+
vm_cpus = var.vm_cpus
30+
vm_authorized_keys = base64decode(var.base64_vm_authorized_keys)
31+
vm_net_use_dhcp = var.vm_net_use_dhcp
32+
vm_net_bridge = var.vm_net_bridge
33+
vm_net_cidr = var.vm_net_cidr
3434
}
3535
}
3636

modules/proxmox_kubernetes_cluster/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module "promox_kubernetes_worker" {
1515
vm_cpus = var.worker.vm_cpus
1616
vm_os_disk_size_gb = var.worker.vm_os_disk_size_gb
1717
vm_authorized_keys = var.worker.vm_authorized_keys
18-
vm_net_dhcp_enabled = var.worker.vm_net_dhcp_enabled
18+
vm_net_use_dhcp = var.worker.vm_net_use_dhcp
1919
vm_net_bridge = var.worker.vm_net_bridge
2020
vm_net_cidr = var.worker.vm_net_cidr
2121
vm_net_hostnum_start = 20
@@ -38,7 +38,7 @@ module "promox_kubernetes_control_plane" {
3838
vm_cpus = var.control_plane.vm_cpus
3939
vm_os_disk_size_gb = var.control_plane.vm_os_disk_size_gb
4040
vm_authorized_keys = var.control_plane.vm_authorized_keys
41-
vm_net_dhcp_enabled = var.control_plane.vm_net_dhcp_enabled
41+
vm_net_use_dhcp = var.control_plane.vm_net_use_dhcp
4242
vm_net_bridge = var.control_plane.vm_net_bridge
4343
vm_net_cidr = var.control_plane.vm_net_cidr
4444
vm_net_hostnum_start = 10

modules/proxmox_ubuntu_vm/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ resource "proxmox_vm_qemu" "vm" {
4343
bridge = var.vm_net_bridge
4444
}
4545

46-
ipconfig0 = var.vm_net_dhcp_enabled == true ? "ip=dhcp" : "ip=${cidrhost(var.vm_net_cidr, var.vm_net_hostnum_start + count.index + 1)}/${split("/", var.vm_net_cidr)[1]},gw=${cidrhost(var.vm_net_cidr, 1)}"
46+
ipconfig0 = var.vm_net_use_dhcp == true ? "ip=dhcp" : "ip=${cidrhost(var.vm_net_cidr, var.vm_net_hostnum_start + count.index + 1)}/${split("/", var.vm_net_cidr)[1]},gw=${cidrhost(var.vm_net_cidr, 1)}"
4747

4848
ciuser = var.vm_user
4949
sshkeys = <<EOF

modules/proxmox_ubuntu_vm/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ variable "vm_socket" {
9595
default = 1
9696
}
9797

98-
variable "vm_net_dhcp_enabled" {
98+
variable "vm_net_use_dhcp" {
9999
type = bool
100100
description = "use DHCP for all VMs IP"
101101
default = true
File renamed without changes.

0 commit comments

Comments
 (0)