You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
NOTE: This is pre-release draft text for the ApplicationSet 0.3.0 release notes: content is not relevant until on or after release day.
(Pre-release Draft) Release Notes
I am happy to announce the latest release of the Argo CD ApplicationSet controller, v0.3.0. Many new features were contributed as part of this release, including two new generators, improved error reporting and handling, support for webhook-based refresh trigger, plus doc updates, usability improvements, stability fixes, and more.
With ApplicationSet v0.3.0, a new Pull Request generator has been contributed which uses the API of an SCMaaS provider (e.g. GitHub) to automatically discover open pull requests within an repository. This fits well with users that wish to construct a test environment based on an open pull request.
In this example, we will create an Argo CD Application resource for each open pull request:
apiVersion: argoproj.io/v1alpha1kind: ApplicationSetmetadata:
name: myappsspec:
generators:
- pullRequest:
github:
# The GitHub organization or user.owner: myorg# The Github repositoryrepo: myrepository# For GitHub Enterprise (optional)api: https://git.example.com/# Reference to a Secret containing an access token. (optional)tokenRef:
secretName: github-tokenkey: token# Labels is used to filter the PRs that you want to target. (optional)labels:
- previewtemplate:
# (template the Application using PR generator params)...
Also new in this release is the Merge generator, which is useful when you want to selectively override the parameters generated by one generator, with those generated by another.
In this example, we first gather the list of clusters from Argo CD, then we 'patch' only those clusters with label use-kakfa: false, and finally we enable redis on a specfic cluster:
apiVersion: argoproj.io/v1alpha1kind: ApplicationSetmetadata:
name: cluster-gitspec:
generators:
# merge 'parent' generator
- merge:
mergeKeys:
- servergenerators:
# Generate parameters for all Argo CD clusters
- clusters:
values:
kafka: 'true'redis: 'false'# For clusters with a specific label, enable Kafka.
- clusters:
selector:
matchLabels:
use-kafka: 'false'values:
kafka: 'false'# For a specific cluster, enable Redis.
- list:
elements:
- server: https://2.4.6.8values.redis: 'true'
Report error conditions/status for ApplicationSet CR
When the user-provided generator/template produce invalid Argo CD Applications, the ApplicationSet resource's status field will now report errors (or the lack thereof). Here is an example of the new status conditions:
apiVersion: argoproj.io/v1alpha1kind: ApplicationSetmetadata:
name: myappsspec:
generators: # (...)template: # (...)status:
conditions:
- lastTransitionTime: "2021-11-23T05:47:08Z"type: ErrorOccurredstatus: "False"reason: ApplicationSetUpToDatemessage: Successfully generated parameters for all Applications
- lastTransitionTime: "2021-11-23T05:47:08Z"type: ParametersGeneratedmessage: Successfully generated parameters for all Applicationsreason: ParametersGeneratedstatus: "True"
- lastTransitionTime: "2021-11-23T05:47:08Z"type: ResourcesUpToDatestatus: "True"reason: ApplicationSetUpToDatemessage: ApplicationSet up to date
On parameter generation failure or templating failure, those errors will be reported under the appropriate conditions. Contributed by @ishitasequeira.
Git Generator: Refresh ApplicationSet resource with Git generator using webhook
This feature adds support for refreshing ApplicationSets via a GitHub webhook trigger. It exposes a service which listens for incoming webhook payloads, and once received triggers the ApplicationSet controller to regenerate resources. In contrast, with the previous release, the ApplicationSet controller only supported polling the Git repository used by the Git generator every 3 mins (but this is at least customizable).
This contribution also adds general support for webhooks, which is used by the Pull Request generator webhook code, below.
Gracefully handle application validation errors
This feature changes how the ApplicationSet controller handles ApplicationSets that generate invalid Applications. Previously, if at least one Application in the ApplicationSet was invalid, the controller would refuse to proceed further and would skip all Application processing (i.e. it would 'fail fast'). Now, the controller will process valid Applications, and only skip invalid Applications (logging information about them to the console).
When using a Pull Request generator, the ApplicationSet controller polls every requeueAfterSeconds interval (defaulting to every 30 minutes) to detect changes. To eliminate this delay from polling, the ApplicationSet webhook server can be configured to receive webhook events, which will refresh the parameters generated by the Pull Request generator, and thus the corresponding Application resources.
Support -logformat=json as parameter to applicationset-controller
This feature adds a new --logformat=json parameter to the applicationset-controller, which switches the logging output of the ApplicationSet controller to JSON. Contributed by @shivjm.
SCM Generator: Provide SHA for latest commit on a branch in variables (#307)
This feature adds SHA to the list of parameters exposed by the SCM Generator, with the SHA parameter representing the latest commit. Contributed by @TMaYaD.
The Git files generator was consuming too much time (and driving up Git requests) due to inadvertently executing 'git fetch/git checkout' for each discovered file within the repository. With ApplicationSet v0.3.0, that has improved such that we will now issue a Git checkout/fetch repo once per refresh. Contributed by @alexmt.
Fixes, test fixes, infrastructure improvements, and documentation updates
Fixes
Fix: new variable for the normalized version of name field (#390, contributed by @chetan-rns)
Fixes GitLab RepoHasPath error handling (#423, contributed by @benoitg31)
Test/infrastructure improvements:
Investigate Argo CD deletion failure messages when running ApplicationSet E2E tests in on-cluster configuration (#392, contributed by @jgwest)
Update master branch VERSION file and metadata, and pull up release changes from 0.2.0 (#343, contributed by @jgwest)
Skip E2E tests that require GitHub token, if not specified (#380, contributed by @jgwest)
API rate limit error in image publish action (#368, contributed by @jgwest)
Disable SCM Provider Unit tests on PRs (#337, contributed by @jgwest)
Fix Git Generator Files path example in docs (#408, contributed by @mbarecki)
Corrected wrong info about path and path.basename (#412, contributed by @olvesh)
Upgrade Notes
When moving from ApplicationSet v0.1.0/v0.2.0, to v0.3.0, there are two behaviour changes to be aware of.
Cluster generator: {{name}} parameter value will no longer be normalized, but existing normalization behaviour is preserved in a new {{nameNormalized}} parameter
The Cluster generator {{name}} parameter has now reverted to its original behaviour: the cluster name within Argo CD will no longer be normalized. The {{name}} parameter generated by the Cluster generator within the ApplicationSet will now be passed unmodified to the ApplicationSet template.
A new parameter, {{nameNormalized}} has been introduced which preserves the 0.2.0 behaviour. This allows you to choose which behaviour you wish to use in your ApplicationSet, based on the context in which it is used: either using the parameter as defined, or in a normalized form (which allows it to be used in the name field of an Application resource.)
If your Argo CD cluster names are already valid, no change is required. However, to preserve the v0.2.0 behaviour of your ApplicationSet, replace {{name}} with {{nameNormalized}} within your ApplicationSet template.
If an ApplicationSet contains an invalid generated Application, the valid generated Applications will still be processed
The responsibility of the ApplicationSet controller is to convert an ApplicationSet resource into one or more Application resources. However, with the previous releases, if at least one of the generated Application resources was invalid (e.g. it failed the internal validation logic), none of the generated Applications would be processed (they would not be neither created nor modified).
With the latest ApplicationSet release, if a generator generates invalid Applications, those invalid generated Applications will still be skipped, but the valid generated Applications will now be processed (created/modified).
Thus no ApplicationSet resource changes are required by this upgrade, but it is worth keeping in mind that your ApplicationSets which were previously blocked by a failing Application may no longer be blocked. This change might cause valid Applications to now be created/modified, whereas previously they were prevented from being processed.
Once installed, the ApplicationSet controller requires no additional setup. You can learn more about ApplicationSet controller installation from the Getting Started page.
The text was updated successfully, but these errors were encountered:
NOTE: This is pre-release draft text for the ApplicationSet 0.3.0 release notes: content is not relevant until on or after release day.
(Pre-release Draft) Release Notes
I am happy to announce the latest release of the Argo CD ApplicationSet controller, v0.3.0. Many new features were contributed as part of this release, including two new generators, improved error reporting and handling, support for webhook-based refresh trigger, plus doc updates, usability improvements, stability fixes, and more.
You can learn more about this release from the ApplicationSet documentation, or check out the project repository and learn how you can contribute.
Contributors
Thanks to all the folks who have contributed to the ApplicationSet controller since our last release.
Want to join us for our next release? Check out the project repository (https://github.com/argoproj-labs/applicationset) or visit us on #argo-cd-appset on Slack (https://argoproj.github.io/community/join-slack/).
New in this release
New generator: Pull Request generator
With ApplicationSet v0.3.0, a new Pull Request generator has been contributed which uses the API of an SCMaaS provider (e.g. GitHub) to automatically discover open pull requests within an repository. This fits well with users that wish to construct a test environment based on an open pull request.
In this example, we will create an Argo CD
Application
resource for each open pull request:To learn more, check out the Pull Request generator documentation for details. Contributed by @shmurata.
New generator: Merge generator
Also new in this release is the Merge generator, which is useful when you want to selectively override the parameters generated by one generator, with those generated by another.
In this example, we first gather the list of clusters from Argo CD, then we 'patch' only those clusters with label
use-kakfa: false
, and finally we enable redis on a specfic cluster:See the Merge generator documentation for a full example, and for details on generator behaviour. Contributed by @crenshaw-dev.
Report error conditions/status for ApplicationSet CR
When the user-provided generator/template produce invalid Argo CD Applications, the
ApplicationSet
resource's status field will now report errors (or the lack thereof). Here is an example of the new status conditions:On parameter generation failure or templating failure, those errors will be reported under the appropriate conditions. Contributed by @ishitasequeira.
Git Generator: Refresh ApplicationSet resource with Git generator using webhook
This feature adds support for refreshing ApplicationSets via a GitHub webhook trigger. It exposes a service which listens for incoming webhook payloads, and once received triggers the ApplicationSet controller to regenerate resources. In contrast, with the previous release, the ApplicationSet controller only supported polling the Git repository used by the Git generator every 3 mins (but this is at least customizable).
See the webhook documentation for details. Contributed by @chetan-rns.
This contribution also adds general support for webhooks, which is used by the Pull Request generator webhook code, below.
Gracefully handle application validation errors
This feature changes how the ApplicationSet controller handles ApplicationSets that generate invalid
Application
s. Previously, if at least one Application in the ApplicationSet was invalid, the controller would refuse to proceed further and would skip all Application processing (i.e. it would 'fail fast'). Now, the controller will process valid Applications, and only skip invalid Applications (logging information about them to the console).Contributed by @alexmt.
Pull Request generator: Support for webhooks
When using a Pull Request generator, the ApplicationSet controller polls every
requeueAfterSeconds
interval (defaulting to every 30 minutes) to detect changes. To eliminate this delay from polling, the ApplicationSet webhook server can be configured to receive webhook events, which will refresh the parameters generated by the Pull Request generator, and thus the correspondingApplication
resources.More information on configuring webhooks with the Pull Request generator is available from the Pull Request generator documentation. Contributed by @shmurata.
Support
-logformat=json
as parameter to applicationset-controllerThis feature adds a new
--logformat=json
parameter to the applicationset-controller, which switches the logging output of the ApplicationSet controller to JSON. Contributed by @shivjm.SCM Generator: Provide SHA for latest commit on a branch in variables (#307)
This feature adds SHA to the list of parameters exposed by the SCM Generator, with the SHA parameter representing the latest commit. Contributed by @TMaYaD.
Improve Git files generator performance (#355)
The Git files generator was consuming too much time (and driving up Git requests) due to inadvertently executing 'git fetch/git checkout' for each discovered file within the repository. With ApplicationSet v0.3.0, that has improved such that we will now issue a Git checkout/fetch repo once per refresh. Contributed by @alexmt.
Fixes, test fixes, infrastructure improvements, and documentation updates
Fixes
Test/infrastructure improvements:
Doc updates
Upgrade Notes
When moving from ApplicationSet v0.1.0/v0.2.0, to v0.3.0, there are two behaviour changes to be aware of.
Cluster generator:
{{name}}
parameter value will no longer be normalized, but existing normalization behaviour is preserved in a new{{nameNormalized}}
parameterThe Cluster generator
{{name}}
parameter has now reverted to its original behaviour: the cluster name within Argo CD will no longer be normalized. The{{name}}
parameter generated by the Cluster generator within the ApplicationSet will now be passed unmodified to the ApplicationSet template.A new parameter,
{{nameNormalized}}
has been introduced which preserves the 0.2.0 behaviour. This allows you to choose which behaviour you wish to use in your ApplicationSet, based on the context in which it is used: either using the parameter as defined, or in a normalized form (which allows it to be used in thename
field of anApplication
resource.)If your Argo CD cluster names are already valid, no change is required. However, to preserve the v0.2.0 behaviour of your ApplicationSet, replace
{{name}}
with{{nameNormalized}}
within your ApplicationSet template.More information about this change is available from the issue.
If an ApplicationSet contains an invalid generated Application, the valid generated Applications will still be processed
The responsibility of the ApplicationSet controller is to convert an
ApplicationSet
resource into one or moreApplication
resources. However, with the previous releases, if at least one of the generatedApplication
resources was invalid (e.g. it failed the internal validation logic), none of the generated Applications would be processed (they would not be neither created nor modified).With the latest ApplicationSet release, if a generator generates invalid Applications, those invalid generated Applications will still be skipped, but the valid generated Applications will now be processed (created/modified).
Thus no
ApplicationSet
resource changes are required by this upgrade, but it is worth keeping in mind that your ApplicationSets which were previously blocked by a failing Application may no longer be blocked. This change might cause valid Applications to now be created/modified, whereas previously they were prevented from being processed.More information about this change is available from the issue.
Installation
The ApplicationSet controller must be installed into the same namespace as the Argo CD it is targeting:
Once installed, the ApplicationSet controller requires no additional setup. You can learn more about ApplicationSet controller installation from the Getting Started page.
The text was updated successfully, but these errors were encountered: