-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Automate Helm Chart Update #763
Conversation
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
For the same of this feature, I am hesitating between |
Please also note that this PR doesn't generate "pipelines" but "pipeline manifest" |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
The auto-discovery feature introduced in this pullrequest , means it should be possible to run updatecli commands without providing any manifest as This commit, 11e468c refactor a bit so we first detect |
I think it would be better to split this pullrequest in two. One about the autodiscovery and a second one about helm chart dependency update |
Here is the documentation that I started on the autodiscovery feature updatecli/website#428 |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
I am just dropping this repository https://github.com/rancher/fleet-examples |
CHANGELOGThe autodiscovery feature is a major feature that land the paving for a new way of using Updatecli It introduces the following changes: Fix Jsonschema DataDue to a regression, the jsonschema expected Updatecli to start with a spec root key. This is fix now Default configBy default, updatecli will look for pipeline manifest in Manifest showIn version 0.27.0, we introduce sub-commands for manifest such as No manifest allowedAs mentioned in the previous section, Updatecli can analyze local files to generate and apply manifest.
Drop target in pullrequest spec before
After
You can easily fix your manifest by running autodiscoveryWARNING: Autodiscovery can be enabled by using the flag The goal of this feature is to parse common files to try to generate and apply manifest. The goal is to reduce to need write and maintain manifest that could easily be generated by Updatecli based on context. Helm crawlerThe first autodiscovery crawler named "helm", allows parsing common Helm chart configuration to update the following information.
Fleet CrawlerA second crawler has been added to help to put things in perspective, it updates helm version from fleet.yaml files An example of autodiscovery manifest would be
|
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
…directory Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Automate Helm Chart Update
Fix #761
This pullrequest is an attempt to automatically generate Updatecli manifest based on a local directory.
I envision two different scenarios, with and without manifest
Without
The default scenario, if we run
updatecli diff
orupdatecli apply
, by default we try to detect available updates from the local directory. Until #716 is done, the default scenario won't support scmWith manifest
This scenario relies on a new configuration, to customize the way we build manifest.
We use this configuration to provide scm configuration, or for example restrict generated manifest based on rules.
We can run one of the following command
updatecli manifest show --config example.yaml
updatecli diff --config example.yaml
updatecli apply --config example.yaml
.example.yaml
First plugin
As a first working scenario, I am using the Helm chart dependency that needs to be updated, but I am considering to use the same approach than for source/condition/target, where we could add more plugins.
For better visibility, I am planning to put this new plugin type in
pkg/plugins/generics
So for a specific directory, I am looking for every Chart.yaml or Chart.yml that have dependencies listed. Then I return one manifest per dependency identified. This means that once merged, we would have a new way to specifies Updatecli manifest
Test
To test this pull request, you can run the following commands:
Additional Information
Tradeoff
Potential improvement
When we run updatecli
diff
orapply
we set the default configuration to "updatecli.yaml" and we trigger an error if no configuration file is available. This is problematic with the builder because we are now in a situation where we may not need any configuration files.Solution A: We don't trigger an error if "updatecli.yaml" is not available
Solution B: We require a new flag such as
updatecli diff --auto
I would be more in favor of not triggering an error if
updatecli.yaml is empty or doesn't exist
PS: Please note that the naming of package, struct, etc. is not definitive and evolve with my understanding of the current problem
another potential improvement is to run
updatecli show
to display detected manifest. Considering thatupdatecli show
don't clone scm repositories, it won't work with remote repositories