Skip to content

Commit

Permalink
Expose listen-metrics-urls property
Browse files Browse the repository at this point in the history
  • Loading branch information
making committed Sep 12, 2018
1 parent 50e8f0e commit 6c1d788
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion jobs/etcd/spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ consumes:
properties:
etcd.dns_suffix:
description: If provided, used as a DNS suffix for all nodes in the etcd cluster
tls.etcd.ca:
etcd.metrics_protocol:
description: IF provided with etcd.metrics_port, metrics endpoints listen with the protocol. http or https.
etcd.metrics_port:
description: IF provided with etcd.metrics_protocol, metrics endpoints listen on the port. 2379 and 2380 can not be used.
tls.etcd.ca:
description: CA for etcd client and server authentication
tls.etcd.certificate:
description: Certificate for etcd client and server authentication
Expand Down
3 changes: 2 additions & 1 deletion jobs/etcd/templates/bin/etcd.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ fi
--peer-client-cert-auth \
--peer-trusted-ca-file="/var/vcap/jobs/etcd/config/peer-ca.crt" \
--peer-cert-file="/var/vcap/jobs/etcd/config/peer.crt" \
--peer-key-file="/var/vcap/jobs/etcd/config/peer.key"
--peer-key-file="/var/vcap/jobs/etcd/config/peer.key" \
<% if_p("etcd.metrics_protocol", "etcd.metrics_port") do |protocol, port| %> --listen-metrics-urls=<%= protocol %>://0.0.0.0:<%= port %> \<% end %>
6 changes: 6 additions & 0 deletions manifests/ops-files/change-metrics-url.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- type: replace
path: /instance_groups/name=etcd/jobs/name=etcd/properties/etcd?/metrics_protocol?
value: ((metrics_protocol))
- type: replace
path: /instance_groups/name=etcd/jobs/name=etcd/properties/etcd?/metrics_port?
value: ((metrics_port))

0 comments on commit 6c1d788

Please sign in to comment.