Add consul services
This commit is contained in:
parent
de3530c8d8
commit
6130a3c242
|
@ -12,6 +12,11 @@ job "[[ .instance ]]-controller" {
|
|||
|
||||
[[ template "common/constraints" $c ]]
|
||||
|
||||
service {
|
||||
name = "[[ $.instance ]]-[[ $proto ]]-controller[[ $.consul.suffix ]]"
|
||||
[[ template "common/service_meta" $c ]]
|
||||
}
|
||||
|
||||
restart {
|
||||
interval = "5m"
|
||||
attempts = 30
|
||||
|
|
|
@ -18,6 +18,18 @@ job "democratic-csi-controller" {
|
|||
}
|
||||
|
||||
|
||||
service {
|
||||
name = "democratic-csi-iscsi-controller"
|
||||
meta {
|
||||
alloc = "${NOMAD_ALLOC_INDEX}"
|
||||
group = "${NOMAD_GROUP_NAME}"
|
||||
job = "${NOMAD_JOB_NAME}"
|
||||
namespace = "${NOMAD_NAMESPACE}"
|
||||
node = "${node.unique.name}"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
restart {
|
||||
interval = "5m"
|
||||
attempts = 30
|
||||
|
@ -152,6 +164,18 @@ _EOF
|
|||
}
|
||||
|
||||
|
||||
service {
|
||||
name = "democratic-csi-nfs-controller"
|
||||
meta {
|
||||
alloc = "${NOMAD_ALLOC_INDEX}"
|
||||
group = "${NOMAD_GROUP_NAME}"
|
||||
job = "${NOMAD_JOB_NAME}"
|
||||
namespace = "${NOMAD_NAMESPACE}"
|
||||
node = "${node.unique.name}"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
restart {
|
||||
interval = "5m"
|
||||
attempts = 30
|
||||
|
|
|
@ -8,6 +8,26 @@ job "democratic-csi-node" {
|
|||
|
||||
group "iscsi-node" {
|
||||
|
||||
|
||||
|
||||
constraint {
|
||||
operator = "distinct_hosts"
|
||||
value = "true"
|
||||
}
|
||||
|
||||
|
||||
service {
|
||||
name = "democratic-csi-iscsi-node"
|
||||
meta {
|
||||
alloc = "${node.unique.name}"
|
||||
group = "${NOMAD_GROUP_NAME}"
|
||||
job = "${NOMAD_JOB_NAME}"
|
||||
namespace = "${NOMAD_NAMESPACE}"
|
||||
node = "${node.unique.name}"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
restart {
|
||||
interval = "5m"
|
||||
attempts = 30
|
||||
|
@ -108,6 +128,26 @@ _EOF
|
|||
|
||||
group "nfs-node" {
|
||||
|
||||
|
||||
|
||||
constraint {
|
||||
operator = "distinct_hosts"
|
||||
value = "true"
|
||||
}
|
||||
|
||||
|
||||
service {
|
||||
name = "democratic-csi-nfs-node"
|
||||
meta {
|
||||
alloc = "${node.unique.name}"
|
||||
group = "${NOMAD_GROUP_NAME}"
|
||||
job = "${NOMAD_JOB_NAME}"
|
||||
namespace = "${NOMAD_NAMESPACE}"
|
||||
node = "${node.unique.name}"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
restart {
|
||||
interval = "5m"
|
||||
attempts = 30
|
||||
|
|
|
@ -10,6 +10,13 @@ job "[[ .instance ]]-node" {
|
|||
|
||||
group "[[ $proto ]]-node" {
|
||||
|
||||
[[ template "common/constraints" $c ]]
|
||||
|
||||
service {
|
||||
name = "[[ $.instance ]]-[[ $proto ]]-node[[ $.consul.suffix ]]"
|
||||
[[ template "common/service_meta" $c ]]
|
||||
}
|
||||
|
||||
restart {
|
||||
interval = "5m"
|
||||
attempts = 30
|
||||
|
|
|
@ -75,6 +75,11 @@ democratic_csi:
|
|||
# Settings for node plugins
|
||||
node:
|
||||
|
||||
consul:
|
||||
meta:
|
||||
# Override the alloc meta to use the node name instead of the alloc index
|
||||
alloc: '${node.unique.name}'
|
||||
|
||||
# Resource allocation
|
||||
resources:
|
||||
cpu: 100
|
||||
|
|
Loading…
Reference in New Issue