feat(elk): add elastic-connectors task to job specification

This commit is contained in:
Ben Martin 2024-12-15 13:15:10 +00:00
parent 61ad166089
commit 042b7baa00
Signed by: ben
GPG key ID: 859A655FCD290E4A

View file

@ -167,6 +167,51 @@ job "elk" {
}
}
group "connectors" {
network {
mode = "bridge"
}
task "elastic-connectors" {
driver = "docker"
config {
image = "docker.elastic.co/integrations/elastic-connectors:${var.elastic_version}"
command = "/app/bin/elastic-ingest"
args = ["-c", "/config/config.yml"]
mount {
type = "bind"
source = "local/config.yml"
targe = "/config/config.yml"
}
}
resources {
cpu = 500
memory = 512
}
template {
data = <<-EOF
{{with nomadVar "nomad/jobs/elk/connectors/elastic-connectors" }}
connectors:
- connector_id: "PDlTypMBJHtNrm356nUt"
service_type: "postgresql"
api_key: "{{.api_key}}"
elasticsearch:
host: "https://hestia.lan:9200"
api_key: "{{.api_key}}"
{{end}}
EOF
destination = "local/config.yml"
}
}
}
group "kibana" {
count = 2