Skip to content

Commit

Permalink
update promfetcher config for v1.0.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mdimiceli committed May 22, 2024
1 parent c5a9d22 commit de56ba7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 16 deletions.
43 changes: 28 additions & 15 deletions jobs/promfetcher/spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ packages:
- promfetcher

properties:
gorouter_dns:
description: "Bosh dns entries to find set of gorouters"
default:
- entry: "gorouter.service.cf.internal"
domain: "bosh"
network: "default"
deployment: "cf"
instance_group: "router"


promfetcher.port:
default: 443
Expand Down Expand Up @@ -107,13 +98,35 @@ properties:
description: "Maximum concurrent TCP connections per backend. When set to 0 there is no limit"
default: 500

promfetcher.gorouters:
description: "Gorouter to connect to"
promfetcher.nats.user:
description: User name for NATS authentication
default: nats
promfetcher.nats.password:
description: Password for NATS authentication
promfetcher.nats.hosts:
description: Hostnames (and/or IPs) and port of each NATS cluster member
default:
- host: gorouter.service.cf.internal
port: 8080
user: router-status
password: ""
- hostname: nats.service.cf.internal
port: 4224
promfetcher.nats.tls_enabled:
description: When enabled, Promfetcher will prefer to connect to NATS over TLS
default: true
promfetcher.nats.ca_certs:
description: "String of concatenated certificate authorities in PEM format, used to validate certificates presented by NATS."
promfetcher.nats.cert_chain:
description: Certificate chain used for client authentication to NATS. In PEM format.
promfetcher.nats.private_key:
description: Private key used for client authentication to NATS. In PEM format.

promfetcher.droplet_stale_threshold
description: "Promfetcher will prune routes that it considers to be stale based upon droplet_stale_threshold value"
default: 120s
promfetcher.start_response_delay_interval
description: |
On startup, Promfetcher will delay listening for requests by this duration to increase likelihood that it has a complete routing table before serving requests.
Promfetcher also broadcasts the same duration as a recommended interval to registering clients via NATS.
This must be less than 60, otherwise monit will mark the process as failed.
default: 20s

promfetcher.external_exporters:
description: |
Expand Down
14 changes: 13 additions & 1 deletion jobs/promfetcher/templates/config.yml.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
---
gorouters: <%= p('promfetcher.gorouters').to_json %>

nats:
tls_enabled: <%= p("promfetcher.nats.tls_ebabled") %>
ca_certs: <%= p("promfetcher.nats.ca_certs") %>
cert_chain: <%= p("promfetcher.nats.cert_chain") %>
private_key: <%= p("promfetcher.nats.private_key") %>
hosts: <%= p("promfetcher.nats.hosts").to_json %>
user: <%= p("promfetcher.nats.tls_ebabled") %>
pass: <%= p("promfetcher.nats.tls_ebabled") %>

start_response_delay_interval: <%= p("promfetcher.start_response_delay_interval") %>
droplet_stale_threshold: <%= p("promfetcher.droplet_stale_threshold:") %>
<%=
backend_cert_chain = ''
backend_private_key = ''
Expand Down

0 comments on commit de56ba7

Please sign in to comment.