Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent config for plugins and templates doesn't filter invalid keys #9001

Open
tgross opened this issue Oct 1, 2020 · 0 comments
Open

agent config for plugins and templates doesn't filter invalid keys #9001

tgross opened this issue Oct 1, 2020 · 0 comments

Comments

@tgross
Copy link
Member

tgross commented Oct 1, 2020

Agent configurations are accepted as valid even if they have invalid keys in the plugin or client.template blocks. This can create confusion for operators (ex, using a config that was added in a later version of Nomad #8960 (comment)) and developers (ex. silently accepting invalid struct tags #8988 (comment))

An example configuration that should be treated as invalid (or at the very least warned against in the logs):

name = "test"
log_level = "DEBUG"
data_dir = "/var/nomad"

server {
  enabled          = true
  bootstrap_expect = 1
}

client {
  enabled = true

  template {
    whatevs = true
    function_blacklist = ["env"]
  }
}

plugin "qemu" {
  whatever = false
}

plugin "raw_exec" {
  whatever = false
  config {
    enabled = true
  }
}

plugin "docker" {
  whatever = false

  config {
    allow_privileged = true
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant