Skip to content

feat!: make OCM configurations propagate through resource reference#1752

Merged
Skarlso merged 7 commits into
open-component-model:mainfrom
Skarlso:default-propagation-if-ocm-config-is-not-defined
Feb 11, 2026
Merged

feat!: make OCM configurations propagate through resource reference#1752
Skarlso merged 7 commits into
open-component-model:mainfrom
Skarlso:default-propagation-if-ocm-config-is-not-defined

Conversation

@Skarlso

@Skarlso Skarlso commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Closes open-component-model/ocm-project#877

It fixes the referenced issue by modifying GetEffectiveConfig to check if "parent" exists and use it's effective config.
If, however, the object defines an explicit config, we use that instead.

There is a slight optimization here: Since the effective config is calculated if there is no parent, aka the base of anything coming after that in the chain, we can skip the resolution loop and assume that the effective config is correct only Secrets and ConfigMaps.

Which issue(s) this PR fixes

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso requested a review from a team as a code owner February 10, 2026 11:44
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/l Large labels Feb 10, 2026
… effective config

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Comment thread kubernetes/controller/internal/ocm/ocm.go
Comment thread kubernetes/controller/internal/ocm/ocm.go
@frewilhelm

Copy link
Copy Markdown
Contributor

Can you please adjust one of the e2e-tests, either basic-auth or docker-config-json, to use the new propagation. Then, we have it also tested in there and maybe people use the testdata as an example as well

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso

Skarlso commented Feb 10, 2026

Copy link
Copy Markdown
Contributor Author

Okay, let's see if that worked. :D

Comment thread kubernetes/controller/internal/ocm/ocm_test.go
Comment thread kubernetes/controller/internal/ocm/ocm_test.go
Comment thread kubernetes/controller/internal/ocm/ocm_test.go
Comment thread kubernetes/controller/internal/controller/deployer/deployer_controller.go Outdated
Comment thread kubernetes/controller/internal/controller/deployer/deployer_controller.go Outdated
Skarlso and others added 2 commits February 10, 2026 16:36
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@jakobmoellerdev jakobmoellerdev changed the title feat: make OCM configurations propagate through resource reference feat!: make OCM configurations propagate through resource reference Feb 10, 2026
@github-actions github-actions Bot added the !BREAKING-CHANGE! Breaking change in API or ocm-cli or spec label Feb 10, 2026
@Skarlso Skarlso enabled auto-merge (squash) February 11, 2026 07:17
@Skarlso Skarlso merged commit c5533d6 into open-component-model:main Feb 11, 2026
18 checks passed
morri-son pushed a commit to morri-son/open-component-model that referenced this pull request Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!BREAKING-CHANGE! Breaking change in API or ocm-cli or spec kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OCM controllers(v2): Make OCM configurations propagate through resource reference

4 participants