Added multiarch build support for teleport-operator#16688
Conversation
|
@fheinecke - this PR is large and will require admin approval to merge. Consider breaking it up into a series smaller changes. |
r0mant
left a comment
There was a problem hiding this comment.
@fheinecke A couple of meta-comments too:
- The Drone file is MASSIVE now. Does Drone have a concept of imports/includes, or can we for example factor out all cron-related stuff into a separate Drone file? I would also try to move some things that we can into scripts/programs (I left a couple of related comments).
- Because the changeset is so big, it's pretty scary to put in production right away. Can we make sure that all new pipelines that build multiarch images have failures ignored on them so once this merges we can run for a few releases without their failures (if any) affecting anything and observe general behavior?
@logand22 Can you please give this another look? This got split from the original's @fheinecke's multi-arch PR in the attempt to land it in chunks.
logand22
left a comment
There was a problem hiding this comment.
Thanks for including a passing build in the Comments.
This wasn't necessarily what I had in mind for reducing the size of the PR. It seems like you have a lot of changes still that are orthogonal in goals that could be done completely separately.
- Consolidate to a single Dockerfile
- Add multi-arch builds
- Refactor build pipeline to use dronegen.
Not including operator and teleport lab doesn't necessary reduce this PR by that much.
Other than the small comments I left in the changed files I have questions over the following:
- Do you need to reference an updated
teleport.eref forteleport-entimages to work? - Can you include examples of
promoteevent running as well aspushevents? - Why is the
promoteevent building images? Shouldn't it just be pulling and retagging existing images? - Your updates include changes to the cronjob that automatically keep the latest 10.x.x 10.x and 10 version up-to-date daily vs. just
10(Same for previous versions). Is this intended?
Per @r0mant comment regarding drone file size. I believe drone supports both templates and configuration extensions that could help reduce the size. However this seems either out of scope or a prerequisite for these changes.
|
Regarding multiple files @logand22 is right, however templates are not supported in the version of Drone we're using. See https://github.com/harness/drone/blob/master/HISTORY.md#202. It's probably sufficient for this discussion to simply say that it is not feasible to split .drone.yml up within the scope of this PR @r0mant . That being said, I think the increasing .drone.yml size is an issue I think this would be a great discussion to have outside the scope of this PR. |
|
@logand22 to address your comments/questions above:
I considered this when opening the PR however there are several reasons why I split the original PR this way:
No. All logic for building teleport-ent images in the context of a drone pipeline is in dronegen. I will be opening up a separate PR that updates the
The linked test run (https://drone.platform.teleport.sh/gravitational/teleport/15845) was triggered on a push event to this branch. Is that what you're looking for? Regarding testing a promote event I believe I can test this by removing the "Check if tag is prerelease" step, then promoting a dev tag. Is that sufficient? 99.99% of the logic from the test run should be identical here however testing on a
This was primarily done in an attempt to unify how images are built. Here's what currently happens when a release is about to be published (as I understand it):
As a result, the staging images built in (1) and pulled/tagged/pushed in (2) are only available for 24 hours at most. In practice I think this is closer to less than 12 hours. By having the That being said, I did completely forget to implement
Yes this was 100% intended. Doing so provides several advantages:
Does this address your comments/concerned? I'm not dead set on how the PR currently changes things - just trying to explain why I made the above decisions. |
|
Test runs prior to merging PR:
Everything is green and working. I need one more commit to disable my testing pipeline then I'll be merging. |
|
@fheinecke See the table below for backport results.
|
* Added multiarch build support for teleport-operator (#16688) * Added multiarch build support for Teleport (#17597) * Fix cron jobs updating teleport operator on v9 * Linter fix * Disabled promote prerelease check * Linter fix * Resigned drone.yml after merge * Removed accidentally added pipline due to branch merge
This is part one of a series of PRs updating drone/dronegen to support multiarch builds.
The primary purpose of this PR is to add multiarch Teleport operator container images. This includes amd64, arm, and arm64 images under the
$MAJOR_VERSIONtag on each release.Due to the complexity of how we handle building and publishing container images this PR includes a number of other changes:
Regarding multiarch container builds the following features have been added:
After this PR is merged I will open several much smaller PRs for Teleport and Teleport lab.
Related PR: #15514 #3384
Test Drone run: https://drone.platform.teleport.sh/gravitational/teleport/15845