So, I'm having trouble trying to get zen discovery working with the confd configuration provided by the elasticsearch-conf package. There seems to be two problems:
The {{range ls "/self/service/metadata/elasticsearch/yml"}} command produces a value called "self" which causes the {{getv (printf "/self/service/metadata/elasticsearch/yml/%s" .)}} call to fail since that key does not exist in the rancher meta data.
The other issue is this call, {{ $containerName := getv (printf "/self/service/containers/%s" .)}} fails. This is odd considering that if I make a curl request to curl http://rancher-metadata/latest/self/service/containers I do in fact see the container that the template is trying to use.
So, I'm having trouble trying to get zen discovery working with the confd configuration provided by the elasticsearch-conf package. There seems to be two problems:
{{range ls "/self/service/metadata/elasticsearch/yml"}}
command produces a value called "self" which causes the{{getv (printf "/self/service/metadata/elasticsearch/yml/%s" .)}}
call to fail since that key does not exist in the rancher meta data.{{ $containerName := getv (printf "/self/service/containers/%s" .)}}
fails. This is odd considering that if I make a curl request tocurl http://rancher-metadata/latest/self/service/containers
I do in fact see the container that the template is trying to use.