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

Expose listen-metrics-urls property #9

Merged
merged 1 commit into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))