fix(opensearch-operator): replace deprecated kube-rbac-proxy image - #2689
Conversation
Summary of ChangesHello, 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 resolves a critical issue where the opensearch-operator chart fails to deploy due to the removal of the kube-rbac-proxy image from the Google Container Registry. By switching to a stable mirror and automating the patch process within the build pipeline, the operator remains functional without the need for a disruptive upstream chart upgrade. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe 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
Customization To customize the 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@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. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe opensearch-operator Helm values update replaces the kube-rbac-proxy image repository with the upstream Changeskube-rbac-proxy image registry update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request modifies the opensearch-operator Makefile to apply a patch for the kube-rbac-proxy image during the update process. Feedback was provided noting that configuration-level changes, such as image overrides, should be implemented via the package's values.yaml file rather than through a patch in the Makefile, as per the repository style guide.
| helm repo add opensearch-operator https://opensearch-project.github.io/opensearch-k8s-operator/ | ||
| helm repo update opensearch-operator | ||
| helm pull opensearch-operator/opensearch-operator --version 2.8.0 --untar --untardir charts | ||
| patch --no-backup-if-mismatch -p4 < patches/fix-kube-rbac-proxy-image.patch |
There was a problem hiding this comment.
According to the repository style guide (line 20), configuration-level changes should be implemented as overrides in the package root values.yaml rather than using patches. Since the kube-rbac-proxy image repository is a standard configurable value in the upstream chart, please move this override to packages/system/opensearch-operator/values.yaml and remove the patch logic from the Makefile.
Example for values.yaml:
opensearch-operator:
kubeRbacProxy:
image:
repository: "quay.io/brancz/kube-rbac-proxy"References
- For configuration-level changes: suggest overrides in the package root values.yaml. (link)
There was a problem hiding this comment.
Agreed — moved the override to packages/system/opensearch-operator/values.yaml under kubeRbacProxy.image.repository and reverted the patch plus the Makefile change, matching the convention in docs/agents/overview.md ("Override configuration in root values.yaml") and the pattern used by sibling packages like kamaji. Fixed in e50bba10.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/system/opensearch-operator/values.yaml`:
- Around line 5-8: The kubeRbacProxy image is not pinned and defaults to latest;
update the kubeRbacProxy -> image block by adding an explicit tag field (e.g.,
tag: "v0.15.0") alongside the existing repository to ensure a stable,
reproducible image; modify the image specification for kubeRbacProxy (look for
the kubeRbacProxy.image.repository entry) to include the tag attribute.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c0294545-d381-4863-a097-8c9cca3bf0e6
📒 Files selected for processing (1)
packages/system/opensearch-operator/values.yaml
| kubeRbacProxy: | ||
| image: | ||
| # gcr.io/kubebuilder/kube-rbac-proxy was sunset; use the original upstream | ||
| repository: "quay.io/brancz/kube-rbac-proxy" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify kubeRbacProxy image configuration and accessibility
# Check if tag is specified in values.yaml
echo "=== Checking kubeRbacProxy configuration in values.yaml ==="
rg -A 5 'kubeRbacProxy:' packages/system/opensearch-operator/values.yaml
# Check for consistency with other operators (e.g., etcd-operator mentioned in PR)
echo -e "\n=== Checking kube-rbac-proxy usage in other operators ==="
rg -n 'kube-rbac-proxy' packages/system/*/values.yaml
# Verify the image exists and is accessible on quay.io
echo -e "\n=== Verifying image exists on quay.io ==="
curl -fsSL "https://quay.io/api/v1/repository/brancz/kube-rbac-proxy/tag/?specificTag=v0.15.0" | jq -r '.tags[]? | select(.name=="v0.15.0") | "✓ Tag v0.15.0 exists"'Repository: cozystack/cozystack
Length of output: 638
Pin the kube-rbac-proxy image tag explicitly for production stability.
The current configuration uses the image repository without specifying a tag, which defaults to latest. Add tag: "v0.15.0" to the image specification:
Expected configuration
kubeRbacProxy:
image:
# gcr.io/kubebuilder/kube-rbac-proxy was sunset; use the original upstream
repository: "quay.io/brancz/kube-rbac-proxy"
tag: "v0.15.0"The v0.15.0 tag is accessible on quay.io and aligns with the version referenced in the PR description.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/system/opensearch-operator/values.yaml` around lines 5 - 8, The
kubeRbacProxy image is not pinned and defaults to latest; update the
kubeRbacProxy -> image block by adding an explicit tag field (e.g., tag:
"v0.15.0") alongside the existing repository to ensure a stable, reproducible
image; modify the image specification for kubeRbacProxy (look for the
kubeRbacProxy.image.repository entry) to include the tag attribute.
The gcr.io/kubebuilder/kube-rbac-proxy image is no longer available since GCR was deprecated. Replace it with quay.io/brancz/kube-rbac-proxy from the original upstream author. Applied as a local patch in patches/ because upstream chart 2.8.1+ drops kubeRbacProxy entirely but also bumps CRDs to controller-gen v0.19.0 with significant schema changes — out of scope for this fix. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Move the kube-rbac-proxy image override from a patch + vendored-chart
edit to a values.yaml override under kubeRbacProxy.image.repository.
This matches the project convention documented in docs/agents/overview.md
("Override configuration in root values.yaml") and the pattern used by
sibling packages such as kamaji.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
e50bba1 to
e543724
Compare
|
Successfully created backport PR for |
|
Successfully created backport PR for |
What this PR does
Replaces the broken
gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0imagein the opensearch-operator chart with
quay.io/brancz/kube-rbac-proxy:v0.15.0(the same image already used elsewhere in cozystack, e.g. etcd-operator).
The kubebuilder GCR registry was sunset and the image no longer pulls.
The fix is a local patch in
patches/fix-kube-rbac-proxy-image.patch,wired into the
updatetarget so it survives future chart re-pulls.Upstream chart 2.8.1+ removes
kubeRbacProxyentirely, but it also bumpsCRDs to controller-gen v0.19.0 with significant schema changes — too much
surface area for a focused image fix.
Follows the precedent set in #2181 for etcd-operator.
Release note
Summary by CodeRabbit