Put grafana bootstrap secrets in secrets location

This commit is contained in:
IamTheFij 2022-11-10 13:35:48 -08:00
parent 3077e66e70
commit af32c9e2e5

View File

@ -81,14 +81,8 @@ job "grafana" {
args = [
"/bin/bash",
"-c",
"/usr/bin/mysql --defaults-extra-file=/task/my.cnf < /task/bootstrap.sql",
"/usr/bin/mysql --defaults-extra-file=$${NOMAD_SECRETS_DIR}/my.cnf < $${NOMAD_SECRETS_DIR}/bootstrap.sql",
]
mount {
type = "bind"
source = "local/"
target = "/task/"
}
}
vault {
@ -108,7 +102,7 @@ user=root
password={{ .Data.data.root_password }}
{{ end }}
EOF
destination = "local/my.cnf"
destination = "$${NOMAD_SECRETS_DIR}/my.cnf"
}
template {
@ -123,7 +117,7 @@ SELECT 'NOOP';
{{ end -}}
{{ end -}}
EOF
destination = "local/bootstrap.sql"
destination = "$${NOMAD_SECRETS_DIR}/bootstrap.sql"
}
resources {