We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f2987a commit e10b1c2Copy full SHA for e10b1c2
templates/etcd.tmpl
@@ -1,10 +1,12 @@
1
2
#!/bin/bash
3
4
-
5
{{range $key, $value := .}}
+{{ $addrLen := len $value.Addresses }}
6
+{{ if gt $addrLen 0 }}
7
{{ with $address := index $value.Addresses 0 }}
8
# {{ $value.Name }}
-curl -L http://127.0.0.1:4001/v2/keys/backends/{{ $value.Image.Repository}}/{{printf "%.*s" 12 $value.ID}} -XPUT -d value="{{ $address.IP }}:{{ $address.Port }}" -d ttl=15
9
+curl -XPUT -q -d value="{{ $address.IP }}:{{ $address.Port }}" -d ttl=15 http://127.0.0.1:4001/v2/keys/backends/{{ $value.Image.Repository}}/{{printf "%.*s" 12 $value.ID}}
10
{{ end }}
11
{{end}}
12
+{{end}}
0 commit comments