[Demo with Importer] Update Argo CD from v2.1.0 to v2.1.2 with Importer #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Overview
This upgrades Argo CD from v2.1.0 to v2.1.2, using "Importer".
Details
🌄 What Is Importer?
Importer is a CLI tool to import any lines from any file.
It is designed to be "dumb", and simply imports lines without doing any validation. It is not specifically made for handling YAML and Kubernetes configuration files, and thus can be used in essentially any files, even along with Kustomize and Helm.
Benefits
🌟 Clear Diff
Although the change is about 3rd party tool upgrade, you can clearly track what the change is about.
📚 Clear Commit History
Because changes are always made in files, you can easily track the change history.
Also, if Importer is used to import data from URL, you will be able to see if the data from the target URL changes its content.
🔮 No Hidden Dependency
Because Importer only import data and saves it as a part of the file, the import target is clearly annotated, there is no hidden dependencies, and no magic happening.
Things to Consider
🚀 Tooling and Automation
Because Importer is yet another CLI tool, you need to have it installed on your machine to update the spec. This may be a drawback by itself, as GitOps solutions such as Argo CD and Flux provide native support for Helm and Kustomize. But Importer is more about the workflow - and it provides very clear, truly declarative files.
Importer installation is as simple as
brew install upsidr/tap/importer
, and can be used as a part of CI pipeline, including GitHub Action.This repository has 2 Importer based automations set up.
importer-ci.yaml
: Runimporter update
on all relevant YAML files, and confirm there is no file changeimporter-update.yaml
(used inchatops-for-pr.yaml
): Runimporter update
command when a comment/run-importer-update
is provided in PRWith a setup like this, we get the benefit of Importer, while ensuring the code integrity with Importer.