Skip to content

Commit

Permalink
Fix log-cache hostname, added alias
Browse files Browse the repository at this point in the history
[Bug Fixes]

* Fix issue with log-cache hostname from upstream template.  This also
  necessitated adding log-cache from the cf deployment to the
  bosh-dns-aliases as log-cache.service.cf.internal

Added log-cache to bosh-dns-aliases if using log-cache
  • Loading branch information
dennisjbell committed Aug 17, 2023
1 parent 775daec commit 666ffd4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 24 deletions.
53 changes: 30 additions & 23 deletions overlay/enable-log-cache.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
- type: replace
path: /instance_groups/name=asmetrics/jobs/name=eventgenerator/properties/autoscaler/eventgenerator/metricscollector/use_log_cache?
value: true

- type: replace
path: /instance_groups/name=asmetrics/jobs/name=eventgenerator/properties/autoscaler/eventgenerator/metricscollector/host
value: logcache

- type: replace
path: /instance_groups/name=asmetrics/jobs/name=eventgenerator/properties/autoscaler/eventgenerator/metricscollector/port
value: 8080

- type: replace
path: /instance_groups/name=asmetrics/jobs/name=eventgenerator/properties/autoscaler/eventgenerator/metricscollector/ca_cert
value: (( concat "((" meta.cf.credhub_path "log_cache.ca))" ))
- type: replace
path: /instance_groups/name=asmetrics/jobs/name=eventgenerator/properties/autoscaler/eventgenerator/metricscollector/client_cert
value: (( concat "((" meta.cf.credhub_path "log_cache.certificate))" ))

- type: replace
path: /instance_groups/name=asmetrics/jobs/name=eventgenerator/properties/autoscaler/eventgenerator/metricscollector/client_key
value: (( concat "((" meta.cf.credhub_path "log_cache.private_key))" ))

---
instance_groups:
- name: asmetrics
jobs:
- name: eventgenerator
properties:
autoscaler:
eventgenerator:
metricscollector:
use_log_cache: true
host: log-cache.service.cf.internal
port: 8080
ca_cert: (( concat "((" meta.cf.credhub_path "log_cache.ca))" ))
client_cert: (( concat "((" meta.cf.credhub_path "log_cache.certificate))" ))
client_key: (( concat "((" meta.cf.credhub_path "log_cache.private_key))" ))

addons:
- name: bosh-dns-aliases
jobs:
- name: bosh-dns-aliases
properties:
aliases:
- (( merge on domain))
- domain: log-cache.service.cf.internal
targets:
- (( merge on query ))
- query: "*"
deployment: (( grab meta.cf.deployment_name ))
network: (( grab params.cf_core_network ))
domain: bosh
instance_group: log-cache
9 changes: 8 additions & 1 deletion spec/results/new-cf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ addons:
instance_group: nats
network: test-core-network
query: _
- domain: log-cache.service.cf.internal
targets:
- deployment: base-test-cf
domain: bosh
instance_group: log-cache
network: test-core-network
query: '*'
release: bosh-dns-aliases
name: bosh-dns-aliases
- jobs:
Expand Down Expand Up @@ -620,7 +627,7 @@ instance_groups:
ca_cert: <!{credhub}:log_cache.ca!>
client_cert: <!{credhub}:log_cache.certificate!>
client_key: <!{credhub}:log_cache.private_key!>
host: logcache
host: log-cache.service.cf.internal
port: 8080
use_log_cache: true
scaling_engine:
Expand Down

0 comments on commit 666ffd4

Please sign in to comment.