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

Add Azure Linux 3 for Azure #1465

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

mboersma
Copy link
Contributor

@mboersma mboersma commented May 10, 2024

/kind feature
/area provider/azure

Change description

Adds support for the upcoming Azure Linux 3 release and changes references from "Mariner" to "Azure Linux" for consistency.

Azure Linux 3 doesn't release until July AFAICT, but the source image feed looks stable and everything works, so I thought I'd jump the gun and add this now. But if it's better to wait for the official release (or to prefix the make targets with "Preview" or somesuch), please comment here.

Related issues

N/A

Additional context

I've tested this locally, but I left Azure Linux 3 out of CI tests, since it's not released yet. Once it's officially released, we can consider it stable enough to add to image-builder tests.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. area/provider/azure Issues or PRs related to azure provider labels May 10, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 10, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 10, 2024
@mboersma mboersma requested review from AverageMarcus and removed request for CecileRobertMichon May 10, 2024 16:25
@@ -16,7 +16,7 @@
when: ansible_os_family == "Debian"

- ansible.builtin.import_tasks: redhat.yml
when: ansible_os_family in ["Common Base Linux Mariner", "RedHat"]
when: ansible_os_family in ["Common Base Linux Mariner", "Microsoft Azure Linux", "RedHat"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, v3 has a completely different ansible_os_family string, as well as ansible_distribution. So we need to check for both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI, I'm working on a PR for ansible/ansible that adds Azure Linux detection in general, and sets the distro fact to Azure. This would simplify these checks. (Thanks for the Flatcar team for having blazed this trail already!)

SIG_CI_TARGETS="ubuntu-2204 ubuntu-2404 mariner-2 windows-2019-containerd windows-2022-containerd flatcar"
SIG_GEN2_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 centos-7 mariner-2 flatcar"
SIG_GEN2_CI_TARGETS="ubuntu-2204 ubuntu-2404 mariner-2 flatcar"
VHD_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 centos-7 azurelinux-2 azurelinux-3 rhel-8 windows-2019-containerd windows-2022-containerd"
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 added azurelinux-3 to the build targets but not the CI ones. This way it's possible to build Azure Linux 3, but image-builder CI won't fail if there are hiccups in the prerelease versions.

images/capi/Makefile Outdated Show resolved Hide resolved
@@ -1,6 +1,6 @@
{
"build_name": "mariner-2",
"distribution": "mariner",
"build_name": "azurelinux-2",
Copy link
Member

Choose a reason for hiding this comment

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

Would we consider this a breaking change as I think this changes the name of final image, right?

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 think you're right, if someone was depending on that naming pattern. I was just trying to keep the Makefile targets intact for backward-compatibility. The build_name also needs to match the build target name AFAICT, so reverting this to mariner-2 might mean reworking the Makefile as well.

I was hoping to have this be consistently azurelinux, to make it easier to navigate (and also to simplify some code I wrote here: kubernetes-sigs/cluster-api-provider-azure#4832). image-builder hasn't had a 1.0 release yet, so I think technically we can break things...but let's not if it's avoidable. Let me see how I can improve this, good catch @AverageMarcus!

Copy link
Contributor Author

@mboersma mboersma May 15, 2024

Choose a reason for hiding this comment

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

I reworked this PR to leave the existing mariner-2 targets and publishing info intact, just adding forward-compatible azurelinux-2 targets and new azurelinux-3 support. This seems unlikely to break anyone's usage.

Copy link
Member

@AverageMarcus AverageMarcus left a comment

Choose a reason for hiding this comment

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

/lgtm

@mboersma is this PR good to go or are you wanting to wait on the changes to Ansible first?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2024
@mboersma
Copy link
Contributor Author

is this PR good to go...?

I think it's ready. The change to Ansible isn't a PR yet (I'm still working out how to run the unit tests to verify my changes), and it would need to be cherry-picked into their releases. So: not any time soon. I'll refactor this in the future to be simpler.

@AverageMarcus
Copy link
Member

👍
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AverageMarcus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit 496581c into kubernetes-sigs:main May 16, 2024
14 checks passed
@mboersma mboersma deleted the azurelinux-3 branch May 16, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants