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
1 changed files with 3 additions and 9 deletions

View File

@ -81,14 +81,8 @@ job "grafana" {
args = [ args = [
"/bin/bash", "/bin/bash",
"-c", "-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 { vault {
@ -108,7 +102,7 @@ user=root
password={{ .Data.data.root_password }} password={{ .Data.data.root_password }}
{{ end }} {{ end }}
EOF EOF
destination = "local/my.cnf" destination = "$${NOMAD_SECRETS_DIR}/my.cnf"
} }
template { template {
@ -123,7 +117,7 @@ SELECT 'NOOP';
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
EOF EOF
destination = "local/bootstrap.sql" destination = "$${NOMAD_SECRETS_DIR}/bootstrap.sql"
} }
resources { resources {