Skip to content

chore(docs): add support for .dockerconfigjson format in docstring#2457

Merged
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
reshnm:patch-2
May 7, 2026
Merged

chore(docs): add support for .dockerconfigjson format in docstring#2457
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
reshnm:patch-2

Conversation

@reshnm

@reshnm reshnm commented May 7, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Apparently the ocm controllers not only support pull credentials in ocm config format but also in .dockerconfigjson format.
Update the docstring in the API to reflect this.

Which issue(s) this PR fixes

Testing

How to test the changes
Verification
  • I have added/updated tests for my changes (see Test Requirements)
  • Tests pass locally (task test and task test/integration if applicable)
  • If touching multiple modules, go work is enabled (see go.work)
  • My changes do not decrease test coverage
  • I have tested the changes locally by running ocm

Signed-off-by: René Schünemann <rene.schuenemann@sap.com>
@reshnm reshnm requested a review from a team as a code owner May 7, 2026 09:37
@netlify

netlify Bot commented May 7, 2026

Copy link
Copy Markdown

Deploy Preview for ocm-website ready!

Name Link
🔨 Latest commit 91cb241
🔍 Latest deploy log https://app.netlify.com/projects/ocm-website/deploys/69fc6c20e244460008bb3291
😎 Deploy Preview https://deploy-preview-2457--ocm-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the area/documentation Documentation related label May 7, 2026
@reshnm reshnm requested a review from frewilhelm May 7, 2026 09:37
@github-actions github-actions Bot added the size/xs Extra small label May 7, 2026
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The OCMConfiguration field comment in the Kubernetes controller API is updated to document support for both ocm config file format and .dockerconfigjson format, clarifying the acceptable configuration data sources without altering any code logic or exported APIs.

Changes

Configuration Documentation

Layer / File(s) Summary
Comment Documentation
kubernetes/controller/api/v1alpha1/common_types.go
The OCMConfiguration field comment is expanded to reference both "ocm config file" and ".dockerconfigjson" format instead of only "ocm config file" format.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A comment refined, now clearer it reads,
Docker formats supported, fulfilling the needs,
No logic was touched, just words rearranged,
Configuration's scope, gently expanded, exchanged! 📝

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description is directly related to the changeset, explaining why the docstring was updated and providing context about OCM controller support for both ocm config and .dockerconfigjson formats.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'chore(docs): add support for .dockerconfigjson format in docstring' accurately summarizes the main change: updating documentation to reflect support for .dockerconfigjson format in the OCMConfiguration docstring.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@reshnm reshnm requested a review from Skarlso May 7, 2026 09:37
@jakobmoellerdev jakobmoellerdev changed the title docs: add support for .dockerconfigjson format in docstring chore(docs): add support for .dockerconfigjson format in docstring May 7, 2026
@github-actions github-actions Bot added the kind/chore chore, maintenance, etc. label May 7, 2026
@reshnm

reshnm commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

I tried to update the manifests to reflect the changes. But nothing I do seems to update them. Can someone help me?

task generate
task manifests

@jakobmoellerdev

Copy link
Copy Markdown
Member

@Skarlso I think there might be something off with the generators due to the recent changes on the chart. could you please take a look?

@Skarlso

Skarlso commented May 7, 2026

Copy link
Copy Markdown
Contributor

Will take a look.

@Skarlso Skarlso self-assigned this May 7, 2026
@Skarlso

Skarlso commented May 7, 2026

Copy link
Copy Markdown
Contributor

This is an internal struct in common types. It's not a forward facing component in our API. It was never part of our API docs.

@Skarlso

Skarlso commented May 7, 2026

Copy link
Copy Markdown
Contributor

Meaning, you're good here if all you want is to comment on the config struct. If not, you'll have to update the place where it's included at.

For example:

// DeployerSpec defines the desired state of Deployer.
type DeployerSpec struct {
	// ResourceRef is the k8s resource name of an OCM resource containing the ResourceGroupDefinition.
	// +required
	ResourceRef ObjectKey `json:"resourceRef"`

	// OCMConfig defines references to secrets, config maps or ocm api
	// objects providing configuration data including credentials.
	// +optional
	OCMConfig []OCMConfiguration `json:"ocmConfig,omitempty"`

@reshnm

reshnm commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

@Skarlso Makes sense. I didn't see that it was inlined.
For me it is fine as is. Since it is included in all other types, I would not update the types where it is include but rather move it to the documentation of the OCMConfiguration itself. This would avoid to copy the same text to multiple locations.

@frewilhelm

Copy link
Copy Markdown
Contributor

does it make sense to put an ocm config into a k8s secret of "type" dockerconfigjson?

@reshnm

reshnm commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

does it make sense to put an ocm config into a k8s secret of "type" dockerconfigjson?

No, it does not. But the ocm controllers support a .dockerconfig secret type as an alternative to an ocm config. I just learned this today. https://ocm.software/docs/how-to/configure-credentials-for-ocm-controllers/#create-a-kubernetes-secret-with-credentials

@jakobmoellerdev jakobmoellerdev merged commit d518b4d into open-component-model:main May 7, 2026
27 checks passed
ocmbot Bot pushed a commit that referenced this pull request May 7, 2026
…2457)

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

Apparently the ocm controllers not only support pull credentials in ocm
config format but also in .dockerconfigjson format.
Update the docstring in the API to reflect this.

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->

#### Testing

##### How to test the changes

<!--
Required files to test the changes:

.ocmconfig
```yaml
type: generic.config.ocm.software/v1
configurations:
  - type: credentials.config.ocm.software
    repositories:
      - repository:
          type: DockerConfig/v1
          dockerConfigFile: "~/.docker/config.json"
```

Commands that test the change:

```bash
ocm get cv xxx

ocm transfer xxx
```
-->

##### Verification

- [ ] I have added/updated tests for my changes (see [Test
Requirements](../CONTRIBUTING.md#test-requirements))
- [ ] Tests pass locally (`task test` and `task test/integration` if
applicable)
- [ ] If touching multiple modules, `go work` is enabled (see `go.work`)
- [ ] My changes do not decrease test coverage
- [ ] I have tested the changes locally by running `ocm`

Signed-off-by: René Schünemann <rene.schuenemann@sap.com>
Co-authored-by: Jakob Möller <jakob.moeller@sap.com> d518b4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Documentation related kind/chore chore, maintenance, etc. size/xs Extra small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants