Skip to content

Make template compatible with Proxmox 8.2.4, fix issues across template#94

Merged
khanh-ph merged 1 commit intokhanh-ph:developfrom
oreze:fix/make-compatible-with-proxmox-8.4-and-fix-scripts
Aug 24, 2024
Merged

Make template compatible with Proxmox 8.2.4, fix issues across template#94
khanh-ph merged 1 commit intokhanh-ph:developfrom
oreze:fix/make-compatible-with-proxmox-8.4-and-fix-scripts

Conversation

@oreze
Copy link
Copy Markdown
Contributor

@oreze oreze commented Jul 9, 2024

List of changes:

  • fix, chore: upgrade providers, add proxmox >8.1 compatibility, fix breaking changes, adjust disk sizes and names of the templates
  • fix: add missing cloudinit drive, enable automatic_reboot on modify operation
  • fix: update docker script to wait if apt-get is locked
  • fix: add missing quotes around ssh_private_key in kubespray setup
  • chore: bump kubespray_image, kube_version, argocd_version versions, add explicit sesnitive properties to ssh keys variables

Basically, I've just upgraded providers, fixed some compatibility and other issues. It worked for me with Proxmox 8.2.4 with ubuntu 24.04 template.

I had to fix docker install script, it failed a few times because of apt-get lock, change in setup_kubespray.sh script should be reverted after merging this PR: docker/docker-install#431

Supersededs #90

Comment thread .gitignore
*.tfvars

# Exclude example.tfvars from being ignored
!example.tfvars
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wanted to exclude all .tfvars files from being checked, just in case

hotplug = "network,disk,usb,memory,cpu"
numa = true
automatic_reboot = false
automatic_reboot = true
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there were a problems with modify operations without this property set to true


dynamic "disk" {
for_each = var.add_worker_node_data_disk ? [var.worker_node_data_disk_size] : []
disks {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new disks structure in updated provider

}
}
}
ide {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous config missed cloudinit drive, therefore VMs were not initialized properly

exit 1
fi

# Check and add DPkg::Lock::Timeout=600 to apt-get install if not already present
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added simple script adding lock timeout, otherwise script would fail sometimes

Comment thread vm-k8s-nodes.tf
vm_host_number = 10
vm_user = var.vm_user
vm_tags = "${var.env_name};terraform;k8s-control-plane"
vm_tags = "${var.env_name};terraform;k8s_control_plane"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new naming convention, - is forbidden

Comment thread vm-kubespray-host.tf
inline = [
local.setup_kubespray_script_content,
"echo ${var.ssh_private_key} | base64 -d > ${local.kubespray_data_dir}/id_rsa",
"echo \"${var.ssh_private_key}\" | base64 -d > ${local.kubespray_data_dir}/id_rsa",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added missing "key" quotes, fails without it

    fix, chore: upgrade providers, add proxmox >8.1 compatibility, fix breaking changes, adjust disk sizes and names of the templates
    fix: add missing cloudinit drive, enable automatic_reboot on modify operation
    fix: update docker script to wait if apt-get is locked
    fix: add missing quotes around ssh_private_key in kubespray setup
    chore: bump kubespray_image, kube_version, argocd_version versions, add explicit sesnitive properties to ssh keys variables
@oreze oreze force-pushed the fix/make-compatible-with-proxmox-8.4-and-fix-scripts branch from dc3f471 to ae1a1e0 Compare July 9, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants