Skip to content

Commit

Permalink
bugfix: make images optional and fall back to the created one
Browse files Browse the repository at this point in the history
Signed-off-by: Silvio Moioli <[email protected]>
  • Loading branch information
moio committed Jan 16, 2025
1 parent c951b3b commit d7ae3b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
16 changes: 10 additions & 6 deletions darts/harvester.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ tofu_variables:
size: 35
type: "disk"
bus: "virtio"
image_name: null # openSUSE Leap 15.6. Change to a valid Harvester image name to override
image_namespace: null # default to the same namespace above
# Defaults to the image created by the create_image flag above. Change to a valid Harvester image name and namespace to override
# image_name:
# image_namespace:

# ssh_shared_public_keys: # Set this to a shared key that exists inside of Harvester if desired
# - name: bullseye-qa
# namespace: bullseye
Expand All @@ -72,8 +74,9 @@ tofu_variables:
size: 35
type: "disk"
bus: "virtio"
image_name: null # openSUSE Leap 15.6. Change to a valid Harvester image name to override
image_namespace: null # default to the same namespace above
# Defaults to the image created by the create_image flag above. Change to a valid Harvester image name and namespace to override
# image_name:
# image_namespace:
tester_cluster_distro_module: generic/k3s

downstream_cluster_templates:
Expand All @@ -92,8 +95,9 @@ tofu_variables:
size: 35
type: "disk"
bus: "virtio"
image_name: null # openSUSE Leap 15.6. Change to a valid Harvester image name to override
image_namespace: null # default to the same namespace above
# Defaults to the image created by the create_image flag above. Change to a valid Harvester image name and namespace to override
# image_name:
# image_namespace:
downstream_cluster_distro_module: generic/k3s

first_kubernetes_api_port: 7445
Expand Down
8 changes: 4 additions & 4 deletions tofu/modules/harvester/node/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ variable "public" {
variable "node_module_variables" {
description = <<EOT
Harvester-specific VM configuration variables.
image_name: Image name for this VM. Must be already present in Harvester. Requires image_namespace
image_namespace: Namespace for image_name. Must be already present in Harvester
image_name: Image name for this VM. If null, the image created by the network module will be used
image_namespace: Namespace for image_name. If null, the image created by the network module will be used
cpu: Number of CPUs to allocate for the VM(s)
memory: Number of GB of Memory to allocate for the VM(s)
tags: A map of strings to add as VM tags
Expand All @@ -54,8 +54,8 @@ variable "node_module_variables" {
secure_boot: Flag that determines if the VM will be provisioned with secure_boot enabled. EFI must be enabled to use this
EOT
type = object({
image_name = string
image_namespace = string
image_name = optional(string)
image_namespace = optional(string)
cpu = number
memory = number
tags = map(string)
Expand Down

0 comments on commit d7ae3b6

Please sign in to comment.