Skip to content

feat(helm): Add imagePullSecrets support to ome-resources chart#131

Merged
slin1237 merged 1 commit into
ome-projects:mainfrom
abatilo:feat/helm-imagepullsecrets-support
Jul 5, 2025
Merged

feat(helm): Add imagePullSecrets support to ome-resources chart#131
slin1237 merged 1 commit into
ome-projects:mainfrom
abatilo:feat/helm-imagepullsecrets-support

Conversation

@abatilo
Copy link
Copy Markdown
Contributor

@abatilo abatilo commented Jul 4, 2025

Summary

  • Adds global imagePullSecrets configuration to the ome-resources Helm chart
  • Enables deployment to environments with private container registries

Changes

  • Added global.imagePullSecrets configuration option to values.yaml with example usage
  • Updated model-agent daemonset template to use global imagePullSecrets
  • Updated ome-controller deployment template to use global imagePullSecrets

Test plan

  • Deploy the chart with imagePullSecrets configured
  • Verify pods can pull images from private registries
  • Verify deployment works without imagePullSecrets (backward compatibility)

@abatilo abatilo requested a review from slin1237 as a code owner July 4, 2025 22:36
Copy link
Copy Markdown
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.

Summary of Changes

Hello @abatilo, 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!

I have introduced a significant enhancement to the ome-resources Helm chart by adding comprehensive support for imagePullSecrets. This change is crucial for enabling deployments in environments that rely on private container registries, ensuring that all necessary container images can be successfully pulled by the Kubernetes pods managed by this chart.

Highlights

  • Helm Chart Configuration: I've introduced a new global.imagePullSecrets configuration option in values.yaml. This allows users to specify image pull secrets centrally, which will then be applied to all relevant containers within the ome-resources Helm chart.
  • Kubernetes Manifest Updates: I've updated both the model-agent DaemonSet and ome-controller Deployment templates. These templates now conditionally apply the global.imagePullSecrets to their respective pod specifications, ensuring that images can be pulled from private registries when configured.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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
Copy Markdown
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 introduces support for imagePullSecrets via a global setting in the Helm chart, which is a valuable addition for deployments using private container registries. The implementation is correct and follows standard Helm practices.

My review includes suggestions to enhance the flexibility of this feature by allowing per-component overrides for imagePullSecrets. This is a common pattern in Helm charts that improves maintainability and supports a wider range of deployment scenarios. I've provided specific code suggestions in the templates to implement this pattern.

Comment on lines +28 to +32
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
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.

medium

To provide more flexibility, it's a good pattern to allow per-component overrides for imagePullSecrets. You can achieve this by checking for a component-specific value first, and then falling back to the global value.

This makes the chart more reusable and configurable for different deployment scenarios. This change would require adding imagePullSecrets: [] under the modelAgent key in values.yaml.

      {{- $imagePullSecrets := .Values.modelAgent.imagePullSecrets | default .Values.global.imagePullSecrets }}
      {{- if $imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml $imagePullSecrets | nindent 8 }}
      {{- end }}

Comment on lines +47 to +51
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
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.

medium

Similar to the model-agent daemonset, it would be beneficial to allow a per-component override for imagePullSecrets here as well. This provides more flexibility by checking for a controller-specific value before falling back to the global one.

This change would require adding imagePullSecrets: [] under the ome.controller key in values.yaml.

      {{- $imagePullSecrets := .Values.ome.controller.imagePullSecrets | default .Values.global.imagePullSecrets }}
      {{- if $imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml $imagePullSecrets | nindent 8 }}
      {{- end }}

Comment thread charts/ome-resources/values.yaml
slin1237
slin1237 previously approved these changes Jul 4, 2025
This change enables users to specify image pull secrets both globally and
at the component level. Component-level settings take precedence over
global settings, providing flexibility for different registry requirements.

Changes:
- Added global.imagePullSecrets configuration to values.yaml
- Updated model-agent daemonset to support model-level imagePullSecrets with fallback to global
- Updated ome-controller deployment to support controller-level imagePullSecrets with fallback to global
@abatilo abatilo force-pushed the feat/helm-imagepullsecrets-support branch from b45050a to 037c353 Compare July 4, 2025 23:59
@abatilo abatilo requested a review from slin1237 July 5, 2025 00:00
@slin1237 slin1237 merged commit 3638db0 into ome-projects:main Jul 5, 2025
23 checks passed
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