Robot Upgrade: metallb chart upgrade from 0.14.9 to 0.15.3#3788
Robot Upgrade: metallb chart upgrade from 0.14.9 to 0.15.3#3788weizhoublue wants to merge 1 commit intomainfrom
Conversation
Summary of ChangesHello @weizhoublue, 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 performs a significant upgrade of the Highlights
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 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 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
|
There was a problem hiding this comment.
Code Review
This pull request automates the upgrade of the metallb Helm chart from version 0.14.9 to 0.15.3. The upgrade introduces several new features, including new Custom Resource Definitions (CRDs) for status reporting (ConfigurationState, ServiceBGPStatus, BGPSessionState) and support for unnumbered BGP peering. Importantly, this update also includes significant security hardening by adding securityContext to multiple containers, making root filesystems read-only and preventing privilege escalation. While the changes are largely positive and align with the new version, I've identified two high-severity issues related to missing validation in the updated CRDs, which could lead to invalid configurations being accepted by the Kubernetes API server. Please see the detailed comments for suggestions on how to address these.
| required: | ||
| - myASN | ||
| - peerAddress | ||
| type: object |
There was a problem hiding this comment.
The peerAddress field has been removed from the required list to support unnumbered BGP peering via the new interface field. However, there is no validation to ensure that either peerAddress or interface is specified, as stated in the interface field's description ("Address and Interface are mutually exclusive and one of them must be specified."). This could allow users to create invalid BGPPeer resources.
It's recommended to add a CEL validation rule to enforce this constraint. For example:
x-kubernetes-validations:
- rule: "has(self.peerAddress) != has(self.interface)"
message: "Either peerAddress or interface must be set, but not both."This should be added under the properties of the BGPPeerSpec for the v1beta2 version.
| type: object | ||
| required: | ||
| - address | ||
| type: object |
There was a problem hiding this comment.
The address field has been removed from the required list for a neighbor to support unnumbered BGP peering via the new interface field. However, similar to the BGPPeer CRD, there is no validation here to ensure that either address or interface is specified. The description for the interface field states: "Address and Interface are mutually exclusive and one of them must be specified." The lack of validation could lead to invalid configurations.
I recommend adding a CEL validation rule to enforce this. For example:
x-kubernetes-validations:
- rule: "has(self.address) != has(self.interface)"
message: "Either address or interface must be set, but not both."This should be added under the properties for a neighbor item in the neighbors array.
b2f4316 to
1156ba6
Compare
a69c0b2 to
ad92a97
Compare
1b12527 to
fc2ac6d
Compare
700124f to
f9c1da3
Compare
f105a59 to
35ff566
Compare
823aeb9 to
6a09b26
Compare
118098d to
7669c96
Compare
7bb69b5 to
b64009f
Compare
Signed-off-by: robot <robot@example.com>
b64009f to
480d5d2
Compare
I am robot, upgrade: project metallb chart upgrade from 0.14.9 to 0.15.3