Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #9 from making/gh-8
Browse files Browse the repository at this point in the history
Expose listen-metrics-urls property
  • Loading branch information
SemanticallyNull committed Sep 13, 2018
2 parents 50e8f0e + 6c1d788 commit 0b9a56b
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 0b9a56b

Please sign in to comment.