GoogleCloudPlatform / bank-of-anthos

Retail banking sample application showcasing Kubernetes and Google Cloud
https://cymbal-bank.fsi.cymbal.dev
Apache License 2.0
981 stars 580 forks source link

Deduplicate rendered manifests upon release #1437

Open bourgeoisor opened 1 year ago

bourgeoisor commented 1 year ago

As of release v0.6.0 (PR: https://github.com/GoogleCloudPlatform/bank-of-anthos/pull/1425), release Kubernetes manifests are no longer copy-pasted from a staging directory. Instead, they are programmatically generated using skaffold render (see https://github.com/GoogleCloudPlatform/bank-of-anthos/blob/release/v0.6.0/docs/releasing/make-release.sh#L60-L72).

Since we want to keep parity with the pre-v0.6.0 versions of Bank of Anthos which had each microservice in a different file, this causes some issues wherein duplicate Kubernetes objects are rendered in multiple files:

. . .
secret/jwt-key unchanged
deployment.apps/loadgenerator created
configmap/ledger-db-config unchanged
service/ledger-db unchanged
statefulset.apps/ledger-db unchanged
namespace/bank-of-anthos-development unchanged
serviceaccount/bank-of-anthos unchanged
configmap/demo-data-config unchanged
configmap/environment-config unchanged
configmap/service-api-config unchanged
secret/jwt-key unchanged
service/transactionhistory created
deployment.apps/transactionhistory created
namespace/bank-of-anthos-development unchanged
serviceaccount/bank-of-anthos unchanged
configmap/demo-data-config unchanged
. . .

For release v0.6.0, I have taken the action of manually:

We should look into automating the above steps for new releases, or finding an alternative solution. I have looked into diff, comm, and third-party tools like dyff, but none of them works out great when diff'ing out entire objects.

bourgeoisor commented 11 months ago

This is still important to do.