使用ectdctl添加配置如下:
  ./etcdctl set /nginx/https/www/server/server_name test.com
  ./etcdctl set /nginx/https/www/server/ssl_certificate /home/waf/build/openresty/nginx/cert/client/client.crt
  ./etcdctl set /nginx/https/www/server/ssl_certificate_key /home/waf/build/openresty/nginx/cert/client/client.key;
  /etcdctl set /nginx/https/www/upstream/server1 192.168.1.2:443
  ./etcdctl set /nginx/https/www/upstream/server2 192.168.4.2:443
  confd的执行结果如下所示:

  生成位置文件如下所示:
upstream www_test.com {
server 192.168.1.2:443;
server 192.168.4.2:443;
}
server {
server_name         test.com:443;
ssl on
ssl_certificate     /home/waf/build/openresty/nginx/cert/client/client.crt;
ssl_certificate_key /home/waf/build/openresty/nginx/cert/client/client.key;
location / {
proxy_pass        http://www_test.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect    off;
}
}
  与模板生成的保持一致。