Skip to content

feat: refactor resource repository and fix usage in cli and controller#1715

Closed
matthiasbruns wants to merge 2 commits into
open-component-model:mainfrom
matthiasbruns:feat/refactor_oci_repo_interface
Closed

feat: refactor resource repository and fix usage in cli and controller#1715
matthiasbruns wants to merge 2 commits into
open-component-model:mainfrom
matthiasbruns:feat/refactor_oci_repo_interface

Conversation

@matthiasbruns

@matthiasbruns matthiasbruns commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

In ociArtifact PR we need the oci.Repository or something comparable to get oci artifacts in the transformation. We had no real way to provide a credentials-based oci repository since now.
This PR updates the ResourceRepository in bindings/go/repository/interface.go to make it credential-aware.
Since we did not want to change the implementation of the oci repository, we opted for a wrapper comparable to the one in cli/internal/plugin/builtin/oci (now deleted). The wrapper was moved into bindings/go/oci/repository/resource.

cli and controllers were updated as well to register the new ResourceRepository.

Which issue(s) this PR fixes

Contributes open-component-model/ocm-project#796

Split PRs

On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/m Medium labels Feb 4, 2026
Comment thread kubernetes/controller/internal/plugins/doc.go
Comment thread bindings/go/oci/interface.go
Comment thread bindings/go/repository/interface.go
Comment thread kubernetes/controller/cmd/main.go Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
matthiasbruns added a commit that referenced this pull request Feb 4, 2026
Part of
#1715

This PR updates the oci module.

#### What this PR does / why we need it
In [ociArtifact
PR](https://github.com/open-component-model/open-component-model/pull/1683/changes#diff-a3d391171fbdcde50e7d94ee010485559a0d10eb1149526e04bc46cc4546eadeR196)
we need the oci.Repository or something comparable to get oci artifacts
in the transformation. We had no real way to provide a credentials-based
oci repository since now.
This PR updates the `ResourceRepository` in
`bindings/go/repository/interface.go` to make it credential-aware.
Since we did not want to change the implementation of the `oci`
repository, we opted for a wrapper comparable to the one in
`cli/internal/plugin/builtin/oci` (now deleted). The wrapper was moved
into `bindings/go/oci/repository/resource`.

`cli` and `controllers` were updated as well to register the new
`ResourceRepository`.

#### Which issue(s) this PR fixes
Contributes
open-component-model/ocm-project#796

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
matthiasbruns added a commit that referenced this pull request Feb 4, 2026
…ls (#1716)

Part of
#1715

This PR updates the repository interface.

#### What this PR does / why we need it
In [ociArtifact
PR](https://github.com/open-component-model/open-component-model/pull/1683/changes#diff-a3d391171fbdcde50e7d94ee010485559a0d10eb1149526e04bc46cc4546eadeR196)
we need the oci.Repository or something comparable to get oci artifacts
in the transformation. We had no real way to provide a credentials-based
oci repository since now.
This PR updates the `ResourceRepository` in
`bindings/go/repository/interface.go` to make it credential-aware.
Since we did not want to change the implementation of the `oci`
repository, we opted for a wrapper comparable to the one in
`cli/internal/plugin/builtin/oci` (now deleted). The wrapper was moved
into `bindings/go/oci/repository/resource`.

`cli` and `controllers` were updated as well to register the new
`ResourceRepository`.

#### Which issue(s) this PR fixes
Contributes
open-component-model/ocm-project#796

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.com>
Co-authored-by: Fabian Burth <fabian.burth@sap.com>
matthiasbruns added a commit that referenced this pull request Feb 4, 2026
Part of
#1715

This PR updates the cli and controller module.

#### What this PR does / why we need it
In [ociArtifact
PR](https://github.com/open-component-model/open-component-model/pull/1683/changes#diff-a3d391171fbdcde50e7d94ee010485559a0d10eb1149526e04bc46cc4546eadeR196)
we need the oci.Repository or something comparable to get oci artifacts
in the transformation. We had no real way to provide a credentials-based
oci repository since now.
This PR updates the `ResourceRepository` in
`bindings/go/repository/interface.go` to make it credential-aware.
Since we did not want to change the implementation of the `oci`
repository, we opted for a wrapper comparable to the one in
`cli/internal/plugin/builtin/oci` (now deleted). The wrapper was moved
into `bindings/go/oci/repository/resource`.

`cli` and `controllers` were updated as well to register the new
`ResourceRepository`.

#### Which issue(s) this PR fixes
Contributes
open-component-model/ocm-project#796

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns

Copy link
Copy Markdown
Contributor Author

merged in #1718

@matthiasbruns matthiasbruns deleted the feat/refactor_oci_repo_interface branch February 4, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants