Skip to content

Commit 6e049be

Browse files
authored
New configs for the grpc loggregator client (#644)
1 parent 996ade2 commit 6e049be

12 files changed

Lines changed: 43 additions & 23 deletions

File tree

jobs/cloud_controller_clock/spec

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,6 @@ properties:
426426
description: "The internal URL used by UAA"
427427
default: "uaa.service.cf.internal"
428428

429-
metron_endpoint.host:
430-
description: "The host used to emit messages to the Metron agent"
431-
default: "127.0.0.1"
432-
metron_endpoint.port:
433-
description: "The port used to emit messages to the Metron agent"
434-
default: 3457
435-
436429
cc.db_encryption_key:
437430
default: ""
438431
description: "key for encrypting sensitive values in the CC database"

jobs/cloud_controller_clock/templates/cloud_controller_ng.yml.erb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ logging:
142142

143143
log_audit_events: <%= p("cc.log_audit_events") %>
144144

145-
loggregator:
146-
router: <%= p("metron_endpoint.host") %>:<%= p("metron_endpoint.port") %>
147-
148145
<% db = p("ccdb.databases").find { |db| db["tag"] == "cc" } %>
149146
<% db_role = p("ccdb.roles").find { |role| role["tag"] == "admin" } %>
150147
<%

jobs/cloud_controller_ng/spec

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ templates:
6868
credhub_ca.crt.erb: config/certs/credhub_ca.crt
6969
prom_scraper_config.yml.erb: config/prom_scraper_config.yml
7070
cloud_controller_local_worker_override.yml.erb: config/cloud_controller_local_worker_override.yml
71-
71+
loggregator_tls.crt.erb: config/certs/loggregator_tls.crt
72+
loggregator_tls.key.erb: config/certs/loggregator_tls.key
73+
loggregator_tls_ca.crt.erb: config/certs/loggregator_tls_ca.crt
7274
packages:
7375
- storage-cli
7476
- capi_utils
@@ -819,7 +821,7 @@ properties:
819821
default: "127.0.0.1"
820822
metron_endpoint.port:
821823
description: "The port used to emit messages to the Metron agent"
822-
default: 3457
824+
default: 3458
823825

824826
doppler.use_ssl:
825827
description: "Whether to use ssl for the doppler_logging_endpoint listed at /v2/info"
@@ -1304,10 +1306,16 @@ properties:
13041306
cc.logcache_tls.subject_name:
13051307
description: "The host name the client will accept on the server certificate when communicating with Log Cache via mTLS"
13061308
default: "log_cache"
1307-
1308-
cc.loggregator.internal_url:
1309-
description: "Internal URL used to communicate with traffic_controller"
1310-
default: "http://loggregator-trafficcontroller.service.cf.internal:8081"
1309+
1310+
cc.loggregator_tls.ca_cert:
1311+
description: "PEM-encoded CA certificate for mTLS communication with Loggregator"
1312+
cc.loggregator_tls.certificate:
1313+
description: "PEM-encoded client certificate for mTLS communication with Loggregator"
1314+
cc.loggregator_tls.private_key:
1315+
description: "PEM-encoded private key for mTLS communication with Loggregator"
1316+
cc.loggregator_tls.subject_name:
1317+
description: "The host name the client will accept on the server certificate when communicating with Loggregator via mTLS"
1318+
default: "metron"
13111319

13121320
credhub_api.hostname:
13131321
description: "Hostname used to resolve the address of CredHub"

jobs/cloud_controller_ng/templates/cloud_controller_ng.yml.erb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,11 @@ logcache_tls:
185185
subject_name: <%= p("cc.logcache_tls.subject_name") %>
186186

187187
loggregator:
188-
router: <%= p("metron_endpoint.host") %>:<%= p("metron_endpoint.port") %>
189-
internal_url: <%= p("cc.loggregator.internal_url") %>
188+
endpoint: <%= p("metron_endpoint.host") %>:<%= p("metron_endpoint.port") %>
189+
subject_name: <%= p("cc.loggregator_tls.subject_name") %>
190+
key_file: /var/vcap/jobs/cloud_controller_ng/config/certs/loggregator_tls.key
191+
cert_file: /var/vcap/jobs/cloud_controller_ng/config/certs/loggregator_tls.crt
192+
ca_file: /var/vcap/jobs/cloud_controller_ng/config/certs/loggregator_tls_ca.crt
190193

191194
log_stream:
192195
url: https://log-stream.<%= p("system_domain") %>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%= p('cc.loggregator_tls.certificate', '') %>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%= p('cc.loggregator_tls.private_key', '') %>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%= p('cc.loggregator_tls.ca_cert', '') %>

jobs/cloud_controller_worker/spec

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ templates:
2929
mutual_tls_ca.crt.erb: config/certs/mutual_tls_ca.crt
3030
mutual_tls.crt.erb: config/certs/mutual_tls.crt
3131
mutual_tls.key.erb: config/certs/mutual_tls.key
32+
loggregator_tls_ca.crt.erb: config/certs/loggregator_tls_ca.crt
33+
loggregator_tls.crt.erb: config/certs/loggregator_tls.crt
34+
loggregator_tls.key.erb: config/certs/loggregator_tls.key
3235
uaa_ca.crt.erb: config/certs/uaa_ca.crt
3336
db_ca.crt.erb: config/certs/db_ca.crt
3437
prom_scraper_config.yml.erb: config/prom_scraper_config.yml
@@ -423,7 +426,7 @@ properties:
423426
default: "127.0.0.1"
424427
metron_endpoint.port:
425428
description: "The port used to emit messages to the Metron agent"
426-
default: 3457
429+
default: 3458
427430

428431
cc.broker_client_timeout_seconds:
429432
default: 60
@@ -611,9 +614,15 @@ properties:
611614
description: "Maximum PID limit for containerized work running user-provided code"
612615
default: 1024
613616

614-
cc.loggregator.internal_url:
615-
description: "Internal URL used to communicate with traffic_controller"
616-
default: "http://loggregator-trafficcontroller.service.cf.internal:8081"
617+
cc.loggregator_tls.ca_cert:
618+
description: "PEM-encoded CA certificate for mTLS communication with Loggregator"
619+
cc.loggregator_tls.certificate:
620+
description: "PEM-encoded client certificate for mTLS communication with Loggregator"
621+
cc.loggregator_tls.private_key:
622+
description: "PEM-encoded private key for mTLS communication with Loggregator"
623+
cc.loggregator_tls.subject_name:
624+
description: "The host name the client will accept on the server certificate when communicating with Loggregator via mTLS"
625+
default: "metron"
617626

618627
cc.perform_blob_cleanup:
619628
description: "Whether or not to perform the blob cleanup job"

jobs/cloud_controller_worker/templates/cloud_controller_ng.yml.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ logging:
9494
log_audit_events: <%= p("cc.log_audit_events") %>
9595

9696
loggregator:
97-
router: <%= p("metron_endpoint.host") %>:<%= p("metron_endpoint.port") %>
97+
endpoint: <%= p("metron_endpoint.host") %>:<%= p("metron_endpoint.port") %>
98+
subject_name: <%= p("cc.loggregator_tls.subject_name") %>
99+
key_file: /var/vcap/jobs/cloud_controller_worker/config/certs/loggregator_tls.key
100+
cert_file: /var/vcap/jobs/cloud_controller_worker/config/certs/loggregator_tls.crt
101+
ca_file: /var/vcap/jobs/cloud_controller_worker/config/certs/loggregator_tls_ca.crt
98102

99103
<% db = p("ccdb.databases").find { |db| db["tag"] == "cc" } %>
100104
<% db_role = p("ccdb.roles").find { |role| role["tag"] == "admin" } %>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%= p('cc.loggregator_tls.certificate', '') %>

0 commit comments

Comments
 (0)