Skip to content

[v9] Add Docker Hub login to Drone's Kubernetes pipelines#23973

Closed
wadells wants to merge 6 commits intobranch/v9from
walt/v9-dockerhub-login
Closed

[v9] Add Docker Hub login to Drone's Kubernetes pipelines#23973
wadells wants to merge 6 commits intobranch/v9from
walt/v9-dockerhub-login

Conversation

@wadells
Copy link
Copy Markdown
Contributor

@wadells wadells commented Apr 2, 2023

Backports #23956
Backports #23957
new Backports #19755

Summary

After moving Drone to AWS, we're seeing image pulls get rate limited because they're all coming from the same IP (an AWS NAT gateway). To avoid the rate limiting on AWS, we refactor pipelines to cache/reuse images where possible, as well as add authentication to Docker Hub pulls.

This PR ran into a couple different merge conflicts

There was a conflict in types.go because the following hadn't been backported:

I introduced #19755.
This had made it to previous branches but not v9. For example, it was added to v10 in #21199

Related Issues & PRs

Contributes to https://github.com/gravitational/SecOps/issues/285

See the orginal PRs to master for more context.

Testing

This is undergoing final testing at:

These tests are based off the most recent branch/v9 so I'll be watching to see if they flush out unrelated issues.

zmb3 and others added 6 commits April 2, 2023 11:15
Since the release of `tsh proxy app` we no longer need a
Teleport-aware Drone CLI and can leverage the standard
drone tool from https://docs.drone.io/cli/install/
After moving Drone to AWS, we're seeing image pulls get rate limited
because they're all coming from the same IP (an AWS NAT gateway).

To avoid this, we refactor pipelines to cache/reuse images where
possible, as well as add authentication to dockerhub pulls.
This is useful for making private test builds.
We don't actually consistently want these in all places.  E.g. parallel
pipelines cannot share a volumeRefDockerConfig, as they'll stop on each
others login information.
A shared volume results in the different steps racing against each
other.
We don't actually pull from dockerhub in these steps.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2023

@wadells - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

@wadells
Copy link
Copy Markdown
Contributor Author

wadells commented Apr 3, 2023

The tests for this are in a sorry state -- there are other release failures unrelated to the changes at hand that prevent any of my testing from getting too far, as seen here:

https://drone.platform.teleport.sh/gravitational/teleport-private/535/17/2

I've been chatting with @tcsc, and he says:

"the ability to build from private wasn't backported to v9 or v10, but they should definitely work from the official oss repo"

As such, I'll finish the testing and merge of this after I enable the drone webhook on OSS teleport.

@wadells
Copy link
Copy Markdown
Contributor Author

wadells commented Apr 26, 2023

Unlikely that this will be needed. We can reopen if/when it is.

@wadells wadells closed this Apr 26, 2023
@wadells wadells deleted the walt/v9-dockerhub-login branch September 15, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants