This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1651 from cloudfoundry-incubator/ak-issue-1649-cr…
…edhub-postgres fix: prevent credhub from consuming the postgres bosh-link from auto-scaler postgres
- Loading branch information
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
bosh/releases/pre_render_scripts/credhub/credhub/ig_resolver/patch_job_mf.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit -o nounset | ||
|
||
release="credhub" | ||
job="credhub" | ||
job_mf="/var/vcap/all-releases/jobs-src/${release}/${job}/job.MF" | ||
patch --verbose "${job_mf}" <<'EOT' | ||
@@ -76,11 +76,6 @@ provides: | ||
- credhub.data_storage.type | ||
- credhub.data_storage.username | ||
-consumes: | ||
-- name: postgres | ||
- type: database | ||
- optional: true | ||
- | ||
properties: | ||
credhub.port: | ||
description: "Listening port for the CredHub API" | ||
EOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- /* | ||
========================================================================================== | ||
| _credhub.update $ | ||
+----------------------------------------------------------------------------------------- | ||
| kubecf credhub customization | ||
| - disable consumption of `postgres` bosh-link. It is optional, and we do not | ||
| wish to reconfigure credhub when autoscaler comes online or is switched off. | ||
| I.e. autoscaler provides a postgres link, and we we wish to ignore it. | ||
========================================================================================== | ||
*/}} | ||
{{- define "_credhub.update" }} | ||
{{- $_ := include "_config.lookupManifest" (list $ "instance_groups/name=credhub/jobs/name=credhub") }} | ||
{{- if $.kubecf.retval }} | ||
{{- $_ := set $.kubecf.retval "consumes" (fromYaml "postgres: null") }} | ||
{{- end }} | ||
{{- end }} |