Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

feat: add kubeflow #26

Merged
merged 9 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: volumizer
Signed-off-by: Zuhair AlSader <zuhair@koor.tech>
  • Loading branch information
zalsader committed Apr 11, 2024
commit 51891f1b4267c4dc84a38724135685c34c10767a
9 changes: 5 additions & 4 deletions kubernetes-cluster-kubeone/terraform/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ ssh_private_key_file=$(grep -E "^ssh_private_key_file" terraform.tfvars | awk -F

ssh_private_key_file="${ssh_private_key_file/#\~/$HOME}"

# Extract cluster_name from terraform.tfvars
cluster_name=$(grep -E "^cluster_name" terraform.tfvars | awk -F= '{gsub(/[ \047"]/, "", $2); print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')


# Check whether an ssh-agent is listening
if [ -z "$SSH_AUTH_SOCK" ]; then
echo "ssh-agent isn't running."
Expand Down Expand Up @@ -115,9 +119,6 @@ printf "+------------------------------------------+----------------------+\n"

kubeconfig(){
echo "export kubernetes configuration"

# Extract cluster_name from terraform.tfvars
cluster_name=$(grep -E "^cluster_name" terraform.tfvars | awk -F= '{gsub(/[ \047"]/, "", $2); print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')

# Generate kubeconfig filename
kubeconfig_file="${cluster_name}-kubeconfig"
Expand Down Expand Up @@ -175,7 +176,7 @@ run() {
6) # assign volumes
echo "Assigning volumes to worker nodes."
pip3 install hcloud
./volumizer.py -c ${cluster_name} -s ${worker_volume_size}
./volumizer.py -c "${cluster_name}" -s "${worker_volume_size}"
;;
*)
echo "Invalid exiting..."
Expand Down
6 changes: 6 additions & 0 deletions kubernetes-cluster-kubeone/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,9 @@ Name of operating system profile for MachineDeployments, only applicable if oper
If not specified, the default value will be added by machine-controller addon.
EOF
}

variable "worker_volume_size" {
description = "The size of volumes to attach to workers"
default = "30G"
type = string
}