File tree Expand file tree Collapse file tree 4 files changed +15
-23
lines changed
services/nomad/infrastructure Expand file tree Collapse file tree 4 files changed +15
-23
lines changed Original file line number Diff line number Diff line change @@ -11,28 +11,24 @@ job "nginx-control" {
1111 task "nginx" {
1212 driver = " docker"
1313
14- vault {
15- policies = [" void-secrets-tls" ]
16- }
17-
1814 config {
1915 image = " ghcr.io/void-linux/infra-nginx:20221230RC01"
2016 network_mode = " host"
2117 dns_servers = [" 127.0.0.1" ]
2218 }
2319
24- dynamic "template" {
25- for_each = [
26- " voidlinux.org.crt" ,
27- " voidlinux.org.key" ,
28- ]
20+ template {
21+ data = " {{ with nomadVar \" nomad/jobs/nginx-control\" }}{{ .certificate }}{{ end }}"
22+ destination = " secrets/certs/voidlinux.org.crt"
23+ perms = 400
24+ change_mode = " signal"
25+ }
2926
30- content {
31- data = file (" nginx-sites/${ template . value } " )
32- destination = " secrets/certs/${ template . value } "
33- perms = 400
34- change_mode = " signal"
35- }
27+ template {
28+ data = " {{ with nomadVar \" nomad/jobs/nginx-control\" }}{{ .key }}{{ end }}"
29+ destination = " secrets/certs/voidlinux.org.key"
30+ perms = 400
31+ change_mode = " signal"
3632 }
3733
3834 dynamic "template" {
Original file line number Diff line number Diff line change @@ -22,10 +22,6 @@ job "nginx" {
2222 task "nginx" {
2323 driver = " docker"
2424
25- vault {
26- policies = [" void-secrets-tls" ]
27- }
28-
2925 config {
3026 image = " ghcr.io/void-linux/infra-nginx:20221230RC01"
3127 network_mode = " host"
Original file line number Diff line number Diff line change 1- {{- with secret "secret/lego/data/certificates/_.voidlinux.org.crt " -}}
2- {{.Data.contents }}
1+ {{- with nomadVar "nomad/jobs/nginx " -}}
2+ {{ .certificate }}
33{{- end -}}
Original file line number Diff line number Diff line change 1- {{- with secret "secret/lego/data/certificates/_.voidlinux.org.key " -}}
2- {{.Data.contents }}
1+ {{- with nomadVar "nomad/jobs/nginx " -}}
2+ {{ .key }}
33{{- end -}}
You can’t perform that action at this time.
0 commit comments