Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
FIX: Update QuarksSecret build script and tests
Browse files Browse the repository at this point in the history
- the build script used to modify the version of the Helm chart from
x.x.x to 0.0.0; some of this was removed in
8fe5ab4 but not the part about checking
out the Chart's changes at the end
- this caused the Chart updates to get missed in that commit
- also includes a test fix to account for the rename of the
quarks-secret deployment

[#177703767](https://www.pivotaltracker.com/story/show/177703767)

Authored-by: Tim Downey <[email protected]>
  • Loading branch information
tcdowney committed Apr 21, 2021
1 parent 8fe5ab4 commit b6e9326
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: quarks-secret
version: x.x.x
appVersion: x.x.x
version: 0.0.0
appVersion: 0.0.0
description: A Helm chart for quarks-secret, a k8s operator to create secrets
home: https://github.com/cloudfoundry-incubator/quarks-secret
icon: https://cloudfoundry-incubator.github.io/quarks-helm/logo.png
Expand Down
9 changes: 0 additions & 9 deletions build/quarks-secret/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

echo "generating QuarksSecret resource definitions..."

chart_yaml=${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret/Chart.yaml

# some versions of sed create this strange file with a -r suffix
if [[ -f ${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret/Chart.yaml-r ]]; then
rm ${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret/Chart.yaml-r
fi

helm template cf-quarks-secret --namespace=cf-system "${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret" \
--values="${SCRIPT_DIR}/quarks-values.yaml" |
ytt --ignore-unknown-comments -f - |
kbld -f "${SCRIPT_DIR}/image-override.yml" -f - > "${SCRIPT_DIR}/../../config/quarks-secret/_ytt_lib/quarks-secret/rendered.yml"

git checkout ${chart_yaml}
4 changes: 2 additions & 2 deletions tests/ytt/quarks_secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var _ = Describe("QuarksSecret", func() {

It("should not have a deployment for quarks secret", func() {
Expect(ctx).To(ProduceYAML(
Not(WithDeployment("cf-quarks-secret", "cf-system")),
Not(WithDeployment("quarks-secret", "cf-system")),
))
})
})
Expand All @@ -67,7 +67,7 @@ var _ = Describe("QuarksSecret", func() {

It("should have a deployment for quarks secret", func() {
Expect(ctx).To(ProduceYAML(
WithDeployment("cf-quarks-secret", "cf-system"),
WithDeployment("quarks-secret", "cf-system"),
))
})
// MAYBE TODO: Add check for the actual CRD?
Expand Down

0 comments on commit b6e9326

Please sign in to comment.