Skip to content

docs: update descriptions for CredentialsSecretRef in CRD and model t…#58

Merged
iasthc merged 1 commit intomainfrom
desc
Mar 11, 2026
Merged

docs: update descriptions for CredentialsSecretRef in CRD and model t…#58
iasthc merged 1 commit intomainfrom
desc

Conversation

@iasthc
Copy link
Member

@iasthc iasthc commented Mar 11, 2026

…ypes

Copilot AI review requested due to automatic review settings March 11, 2026 10:05
@iasthc iasthc merged commit 0fe7ffa into main Mar 11, 2026
5 checks passed
@iasthc iasthc deleted the desc branch March 11, 2026 10:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the ModelArtifact API/CRD documentation to reflect a different convention for providing OCI registry credentials via a referenced Kubernetes Secret.

Changes:

  • Update credentialsSecretRef documentation to reference kubernetes.io/dockerconfigjson Secrets for OCI auth.
  • Simplify SecretReference doc comment to be generic (no longer describing fixed key conventions).

Reviewed changes

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

File Description
model/v1alpha1/modelartifact_types.go Updates Go type comments for OCI credentials Secret and SecretReference.
config/crd/bases/model.otterscale.io_modelartifacts.yaml Regenerates/updates CRD schema description to match the new OCI credentials Secret wording.

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

Comment on lines +145 to +146
// containing OCI registry credentials. The Secret is mounted into the Job Pod
// at /.docker/config.json so that kit push authenticates automatically.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The new field description is very implementation-specific ("mounted into the Job Pod at /.docker/config.json" and referencing "kit push"). Since this repo defines the API/CRD (not the controller implementation), this wording is likely to become stale or be inaccurate across implementations. Consider describing only the contract: the Secret should be of type kubernetes.io/dockerconfigjson and contain a valid Docker config JSON (typically in the ".dockerconfigjson" data key) that the controller will use for registry auth, without hard-coding mount paths/tooling.

Suggested change
// containing OCI registry credentials. The Secret is mounted into the Job Pod
// at /.docker/config.json so that kit push authenticates automatically.
// containing OCI registry credentials. The Secret must contain a valid
// Docker config JSON (typically in the ".dockerconfigjson" data key) that
// the controller uses for registry authentication.

Copilot uses AI. Check for mistakes.
Comment on lines +154 to +155
containing OCI registry credentials. The Secret is mounted into the Job Pod
at /.docker/config.json so that kit push authenticates automatically.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

CRD schema description includes controller implementation details (mount path "/.docker/config.json" and "kit push"). To keep the CRD contract stable and accurate, prefer describing only what the Secret must contain (docker config JSON for registry auth; usually the ".dockerconfigjson" key for kubernetes.io/dockerconfigjson Secrets) rather than how a specific controller mounts/uses it.

Suggested change
containing OCI registry credentials. The Secret is mounted into the Job Pod
at /.docker/config.json so that kit push authenticates automatically.
containing docker config JSON for OCI registry authentication (typically
stored under the ".dockerconfigjson" key).

Copilot uses AI. Check for mistakes.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the clarity and specificity of documentation for OCI registry credentials within the ModelArtifact Custom Resource. It updates descriptions in both the CRD definition and the corresponding Go types to explicitly state that CredentialsSecretRef expects a kubernetes.io/dockerconfigjson type Secret and details its mounting mechanism for automatic authentication. This change improves user understanding and reduces potential configuration errors.

Highlights

  • CRD Description Update: The description for CredentialsSecretRef in the ModelArtifact Custom Resource Definition (CRD) was updated to clarify that it expects a kubernetes.io/dockerconfigjson type Secret and how it's mounted for authentication.
  • Go Type Description Update: The description for CredentialsSecretRef in the OCITarget struct within modelartifact_types.go was updated to match the CRD description, providing more specific details on the secret type and mounting.
  • SecretReference Comment Refinement: The comment for the SecretReference struct in modelartifact_types.go was simplified by removing the specific example of "username" and "password" keys, as the CredentialsSecretRef now points to a more specific secret type.
Changelog
  • config/crd/bases/model.otterscale.io_modelartifacts.yaml
    • Updated the description for credentialsSecretRef to specify the kubernetes.io/dockerconfigjson secret type and its mounting behavior.
  • model/v1alpha1/modelartifact_types.go
    • Updated the description for CredentialsSecretRef to specify the kubernetes.io/dockerconfigjson secret type and its mounting behavior.
    • Simplified the comment for the SecretReference struct.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the descriptions for CredentialsSecretRef in the CRD YAML and the Go type definitions. The new description clarifies that the secret must be of type kubernetes.io/dockerconfigjson and explains its usage for authentication within the Job Pod. The comment for the generic SecretReference type has also been updated to remove specific details that are no longer universally applicable. The changes are consistent across both files and improve documentation clarity.

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.

2 participants