Skip to content
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

Integrate a development channel in charts #768

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

davidcassany
Copy link
Contributor

@davidcassany davidcassany commented Jun 19, 2024

This is a PoC to add an unstable channel for helm builds happening at isv:Rancher:Elemental projects in OBS.

@davidcassany davidcassany requested a review from a team as a code owner June 19, 2024 08:51
@davidcassany davidcassany marked this pull request as draft June 19, 2024 08:51
Copy link
Contributor Author

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR installing the Dev and Staging helm charts could result to something like these screenshots
image
image
image

namespace: fleet-default
spec:
options:
image: {{ .Values.channel.image }}:{{ .Values.channel.tag }}
type: custom
{{ end }}
{{ if hasPrefix "registry.opensuse.org" .Values.registryUrl }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make this more strict by also including an AND condition like contains "isv/rancher/elemental". This way the check would be valid for branched charts in OBS too.

An example of an unstable channel I created is here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's smart, would anyway move the unstable channel to a separate yaml file (channel-unstable.yaml? channel-dev.yaml? you name it): that would make it easier to automatically drop it from the version we publish in the marketplace

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

@@ -10,8 +10,9 @@ seedImage:
imagePullPolicy: IfNotPresent

channel:
image: "%%IMG_REPO%%/rancher/elemental-channel"
tag: "%VERSION%"
name: "sle-micro-5.5-channel"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a name here so this turns to be customizable too. I like seeing the OS stream in the channel name, it makes everything way more obvious in CLI and the UI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice

@davidcassany davidcassany changed the title [POC] Update charts [POC] Integrate a development channel in charts Jun 19, 2024
@davidcassany
Copy link
Contributor Author

@fgiudici @anmazzotti this is what I had in mind for setting a development channel only for projects under isv:Rancher:Elemental. So it could be a separate OBS package that is never submitted to IBS.

@@ -10,8 +10,9 @@ seedImage:
imagePullPolicy: IfNotPresent

channel:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also wondering if this shouldn't be a list of channels. Makes sense from a structure point of view, but I wonder if this wouldn't make it way cumbersome and unpleasant from a UX PoV.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think will make things more convoluted from the user/UX side.
But multi-channel is a good point... we can provide extra ready-to-use yamls "kubectl apply" ready in our repos and docs 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also opt to not introduce many channels at install time. One default is great, then we can point to the documentation to install additional ones. Otherwise it will be a lot of clutter.

image: "%%IMG_REPO%%/rancher/elemental-channel"
tag: "%VERSION%"
name: "sle-micro-5.5-channel"
image: "%%IMG_REPO%%/rancher/elemental-channel/sle-micro"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if we have development channel, there is no reason to have this %%IMG_REPO%% as this should be an official already existing channel reference such as registry.suse.com/rancher/elemental-channel/...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cannot agree more 👍🏼

@anmazzotti
Copy link
Contributor

I like this. I think you can simply add your OBS Dockerfile and .json to the elemental-channels project, this could be the Dockerfile.unstable flavor.

The only thing I miss is when this image is refreshed. Can we for example trigger the elemental-channel service after build-baremetal-iso-image succeeds?

Otherwise the elemental-channels Github refresh action runs nightly, but for a development image I'd really love to always have the latest latest.

@davidcassany davidcassany self-assigned this Jun 25, 2024
@kkaempf kkaempf added kind/enhancement New feature or request area/channels labels Jun 25, 2024
@davidcassany
Copy link
Contributor Author

I like this. I think you can simply add your OBS Dockerfile and .json to the elemental-channels project, this could be the Dockerfile.unstable flavor.

I'd not put in the same OBS package as the others as a flavor (we can include it in the github repository). The reason for that is because I'd love to be capable to keep OBS sources untouched when promoting from Dev to Staging to release projects. So if we keep development channel as a separate OBS image, then we can just simply do not submit it to release project and we are certain these bits are never landing in IBS.

The only thing I miss is when this image is refreshed. Can we for example trigger the elemental-channel service after build-baremetal-iso-image succeeds?

The idea is that no refresh is needed at all. Imagine something like:

registry.opensuse.org/isv/rancher/elemental/dev/containers/suse/sl-micro/6.0/baremetal-os-container:latest

This does not require refresh, it always pointing to the latest build we have in dev, which should be in sync with github repository head.

Otherwise the elemental-channels Github refresh action runs nightly, but for a development image I'd really love to always have the latest latest.

For development I don't think we need any refresh. They can be purely static, that's why I am not sure we need those sources in github repository at all.

@davidcassany davidcassany force-pushed the update_charts branch 2 times, most recently from d6b047f to 1e12abb Compare June 25, 2024 09:54
@davidcassany davidcassany changed the title [POC] Integrate a development channel in charts Integrate a development channel in charts Jun 25, 2024
@davidcassany davidcassany marked this pull request as ready for review June 25, 2024 10:31
Copy link
Contributor Author

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goes together with rancher/elemental-channels#5

tag: "%VERSION%"
name: "sle-micro-channel"
image: "registry.suse.com/rancher/elemental-channel"
tag: "%%VERSION%%"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the currently released channel, naming it sle-micro-channel as this includes 5.5 and 5.4 images.

Copy link
Contributor

@anmazzotti anmazzotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This commit adds a development channel reference to builds
done in OBS (under or branched from isv:Rancher:Elemental)

Signed-off-by: David Cassany <[email protected]>
@davidcassany davidcassany merged commit 6ee9211 into rancher:main Jun 26, 2024
22 checks passed
@davidcassany davidcassany deleted the update_charts branch June 26, 2024 04:22
@davidcassany davidcassany restored the update_charts branch June 26, 2024 04:38
@davidcassany davidcassany deleted the update_charts branch June 26, 2024 04:39
@davidcassany davidcassany mentioned this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/channels kind/enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants