Skip to content

Instantly share code, notes, and snippets.

@MagicRB
Created January 13, 2021 14:20
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MagicRB/c6ad113c68a005e2cdae0ff0cce25322 to your computer and use it in GitHub Desktop.
Save MagicRB/c6ad113c68a005e2cdae0ff0cce25322 to your computer and use it in GitHub Desktop.
type = "csi"
id = "gitea"
name = "gitea"
plugin_id = "nfs"
access_mode = "single-node-writer"
attachment_mode = "file-system"
context {
server = "blowhole.in.redalder.org"
share = "/gitea"
}
mount_options {
fs_type = "nfs"
}
job "gitea" {
datacenters = [ "homelab-1" ]
type = "service"
group "gitea" {
count = 1
network {
port "http" {
static = "8666"
to = "3000"
}
}
volume "gitea" {
type = "csi"
read_only = false
source = "gitea"
}
task "gitea" {
driver = "docker"
volume_mount {
volume = "gitea"
destination = "/data/gitea"
read_only = false
}
config {
image = "gitea:local"
ports = ["http"]
}
resources {
cpu = 250
memory = 1025
}
service {
name = "gitea"
# check {
# type = "http"
# port = "http"
# path = "/"
# interval = "10s"
# timeout = "2s"
# }
}
env {
}
}
}
}
job "plugin-nfs-controller" {
datacenters = [ "homelab-1" ]
group "controller" {
task "plugin" {
driver = "docker"
config {
image = "mcr.microsoft.com/k8s/csi/nfs-csi:latest" # "csi-driver-nfs:local"
args = [
"--endpoint=unix://csi/csi.sock",
"--nodeid=contoller",
"--logtostderr",
"-v=5",
]
}
csi_plugin {
id = "nfs"
type = "controller"
mount_dir = "/csi"
}
resources {
cpu = 250
memory = 128
}
}
}
}
job "plugin-nfs-nodes" {
datacenters = [ "homelab-1" ]
type = "system"
group "nodes" {
task "plugin" {
driver = "docker"
config {
image = "mcr.microsoft.com/k8s/csi/nfs-csi:latest" # "csi-driver-nfs:local"
args = [
"--endpoint=unix://csi/csi.sock",
"--nodeid=blowhole-0",
"--logtostderr",
"--v=5",
]
network_mode = "nfs"
ipv4_address = "172.69.0.10"
privileged = true
}
csi_plugin {
id = "nfs"
type = "node"
mount_dir = "/csi"
}
resources {
cpu = 250
memory = 128
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment