feat(helm): Add imagePullSecrets support to ome-resources chart#131
Conversation
There was a problem hiding this comment.
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.imagePullSecretsconfiguration option invalues.yaml. This allows users to specify image pull secrets centrally, which will then be applied to all relevant containers within theome-resourcesHelm chart. - Kubernetes Manifest Updates: I've updated both the
model-agentDaemonSet andome-controllerDeployment templates. These templates now conditionally apply theglobal.imagePullSecretsto 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
-
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. ↩
There was a problem hiding this comment.
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.
| {{- if .Values.global.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{- toYaml .Values.global.imagePullSecrets | nindent 8 }} | ||
| {{- end }} |
There was a problem hiding this comment.
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 }}
| {{- if .Values.global.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{- toYaml .Values.global.imagePullSecrets | nindent 8 }} | ||
| {{- end }} |
There was a problem hiding this comment.
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 }}
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
b45050a to
037c353
Compare
Summary
Changes
global.imagePullSecretsconfiguration option tovalues.yamlwith example usageTest plan