Skip to content

Commit

Permalink
Implement images limit (#4)
Browse files Browse the repository at this point in the history
* Implement image limits

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>

* Add documentation

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>

---------

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
  • Loading branch information
anmazzotti authored Jun 11, 2024
1 parent a274ace commit 127347a
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 266 deletions.
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,41 @@
# elemental-channels
A repository to maintain and publish Elemental image channels
# Elemental Channels

[Elemental Channels](https://elemental.docs.rancher.com/next/channels) can be used to publish a list of container images to be used by the [Elemental Operator](https://elemental.docs.rancher.com).

This repository automates and facilitates the creation of the officially distributed Elemental channels.

## Goals for this repository

1. Be the single source of truth for all channel .json files that need to be published by the Elemental team
1. Automatically refresh the channels watching container registries (Daily)
1. (Optional) Publish images on GitHub, for development or testing

## Repository Watches config

The [config.yaml](./config.yaml) can be updated using the following structure:

```yaml
watches:
# A flavor for the Base OS being watched. Can be "" for unflavored images.
# This will be used as a prefix to distinguish same versions of different flavors.
- flavor: "my-flavor"
# The resulting .json filename on the ./channels directory
fileName: "sle-micro-5-5-my-flavor"
# The OS human readable name
displayName: "SLE Micro 5.5 My Flavor"
# The repository containing the "os" type images
osRepo: registry.suse.com/suse/sle-micro/my-flavor-5.5
# The repository containing the "iso" type images.
# If this is not applicable, use "N/A"
isoRepo: registry.suse.com/suse/sle-micro-iso/my-flavor-5.5
# How many images to limit per (minor) version.
limit: 3
```
## Usage
It is possible, at any moment, to run the `.refresh_channels.sh` script and integrate the changes, if any.
A GitHub [workflow](.github/workflows/refresh-channels.yaml) does it automatically every night, and optionally it can be triggered at any time.

Manually crated `.json` files can be directly created and maintained in the `./channels` directory, for example to maintain a channel containing arbitrary images, for development or testing.
When this is the case, be mindful of not creating collision with the automated [config.yaml](./config.yaml), otherwise files with the same name will be overwritten.
12 changes: 6 additions & 6 deletions channels/sle-micro-5-5-kvm.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@
},
{
"metadata": {
"name": "kvm-v2.0.2-2.2.20-os"
"name": "kvm-v2.0.2-2.2.85-os"
},
"spec": {
"version": "v2.0.2-2.2.20",
"version": "v2.0.2-2.2.85",
"type": "container",
"metadata": {
"upgradeImage": "registry.suse.com/suse/sle-micro/kvm-5.5:2.0.2-2.2.20",
"upgradeImage": "registry.suse.com/suse/sle-micro/kvm-5.5:2.0.2-2.2.85",
"displayName": "SLE Micro KVM 5.5 OS"
}
}
},
{
"metadata": {
"name": "kvm-v2.0.2-2.2.85-os"
"name": "kvm-v2.0.2-2.2.20-os"
},
"spec": {
"version": "v2.0.2-2.2.85",
"version": "v2.0.2-2.2.20",
"type": "container",
"metadata": {
"upgradeImage": "registry.suse.com/suse/sle-micro/kvm-5.5:2.0.2-2.2.85",
"upgradeImage": "registry.suse.com/suse/sle-micro/kvm-5.5:2.0.2-2.2.20",
"displayName": "SLE Micro KVM 5.5 OS"
}
}
Expand Down
12 changes: 6 additions & 6 deletions channels/sle-micro-5-5-rt.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@
},
{
"metadata": {
"name": "rt-v2.0.2-3.2.23-os"
"name": "rt-v2.0.2-3.2.86-os"
},
"spec": {
"version": "v2.0.2-3.2.23",
"version": "v2.0.2-3.2.86",
"type": "container",
"metadata": {
"upgradeImage": "registry.suse.com/suse/sle-micro/rt-5.5:2.0.2-3.2.23",
"upgradeImage": "registry.suse.com/suse/sle-micro/rt-5.5:2.0.2-3.2.86",
"displayName": "SLE Micro RT 5.5 OS"
}
}
},
{
"metadata": {
"name": "rt-v2.0.2-3.2.86-os"
"name": "rt-v2.0.2-3.2.23-os"
},
"spec": {
"version": "v2.0.2-3.2.86",
"version": "v2.0.2-3.2.23",
"type": "container",
"metadata": {
"upgradeImage": "registry.suse.com/suse/sle-micro/rt-5.5:2.0.2-3.2.86",
"upgradeImage": "registry.suse.com/suse/sle-micro/rt-5.5:2.0.2-3.2.23",
"displayName": "SLE Micro RT 5.5 OS"
}
}
Expand Down
Loading

0 comments on commit 127347a

Please sign in to comment.