-
Notifications
You must be signed in to change notification settings - Fork 99
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
Try to avoid complicated logic to select k3s version #3154
Conversation
Signed-off-by: Dimitris Karakasilis <[email protected]>
.github/workflows/release.yaml
Outdated
role-duration-seconds: 1200 | ||
role-session-name: AWSCIPush | ||
- name: Build and push AWS image | ||
if: matrix.flavor == 'ubuntu' && matrix.flavorRelease == '24.04' && matrix.variant == 'standard' && matrix.model == 'generic' && matrix.arch == 'amd64' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will match all 3 k3s versions. I don't see any way to upload only one without hardcoding it (or doing the things I deleted in this PR).
The other option is to upload the code image but if the user tries to "reset" to a standard one using userdata (which is a very possible thing), the partitions won't be big enough for the standard image. They can specify sizes for the partitions I think but the recovery one can't be resized cause it's what is booted that point.
Any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this in Slack and decided to just push a core image. We will then implement a flag in auroraboot to set the "minimum image size" which will override the calculated one when building the cloud image. This way we can set this to a hardcoded value that can fit all our image (standard or core).
k3s_version=$(echo '${{ needs.get-standard-matrix.outputs.matrix }}' | \ | ||
jq -r '.include | map(.k3s_version | split("+")[0]) | unique | | ||
map( | ||
capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+)\\.(?<patch>[0-9]+)(-(?<pre>.*))?$") | | ||
{ | ||
major: (.major | tonumber), | ||
minor: (.minor | tonumber), | ||
patch: (.patch | tonumber), | ||
is_stable: (if .pre == null then 1 else 0 end), | ||
pre: (.pre // "") | ||
} | ||
) | max_by(.major, .minor, .patch, .is_stable, .pre) | | ||
"\(.major).\(.minor).\(.patch)\(.pre | if . == "" then "" else "-"+. end)"' | \ | ||
sed -E 's/^/v/; s/$/-k3s1/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "worked" kind of, but the artifacts we push are named:
quay.io/kairos/ubuntu:24.10-standard-amd64-generic-v3.3.1-rc2-k3sv1.32.1-rc2-k3sk3s1
and this script was looking for:
quay.io/kairos/ubuntu:24.04-standard-amd64-generic-v3.3.1-rc2-k3sv1.32.1-rc2-k3s1
I think the first one is wrong which is a different issue to look at but in any case, I thought it would be better if we didn't try to construct the image name again so this PR tries to push the AWS at a point where the image name is still available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proper fix will follow: #3155 Signed-off-by: Dimitris Karakasilis <[email protected]>
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #