mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-25 09:36:14 +01:00
6835af938c
Signed-off-by: main <magic_rb@redalder.org>
44 lines
817 B
HCL
44 lines
817 B
HCL
variable "flake_ref" {
|
|
type = string
|
|
}
|
|
|
|
variable "flake_sha" {
|
|
type = string
|
|
}
|
|
|
|
resource "nomad_volume" "ingress-letsencrypt" {
|
|
# depends_on = [data.nomad_plugin.nomad-driver-containerd]
|
|
type = "csi"
|
|
plugin_id = "nfs"
|
|
volume_id = "ingress-letsencrypt"
|
|
name = "ingress-letsencrypt"
|
|
external_id = "ingress-letsencrypt"
|
|
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
context = {
|
|
server = "10.64.1.201"
|
|
share = "/var/nfs/ingress-letsencrypt"
|
|
}
|
|
|
|
mount_options {
|
|
fs_type = "nfs"
|
|
mount_flags = [ "nolock", "hard" ]
|
|
}
|
|
}
|
|
|
|
resource "nomad_job" "ingress" {
|
|
jobspec = file("${path.module}/nomad.hcl")
|
|
|
|
hcl2 {
|
|
enabled = true
|
|
vars = {
|
|
flake_ref = var.flake_ref
|
|
flake_sha = var.flake_sha
|
|
}
|
|
}
|
|
}
|