-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupcloud-csi.hcl
46 lines (40 loc) · 983 Bytes
/
upcloud-csi.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
variable "upcloud_username" {
type = string
}
variable "upcloud_password" {
type = string
}
variable "upcloud_zone" {
type = string
}
job "plugin-upcloud-csi" {
datacenters = [var.upcloud_zone]
# system job ensures all nodes in the DC have a copy
type = "system"
# only one plugin of a given type and ID should be deployed on any given client node
constraint {
operator = "distinct_hosts"
value = true
}
group "nodes" {
task "plugin" {
driver = "docker"
config {
image = "ghcr.io/upcloudltd/upcloud-csi:latest"
args = [
"--endpoint=unix:///csi/csi.sock",
"--nodehost=${attr.unique.hostname}",
"--username=${var.upcloud_username}",
"--password=${var.upcloud_password}",
"--log-level=info",
]
privileged = true
}
csi_plugin {
id = "csi-upcloud"
type = "monolith"
mount_dir = "/csi"
}
}
}
}