opentofu / registry

The all-new opentofu.org registry!
https://search.opentofu.org
Apache License 2.0
325 stars 39 forks source link

add module "identiops/k3s/hcloud" #836

Closed mogol07 closed 1 month ago

mogol07 commented 2 months ago

Thank you for reporting an issue.

this module helps to deploy k3s cluster to Hetzner cloud provider

OpenTofu Version

OpenTofu v1.8.1
on windows_amd64

OpenTofu Configuration Files

// Snippet of HCL that can be used to help reproduce this problem
// full tf file could fetched from github.com/identiops/terraform-hcloud-k3s/raw/main/examples/1Region_3ControlPlane_3Worker_Nodes/main.tf
module "cluster" {
  # source       = "github.com/identiops/terraform-hcloud-k3s?ref=3.0.6"
  source                 = "identiops/k3s/hcloud"
  version                = "3.0.6"
  hcloud_token           = var.hcloud_token           # INFO: Set via `export TF_VAR_hcloud_token=xyz`
  hcloud_token_read_only = var.hcloud_token_read_only # INFO: Set via `export TF_VAR_hcloud_token_read_only=abc`

  # Cluster Settings
  # ----------------
  delete_protection = true # Must be set to false + `terraform apply` before destroying the cluster via `terraform destory`!
  cluster_name      = "prod"
  default_location  = "nbg1"         # See available locations https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server#location
  default_image     = "ubuntu-22.04" # See `HCLOUD_TOKEN=XXXX; curl -H \"Authorization: Bearer $HCLOUD_TOKEN\" https://api.hetzner.cloud/v1/images | jq -r .images[].name | sort`
  k3s_version       = "v1.28.5+k3s1" # See available versions, https://update.k3s.io/v1-release/channels regular images: https://hub.docker.com/r/rancher/k3s/tags upgrade images: https://hub.docker.com/r/rancher/k3s-upgrade/tags

  # General Settings
  # ----------------
  ssh_keys = {
    "john" = file("~/.ssh/id_ed25519.pub")
    "jane" = "ssh-xxxx xxxxx jane@example"
  }

  # Control Plane Settings
  # ----------------------
  # Example s3 configuration:
  # S3 documentation  https://docs.k3s.io/cli/server
  # control_plane_k3s_init_additional_options = "--etcd-s3 --etcd-s3-region=${var.etcd_s3_region} --etcd-s3-endpoint=s3.${var.etcd_s3_region}.wasabisys.com --etcd-s3-access-key=${var.etcd_s3_access_key} --etcd-s3-secret-key=${var.etcd_s3_secret_key} --etcd-s3-bucket=${var.etcd_s3_bucket} --etcd-s3-folder=etcd/$(hostname)"
  # etcd tuning documentation for multi-region deployment: https://etcd.io/docs/v3.4/tuning/#time-parameters
  # control_plane_k3s_additional_options      = "--etcd-arg=heartbeat-interval=120 --etcd-arg=election-timeout=1200" # See https://etcd.io/docs/v3.4/tuning/#time-parameters
  additional_cloud_init = {
    timezone = "Europe/Berlin" # See available time zones https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
  }

  # Node Group Settings
  # -------------------
  # Map of worker node groups, key is server_type, value is count of nodes in group
  node_pools = {
    system = {
      cluster_can_init = true # Required for one node pool to perform initializing actions.
      cluster_init_action = {
        # `init` must be `true` for the first run of `terraform apply.
        # For later runs it should be set to `false` to prevent any accidential
        # reinitialization of the cluster, e.g. when the first node of this pool
        # is manually deleted via the management console.
        init = true,
      }
      is_control_plane   = true
      schedule_workloads = true
      type               = "cx31" # See available types https://docs.hetzner.com/cloud/servers/overview#shared-vcpu
      count              = 3
      labels = {
        # "control-plane" = "yes"
      }
      taints = {
        # "MyTaint=true" = "NoSchedule"
      }
    }
    workers = {
      is_control_plane   = false
      schedule_workloads = true
      type               = "cx31" # See available types https://docs.hetzner.com/cloud/servers/overview#shared-vcpu
      count              = 3
      count_width        = 2
      labels             = {}
      taints             = {}
    }
  }
}
Yantrio commented 2 months ago

Hi! you can submit a module by going through this issue form: https://github.com/opentofu/registry/issues/new/choose

mogol07 commented 2 months ago

Hi! you can submit a module by going through this issue form: https://github.com/opentofu/registry/issues/new/choose

Hi! I don't understand one thing. This type of issue required signed DCO. But I am not a developer of the module. So I couldn't sign DCO.

abstractionfactory commented 1 month ago

@mogol07 sorry for the delayed reply, I'll try to sort this out as soon as possible.

abstractionfactory commented 1 month ago

Hey @mogol07 we have removed the DCO check, please submit the module using the form.