This repository contains Helm charts for official UI Plugins (Extensions) from Rancher
-
Charts must be Helm 3 compatible.
-
Chart must be published in a public Github repository that we can reference.
1. Fork the UI Plugin Charts repository, clone your fork, checkout the main branch and pull the latest changes.
Then create a new branch off of main
{
"extensions": {
"kubewarden": {
"repo": "rancher/kubewarden-ui",
"branch": "gh-pages",
"versions": [
"1.0.0",
"1.1.0",
"1.2.0
]
}
}
}git add manifest.json
git commit -m "Submitting rancher/kubewarden-ui version 1.2.0"git push origin <your_branch>Once your pull request is approved and merged, an automated workflow will sync this repository with the build assets from the supplied repository within the manifest.json file and generate a PR with all the new files to update the Helm Chart, which will need review and approval
Once the PR that updates Helm Chart is approved and merged, the Helm Chart in the main branch should be automatically updated. After this, a new automated workflow will run that
will release the extensions catalog (airgapped) and also create a release tag in the repository.
Required properties for manifest.json
| Property | Type | Description |
|---|---|---|
[extension key] |
Object |
This object is representative of the Extension package name. For example, the clock package within the ui-plugin-examples repository, clock would be the extension key. |
repo |
String |
Defines the upstream Github repository to pull the build assets from. |
branch |
String |
Defines which branch to pull from the upstream repo |
versions |
String[] |
An array of version strings which correspond to the Extension package version(s) to be synced with this repository. For example, the clock extension package has two versions, 0.1.0 and 0.2.0 would be added. |
{
"extensions": {
"elemental": {
"repo": "rancher/elemental-ui",
"branch": "main",
"versions": [
"1.2.0",
"1.1.0",
"1.0.0"
]
},
"kubewarden": {
"repo": "kubewarden/ui",
"branch": "gh-pages",
"versions": [
"1.0.0",
"1.0.1",
"1.0.2",
"1.0.3",
"1.0.4",
"1.0.5",
"1.0.6",
"1.1.0",
"1.2.0"
]
}
}
}We now provide the ability to change metadata on published extensions in this repository. Let's cover the fundamentals on how this works.
- extension "card"
name, which will be updated ascatalog.cattle.io/display-nameannotation inChart.yamlandvalues.yaml(bothchartsfolder and TGZ) - extension "card"
description, which will be updated asdescriptionfield inChart.yaml(bothchartsfolder and TGZ) - extension annotations, which will be updated in
Chart.yamlandvalues.yaml(bothchartsfolder and TGZ) - extension
README(present in slide-in panel when you click on extension card), which will be applied tochartsfolder (and also same folder inside TGZ) - extension ICON, which will be renamed, applied to
/iconsfolder and path updated to point to the correct asset in inChart.yaml(bothchartsfolder and TGZ)
- create a folder called
patchesin the root of this repo - create a folder per extension. Ex: if you want to apply changes to Elemental, create a folder called
elemental(folder name must match the same folder name as applied to other areas of this repo) - inside that
elementalfolder create a file calledpatches.jsonwhich will contain the changes you want to apply forname,descriptionandannotations, like:
{
"patches": [
{
"versions": ">3.0.0 <4.0.0",
"dir": "3.0.1",
"name": "some-new-name-for-extension",
"description": "some-new-description-for-extension",
"annotations": {
"a-demo-annotation111": "some-value-for-the-annotation111",
"a-demo-annotation11122": "some-value-for-the-annotation11122"
}
}
]
}
- the
versionssemver check will only apply the changes to the interval (or simple condition) that you want to - the
dirfolder is the name of the folder insideelementalfolder, where file assets likeREADMEandiconwill live, which will be applied as patch - Caveat: for the ICON change, the icon file must be called
icon(it doesn't care about the file extension, since it can be asvgorpng) in order for it to be considered as change - Caveat: for the README change: the file content must be different than the
READMEoriginally present on the extension in order to be applied, otherwise it's ignored
- starts by going through
manifest.jsonand list all of the extensions we have in the repo - goes through the
patchesfolder structure and cross-checks if there's a match with the givenmanifest.jsonit's going through - if there's a folder match, it goes through
patches.json, does a check on the versions condition present on the file and see if the version of given extension on the manifest we are looking at fits as patch candidate - if it matches, then it starts by doing checks on whether to apply any of the above changes and creates "APPLY" flags for each different metadata change
- after all checks are done, it's time to apply them. Starts by unpacking the TGZ and changing all the metadata we've check before both outside the TGZ assets and inside them as well
- once all changes are done, repacks the TGZ, applies the same permissions as the original file and regens the
index.yaml