Skip to content
Snippets Groups Projects
Commit 3cdfd6b5 authored by Josef Smrčka's avatar Josef Smrčka
Browse files

fix: cloudinit configs, kubernetes-infra ref

Worker nodes cloud-init docs: fix additional volumes script.

Control nodes cloud-init: fix indentation.

Upgrade kubernetes-infra reference by 1 micro-release.
parent 756cf6a0
No related branches found
No related tags found
1 merge request!28fix: cloudinit configs, kubernetes-infra ref
......@@ -2,5 +2,5 @@ users:
- default
- name: ubuntu
shell: /bin/bash
package_update: true
package_update: true
package_upgrade: true
......@@ -34,7 +34,7 @@ write_files:
# Find unmounted disks
UNMOUNTED_DISKS=$(lsblk -ndp -o NAME | while read -r DISK; do
if lsblk -np "$DISK" | grep -q 'part' && mount | grep -q "$(lsblk -np -o NAME "$DISK" | grep part)"; then
if mount | grep -q "$DISK"; then
continue
else
echo "$DISK"
......@@ -53,12 +53,13 @@ write_files:
PARTITION="${DISK}1"
echo "Created partition: $PARTITION"
else
PARTITION=$(lsblk -np -o NAME "$DISK" | grep 'part' | head -n 1)
PARTITION=$(lsblk -lnp -o NAME "${DISK}" | grep -v "^${DISK}$" | head -n 1)
echo "Found existing partition: $PARTITION"
fi
# Format the partition if not already formatted
if ! blkid "$PARTITION" >/dev/null 2>&1; then
sleep 5 # new partition may not be ready yet
echo "Formatting partition: $PARTITION"
mkfs.ext4 "$PARTITION"
fi
......@@ -76,7 +77,7 @@ write_files:
echo "Disk mounting process completed."
echo "Check ${LOG_FILE} for details."
runcmd:
- /usr/local/bin/mount-unmounted-disks.sh
```
module "kubernetes_infra" {
# source = "./../../kubernetes-infra"
source = "git::https://gitlab.ics.muni.cz/cloud/terraform/modules/kubernetes-infra.git?ref=v5.0.0"
source = "git::https://gitlab.ics.muni.cz/cloud/terraform/modules/kubernetes-infra.git?ref=v5.0.1"
# Example of variable override
ssh_public_key = "~/.ssh/id_rsa.pub"
infra_name = "infra-name"
infra_name = "infra-name"
control_nodes_count = 3
control_nodes_volume_size = 30
......
users:
- default
- name: ubuntu
shell: /bin/bash
\ No newline at end of file
shell: /bin/bash
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment