brennerm / uptimerobot-operator

A Kubernetes operator that creates UptimeRobot monitors for your ingresses
MIT License
57 stars 5 forks source link

Build Multiarch Images #32

Closed tuxpeople closed 1 year ago

tuxpeople commented 1 year ago

The main reason for this PR is to fix #27 as I'm need arm images ;-)

This PR consists of four changes:

About the changes of the commit https://github.com/brennerm/uptimerobot-operator/commit/4b31c174800f07bb9d3adae3ce4d2605d19c615e

I replaced the docker build step and the two docker push steps with the build-push-action from Docker. This action can do both in one, and also supports multiple architectures. For the multiple architectures to work, the setup-qemu-action and setup-buildx-action are necessary (Lines 50-53).

To replicate the former behavior of the two push steps, I created the step set tags (Line 54-68) which should eventually output the same tags as before.

What's included but not absolutely necessary:

Feel free to revert those two things if you don't like them.

In general, I tried to stick as close as possible to what already existed. Therefore I (mostly) avoided bumping actions to newer versions or the bump the base image to a newer version. These are things you should consider, as some stuff is quite outdated.

I'm no Python developer, so I hope my pipenv changes are okay. At least the container was building and I was able to spin it up on a K3S on ARM here. But I wasn't able to perform the E2E tests from your pipeline, although I added my API key.

Hope that PR is okay, otherwise please let me know if you wish changes to it.