Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate rendered manifests upon release #1437

Open
bourgeoisor opened this issue Apr 19, 2023 · 1 comment
Open

Deduplicate rendered manifests upon release #1437

bourgeoisor opened this issue Apr 19, 2023 · 1 comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@bourgeoisor
Copy link
Member

bourgeoisor commented Apr 19, 2023

As of release v0.6.0 (PR: #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:

  • Removing the duplicate config.yaml objects from all other files
  • Removing the duplicate ledger-db.yaml and accounts-db.yaml objects from all other files
  • Removing the duplicate jwt-secret.yaml object from all other files
  • Adding the new ServiceAccount to the config.yaml file (not sure if it's the right place for it, it may deserve its own file, but that would require breaking a tutorial or two).

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 bourgeoisor added type: cleanup An internal cleanup or hygiene concern. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Apr 19, 2023
@bourgeoisor
Copy link
Member Author

This is still important to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant