Version 0.4.0 Released
This release adds a new feature that was previously a hard-coded behavior within Platz.
New: Helm Tag Format
Helm tags are parsed when a new chart is pushed to extract information such as the Git branch.
This allows the Platz frontend to understand when a new chart is a candidate for upgrade by deducing that a push to the same branch is probably a newer version.
The new feature allows site admins to add new tag formats, which also means parsing Helm tags has moved to the backend. Information about the parsed tag is available through the /api/v2/helm-charts API.
Tag Format Pattern
Platz expects tag formats to be Perl-style regular expressions, with the following named groups:
versionrevisionbranchcommit
version is used as the name of the version installed for a deployment. revision is usually used to signal minor changes for a specific version, so it's displayed as version-revision even if the tag contains them separately.
When the branch group contains a non-empty result, Platz uses it to display a branch name, where master and main get a special primary-color formatting.
When commit contains a non-empty result, it's displayed along the parsed version name.
Built-In Formats
The following two tag formats are added automatically when upgrading to this release:
This format matched what you'd normally get from git describe --tags, with the branch name appended to the end of the result:
^(chart-)?v?(?P<version>\d+\.\d+\.\d+)((-(?P<revision>\d+))?(-g(?P<commit>[0-9a-zA-Z]+))?-(?P<branch>[-\w]+))?$
This format matches what a lot of common GitHub Actions plugins generate when auto-tagging a release:
^(chart-)?v?(?P<version>\d+\.\d+\.\d+)-(?P<branch>[-_A-Za-z0-9]+)\.(?P<revision>\d+)$
The chart- optional prefix exists for Platz users of version 0.2 and below, where Helm charts might have been hosted in the same repo as the Docker images, forcing users to push charts with a custom prefix.
When Tags Are Parsed
Platz scans all Helm charts when the platz-chart-discovery worker starts, and whenever a new tag format is added or an older one is deleted.
This ensures tags are parsed using all formats, from the newest format to the oldest, which allows users to add new formats that may also be matched by older ones, then deleting the old formats if they produce the wrong result.
Also, helm charts are not updated if parsing produces the same result -- being the same tag format as well -- to avoid pushing a lot of updates to all users connected via a websocket.
Note that "same result" also includes the tag format ID itself, as every Helm chart row contains a reference to the tag format that have matched it. If you add a new tag format that matches all charts, it means all charts will be updated, which shouldn't happen very often.