go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.24k stars 5.5k forks source link

Support optional/configurable IAMEndpoint for Minio Client (#32581) #32581

Open mowoc-ocp opened 1 day ago

mowoc-ocp commented 1 day ago

Targeting issue #32271

This modification allows native Kubernetes + AWS (EKS) authentication with the Minio client, to Amazon S3 using the IRSA role assigned to a Service account by replacing the hard coded reference to the DefaultIAMRoleEndpoint with an optional configurable endpoint.

Internally, Minio's credentials.IAM provider implements a discovery flow for IAM Endpoints if it is not set.

For backwards compatibility:

To test, we were able to build a docker image from source and, observe it choosing the expected IAM endpoint, and see files uploaded via the client.

wxiaoguang commented 1 day ago

by the way, "app.example.ini" and related documents https://gitea.com/gitea/docs/pulls also need to update 🙏

Wait for config example update before merge. If there is any difficulty, maintainers could also help.

mowoc-ocp commented 17 hours ago

@wxiaoguang thank you for the feedback, I'll take care of the documentation PR today!

mowoc-ocp commented 12 hours ago

Added the requested updates for app.example.ini and opened https://gitea.com/gitea/docs/pulls/103

Let me know if there is any feedback on documentation structure or anywhere I missed that I also need to update. Thanks!