Skip to content

Commit

Permalink
Restored bosh-dns release for rc addon
Browse files Browse the repository at this point in the history
[Bug Fixes]

* The ocfp runtime config was fixed to use the upstream bosh
  deployment's provided dns runtime, with the option to override it with
  overlay/releases/bosh-dns.yml.  Since there was no need to have an
  override, that overlay file was reduced to a no-op.  Unfortunately,
  that impacted the non-ocfp rc addon.  This fix allows that addon to
  also use the release provided by the upstream bosh-deployment and an
  optional override from the overlay file.
  • Loading branch information
dennisjbell committed Oct 5, 2023
1 parent c7a8256 commit f2653c6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions hooks/addon-runtime-config~rc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ params_dns_cache="$(lookup params.dns_cache 'true')"
exodus="$(exodus --all)"
IFS=',' read -ra features <<< "$(echo "$exodus" | jq -r .features)"

get_upstream_dns_release() {
spruce json bosh-deployment/runtime-configs/dns.yml \
| jq '.releases | {releases: .} ' \
| spruce merge
}

upload_runtime_config() {
name="${1:-default}"
contents="$2"
Expand All @@ -57,7 +63,8 @@ get_runtime_config() {
}

generate_dns_runtime() {
cat <<EOF
spruce merge --skip-eval --fallback-append\
<(cat <<EOF
addons:
- include:
stemcell:
Expand Down Expand Up @@ -108,7 +115,9 @@ EOF
release: bosh-dns
name: bosh-dns
EOF
cat overlay/releases/bosh-dns.yml
) \
<(get_upstream_dns_release) \
<(cat overlay/releases/bosh-dns.yml)
}

generate_ops_access_runtime() {
Expand Down

0 comments on commit f2653c6

Please sign in to comment.