-
Notifications
You must be signed in to change notification settings - Fork 134
[vm] Always expose VMs with a service #1738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @lllamnyp, 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 addresses a critical issue where Virtual Machines provisioned without a public IP address lacked an associated Kubernetes Service, consequently preventing them from having an in-cluster DNS name. By modifying the service templates, all VMs will now consistently be exposed with at least a ClusterIP service, ensuring proper internal discoverability and DNS resolution within the cluster. Highlights
🧠 New Feature in Public Preview: You can now enable Memory 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. 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
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughTwo Helm Service templates were updated to gate annotations, LoadBalancer settings, and ports behind an Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-07-11T06:28:13.696ZApplied to files:
🪛 YAMLlint (1.37.1)packages/apps/virtual-machine/templates/service.yaml[error] 9-9: syntax error: could not find expected ':' (syntax) packages/apps/vm-instance/templates/service.yaml[error] 9-9: syntax error: could not find expected ':' (syntax) 🔇 Additional comments (6)
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.
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 correctly modifies the Helm charts to ensure a Kubernetes Service is always created for a virtual machine, providing a stable in-cluster DNS name even when not exposed externally. This is achieved by creating a ClusterIP service when .Values.external is false. The changes are applied to both the virtual-machine and vm-instance charts.
I've found a critical indentation issue in both service.yaml templates that will likely cause the Helm chart to fail rendering due to invalid YAML. Please see the specific comments for details and a suggested fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
packages/apps/virtual-machine/templates/service.yaml (2)
34-36: Verify that port 65535 is appropriate for internal VM access.Same concern as in
packages/apps/vm-instance/templates/service.yaml- confirm that port 65535 correctly supports internal VM access and service routing.
14-20: Missing headless service specification for internal access.Same issue as in
packages/apps/vm-instance/templates/service.yaml- the implementation should includeclusterIP: Nonewhen.Values.externalis false to create a headless service as specified in issue #1731.🔎 Proposed fix to add headless service support
spec: type: {{ ternary "LoadBalancer" "ClusterIP" .Values.external }} +{{- if not .Values.external }} + clusterIP: None +{{- end }} {{- if .Values.external }} externalTrafficPolicy: Local
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/apps/virtual-machine/templates/service.yaml(2 hunks)packages/apps/vm-instance/templates/service.yaml(2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
packages/apps/vm-instance/templates/service.yaml
[error] 9-9: syntax error: could not find expected ':'
(syntax)
packages/apps/virtual-machine/templates/service.yaml
[error] 9-9: syntax error: could not find expected ':'
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (3)
packages/apps/vm-instance/templates/service.yaml (2)
9-12: Static analysis false positive can be safely ignored.The YAMLlint syntax error on line 9 is a false positive. The
{{- if .Values.external }}syntax is valid Helm templating that will be processed before YAML validation.
34-36: Port 65535 may be a placeholder and should be verified against actual VM port requirements.While technically valid in Kubernetes (range 1 to 65535), port 65535 is the maximum allowed port and does not correspond to standard VM service ports. Confirm:
- Does this port align with the actual ports exposed by your VMs?
- Is this a placeholder that requires proper port mapping from
.Valuesconfiguration?- Are there corresponding containerPort definitions that expect this specific port number?
packages/apps/virtual-machine/templates/service.yaml (1)
9-12: Static analysis false positive can be safely ignored.Same as in
packages/apps/vm-instance/templates/service.yaml- the YAMLlint error is a false positive for valid Helm template syntax.
## What this PR does When VMs are created without a public IP, no service is created for them and they have no in-cluster DNS name. This PR fixes this and resolves #1731. ### Release note ```release-note [vm] Always expose VMs with at least a ClusterIP service. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
c8dc801 to
ba50d01
Compare
nbykov0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Successfully created backport PR for |
# Description Backport of #1738 to `release-0.39`.
What this PR does
When VMs are created without a public IP, no service is created for them and they have no in-cluster DNS name. This PR fixes this and resolves #1731.
Release note
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.