-
Notifications
You must be signed in to change notification settings - Fork 169
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
tk export
: Expand merging capabilities with --merge-strategy
flag
#760
Conversation
Benchstat (compared to main):
|
Documented in `exporting.md`. This option allows us to delete the previously exported manifests for an environment. This is useful when exporting a single environment and merging the result with an existing GitOps repository, rather than re-exporting all environments. I also added benchmark and a test for the export code.
372e749
to
628c729
Compare
6629165
to
5ae2be3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a Tanka core team member, but changes LGTM. Left some minor suggestions.
--delete-previous
option to tk export
tk export
: Expand merging capabilities with --merge-strategy
flag
All input is valued, regardless of status. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This command is powerful when used with the `--merge-strategy=replace-envs` flag added here: #760 Given a repository with a large number of Tanka environments, exporting the whole set can be very time consuming if done on every commit. What a user probably wants to do is to only export the environments that have changed. To do this, we need to actually find out what files affect which environments, and this is what this new command does. A user can now pass the list of files modified in a git commit, and run `tk export` on the set of environments affected by those files.
This command is powerful when used with the `--merge-strategy=replace-envs` flag added here: #760 Given a repository with a large number of Tanka environments, exporting the whole set can be very time consuming if done on every commit. What a user probably wants to do is to only export the environments that have changed. To do this, we need to actually find out what files affect which environments, and this is what this new command does. A user can now pass the list of files modified in a git commit, and run `tk export` on the set of environments affected by those files.
* Add new `tk tool importers` command This command is powerful when used with the `--merge-strategy=replace-envs` flag added here: #760 Given a repository with a large number of Tanka environments, exporting the whole set can be very time consuming if done on every commit. What a user probably wants to do is to only export the environments that have changed. To do this, we need to actually find out what files affect which environments, and this is what this new command does. A user can now pass the list of files modified in a git commit, and run `tk export` on the set of environments affected by those files. * Add comments and simplify functions
Documented in
exporting.md
. This option expands the existing--merge
flag (now deprecated) to allow us to delete the previously exported manifests for an environment before exporting. This strategy has been in-use (in private code) for about 6 months here at Grafana Labs.This is useful when exporting a single environment and merging the result with an existing GitOps repository, rather than re-exporting all environments.
I also added benchmark and a test for the export code.