fix(elk): add CA certificate binding and template for connectors
This commit is contained in:
parent
b140ad0ba5
commit
df2fa66eea
1 changed files with 34 additions and 24 deletions
|
@ -302,6 +302,12 @@ job "elk" {
|
|||
source = "local/config.yml"
|
||||
target = "/config/config.yml"
|
||||
}
|
||||
|
||||
mount {
|
||||
type = "bind"
|
||||
source = "local/elasticsearch-ca.crt"
|
||||
target = "/config/elasticsearch-ca.crt"
|
||||
}
|
||||
}
|
||||
|
||||
resources {
|
||||
|
@ -314,10 +320,18 @@ job "elk" {
|
|||
elasticsearch:
|
||||
host: "https://{{ range service "elk-lb-nginx" }}{{ .Address }}:{{ .Port }}{{ end }}"
|
||||
api_key: "{{ with nomadVar "nomad/jobs/elk/connector/connector" }}{{.api_key}}{{ end }}"
|
||||
tls:
|
||||
verification_mode: certificate
|
||||
certificate_authorities:
|
||||
- |
|
||||
ca_certs: "/config/elasticsearch-ca.crt"
|
||||
connectors:
|
||||
- connector_id: "nKHt9JMBI0Po0M1lBKl2"
|
||||
service_type: "network_drive"
|
||||
api_key: "{{ with nomadVar "nomad/jobs/elk/connector/connector" }}{{.api_key}}{{ end }}"
|
||||
EOF
|
||||
|
||||
destination = "local/config.yml"
|
||||
}
|
||||
|
||||
template {
|
||||
data = <<-EOF
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDSjCCAjKgAwIBAgIVAIBOtzcdNrOdaYVMlCwIwXEon2d5MA0GCSqGSIb3DQEB
|
||||
CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu
|
||||
|
@ -338,13 +352,9 @@ job "elk" {
|
|||
PcZADj93MaxqPOl0H3BMJRcm0tpWVLDqOwFuWFrAb48WgwvJjX4aM5G2zORwjAub
|
||||
3MDhLOwZNtEqgKgmQD8jptUPZqA7fRYAFVxMS4OH
|
||||
-----END CERTIFICATE-----
|
||||
connectors:
|
||||
- connector_id: "nKHt9JMBI0Po0M1lBKl2"
|
||||
service_type: "network_drive"
|
||||
api_key: "{{ with nomadVar "nomad/jobs/elk/connector/connector" }}{{.api_key}}{{ end }}"
|
||||
EOF
|
||||
|
||||
destination = "local/config.yml"
|
||||
destination = "local/elasticsearch-ca.crt"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue