Skip to content

Commit

Permalink
docs: show distinct_hosts constraint for CSI plugins (hashicorp#9052)
Browse files Browse the repository at this point in the history
CSI plugins with the same plugin ID and type (controller, node, monolith) will
collide on a host, both in the communication socket and in the dynamic plugin
registry. Until this can be fixed, leave notice to operators in the
documentation.
  • Loading branch information
tgross authored and fredrikhgrelland committed Oct 22, 2020
1 parent 19660f3 commit 7a25993
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions website/pages/docs/job-specification/csi_plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ the `node` or `monolith` plugin for those volumes. You should run `node` or
flag on `nomad node drain` to ensure that the plugins are running while the
node is being drained.

~> **Note:** Only one plugin instance of a given plugin ID and type
(controller or node) should be deployed on any given client node. Use a
constraint as shown below.


## `csi_plugin` Examples

```hcl
Expand All @@ -66,6 +71,13 @@ job "plugin-efs" {
# as a 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"
Expand Down

0 comments on commit 7a25993

Please sign in to comment.