Skip to content

feat: Add relation for s3 interface on the provider side - #300

Merged
mvlassis merged 9 commits into
mainfrom
kf-8733-s3
Jun 24, 2026
Merged

mvlassis merged 9 commits into
mainfrom
kf-8733-s3

Conversation

@mvlassis

@mvlassis mvlassis commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add chisme component for the s3 interface, using the object-storage-charmlib library from https://github.com/canonical/object-storage-integrator`. Note that we will only use this here, so we don't have any reason to put this to chisme.
  • Add unit tests:
    • For the new relation
    • For _get_minio_endpoint
  • Note that we don't add any integration tests, since they currently don't test any integrations via the object-storage, we usually test them on the requirer side, see https://github.com/canonical/argo-operators

Testing

Since this relation will be mostly used to connect via the gateway mode, I tested the following manually:

  • Pack and deploy this version of minio
  • Configure with my Azure account via gateway mode:
juju config minio \
    mode=gateway \
    gateway-storage-service=azure \
    access-key=<azurestorageaccountname> \
    secret-key=<azurestorageaccountkey>
  • Deploy this version of argo
  • Integrate them and run a sample workflow
  • Ensure that the artifacts show properly in the Azure UI

Closes #299

@ckfbot ckfbot added the backport track/1.10 Backport to track/1.10 label Jun 17, 2026
@ckfbot

ckfbot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport labels populated

Labels to this pull request were added automatically by the populate-labels.yaml action.

When the PR is merged, backport PRs according to the labels will be automatically created. To skip the backport creation, remove any unneeded labels before merging the PR.

@mvlassis mvlassis removed the backport track/1.10 Backport to track/1.10 label Jun 18, 2026
@mvlassis
mvlassis requested review from NohaIhab, dariofaccin, misohu and theoctober19th and removed request for dariofaccin June 18, 2026 12:33
@mvlassis mvlassis changed the title feat: Add support for s3 interface feat: Add relation for s3 interface on the provider side Jun 18, 2026
@misohu
misohu requested a review from Copilot June 19, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds provider-side support for the s3 interface to the MinIO charm, publishing S3 connection details to related requirer applications via a new Chisme component.

Changes:

  • Added S3ProviderComponent (using object-storage-charmlib) to serve s3-credentials relation data (endpoint, access key, secret key).
  • Added _get_minio_endpoint() helper and unit tests covering endpoint construction and relation data publication.
  • Fixed a typo in integration test function names (test_metrics_enpointtest_metrics_endpoint).

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/components/s3_provider_component.py New provider component that publishes S3 connection info via the s3 interface.
src/charm.py Wires the new S3 provider component and adds _get_minio_endpoint() helper.
metadata.yaml Declares the new s3-credentials provided relation using interface s3.
pyproject.toml Adds object-storage-charmlib dependency for charm runtime.
tests/unit/test_charm.py Adds unit tests for _get_minio_endpoint() and s3-credentials relation data.
tests/integration/test_charm.py Fixes test function naming typo.
tests/integration/test_charm_ambient.py Fixes test function naming typo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/s3_provider_component.py Outdated
Comment thread src/components/s3_provider_component.py
mvlassis and others added 2 commits June 19, 2026 10:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Manos Vlassis <57320708+mvlassis@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Manos Vlassis <57320708+mvlassis@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

@theoctober19th theoctober19th left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding me as a reviewer! I have only one question -- in the context of this charm, is it not necessary/required that this charm provides with the requirer with region, bucket, path, etc.?

Also, according to the s3 interface specification, we allow requirers to also send a custom param bucket and path in the relation data when the relation is joined. Are these info sent by requirers simply not relevant here?

Comment thread src/components/s3_provider_component.py Outdated
Comment thread src/components/s3_provider_component.py
Co-authored-by: Bikalpa Dhakal <theoctober19th@gmail.com>
Signed-off-by: Manos Vlassis <57320708+mvlassis@users.noreply.github.com>

@NohaIhab NohaIhab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks @mvlassis, a couple comments

Comment thread src/components/s3_provider_component.py
Comment thread src/components/s3_provider_component.py
@mvlassis
mvlassis requested a review from NohaIhab June 23, 2026 15:32
@mvlassis
mvlassis merged commit fd979cd into main Jun 24, 2026
12 checks passed
@mvlassis
mvlassis deleted the kf-8733-s3 branch June 24, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement provider side for the s3 interface

6 participants