Conversation
For VMInstance yaml: - replace 'running: true' with runStrategy - fix 'resources' section - sockets was missed - small fixes to get all 'external*' one after another Signed-off-by: Myroslav Mishov <mob.m.mishov@gmail.com>
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 refines the documentation for VMInstance YAML configurations. The primary goal is to ensure the provided examples are up-to-date and accurate, reflecting the correct usage of VM lifecycle management and resource definitions. These changes enhance the clarity and completeness of the documentation for users creating cloneable virtual machines. 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. Changelog
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
|
📝 WalkthroughWalkthroughDocumentation update to the cloneable VM example that expands the VMInstance specification with new configuration fields including external access, disk definitions, instance type, run strategy, and resource constraints. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. |
There was a problem hiding this comment.
Code Review
This pull request updates the cloneable-vms.md documentation to align the VMInstance examples with recent changes, such as replacing running: true with runStrategy and adding sockets to the resources. The changes also improve readability by grouping related external* fields. The updates make the examples more accurate and consistent. I've added one suggestion to improve the clarity of the resource specification in one of the examples.
| - 22 | ||
| instanceProfile: ubuntu | ||
| running: true | ||
| instanceType: "" |
There was a problem hiding this comment.
Using instanceType: "" is ambiguous. When defining resources manually with the resources block, it's clearer to omit the instanceType field. This allows it to use the default, which is then overridden by your specific resource requests. This avoids any confusion about what an empty instanceType implies. Please consider removing this line for clarity.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@content/en/docs/v1/virtualization/cloneable-vms.md`:
- Line 54: Several v1 doc pages still use the deprecated VMInstance field
`running: true`; update those VMInstance examples to use the `runStrategy` field
(e.g., `runStrategy: Once` or the appropriate strategy) instead. Edit the
examples in the noted files
(content/en/docs/v1/virtualization/proxmox-migration.md, windows.md,
mikrotik.md, gpu.md) and replace `running: true` with the correct `runStrategy`
entry, keeping surrounding YAML structure and any comments intact so examples
remain valid.
- Around line 46-61: Update the VM examples to use runStrategy: Always instead
of runStrategy: Once (replace both occurrences of the runStrategy field) to
reflect running: true semantics, and remove the empty instanceType: "" fields
(or replace them with a valid instance type like "u1.medium") where present so
the examples don't contain an empty string; look for the runStrategy and
instanceType fields in the cloneable-vms examples (both occurrences around the
VM spec blocks) and apply these two edits consistently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a4bf2489-e91e-4acd-a7d7-ad59ca83a038
📒 Files selected for processing (1)
content/en/docs/v1/virtualization/cloneable-vms.md
| external: true | ||
| externalMethod: PortList | ||
| disks: | ||
| - name: ubuntu-source | ||
| externalPorts: | ||
| - 22 | ||
| disks: | ||
| - name: ubuntu-source | ||
| instanceProfile: ubuntu | ||
| instanceType: "" | ||
| running: true | ||
| runStrategy: Once | ||
| sshKeys: | ||
| - <paste your ssh public key here> | ||
| external: true | ||
| resources: | ||
| cpu: "2" | ||
| memory: 4Gi | ||
| sockets: "1" | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Search for runStrategy usage patterns in the codebase and check for KubeVirt documentation
# Search for other runStrategy examples in documentation
echo "=== Searching for runStrategy usage in docs ==="
rg -n 'runStrategy:' --type=md
# Search for running: true usage in documentation
echo -e "\n=== Searching for running: true usage in docs ==="
rg -n 'running:\s*true' --type=md
# Search for instanceType examples
echo -e "\n=== Searching for instanceType usage patterns ==="
rg -nC2 'instanceType:' --type=mdRepository: cozystack/website
Length of output: 5857
🌐 Web query:
What are the valid values for runStrategy in KubeVirt VMInstance and what is the difference between runStrategy: Once and runStrategy: Always?
💡 Result:
runStrategy (on a VirtualMachine’s spec.runStrategy, which controls how its VirtualMachineInstance (VMI) is kept running) has five valid values: Always, RerunOnFailure, Once, Manual, Halted. [1][2]
Difference: Once vs Always
runStrategy: Once: the VM is started and runs a single time, and is not restarted when it completes—whether it ended inSuccessorFailure. [1][2]runStrategy: Always: KubeVirt is tasked with keeping the VM running continuously by recreating (respawning) the VMI whenever it terminates, whether termination was controlled (e.g., guest-initiated shutdown) or uncontrolled (e.g., crash). This behavior is equivalent to the deprecatedspec.running: true. [1]
Sources: KubeVirt Run Strategies user guide [1] and KubeVirt API reference (VirtualMachineSpec.runStrategy) [2].
Update runStrategy: Once to runStrategy: Always and remove empty instanceType field.
The file incorrectly uses runStrategy: Once on lines 54 and 152. According to the migration guide in content/en/docs/v1/operations/upgrades/_index.md (lines 76–77), the correct mapping is:
running: true→runStrategy: Always(keep VM running continuously)running: false→runStrategy: Halted
runStrategy: Once runs the VM a single time and does not restart it—a different behavior than the original running: true.
Additionally, instanceType: "" on lines 53 and 151 uses an empty string. All other documentation examples provide actual instance types (e.g., "u1.medium", "u1.xlarge"). Either provide a value or omit the field entirely.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@content/en/docs/v1/virtualization/cloneable-vms.md` around lines 46 - 61,
Update the VM examples to use runStrategy: Always instead of runStrategy: Once
(replace both occurrences of the runStrategy field) to reflect running: true
semantics, and remove the empty instanceType: "" fields (or replace them with a
valid instance type like "u1.medium") where present so the examples don't
contain an empty string; look for the runStrategy and instanceType fields in the
cloneable-vms examples (both occurrences around the VM spec blocks) and apply
these two edits consistently.
| instanceProfile: ubuntu | ||
| instanceType: "" | ||
| running: true | ||
| runStrategy: Once |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Find all VMInstance examples using running: true
echo "=== Files with 'running: true' in VMInstance specs ==="
rg -n 'running:\s*true' --type=md -C3Repository: cozystack/website
Length of output: 5800
Update other documentation files to maintain consistency.
This PR updates the VMInstance examples to use runStrategy instead of running: true. However, several other v1 documentation files still use the old running: true field, creating inconsistency:
content/en/docs/v1/virtualization/proxmox-migration.md(line 137)content/en/docs/v1/virtualization/windows.md(line 94)content/en/docs/v1/virtualization/mikrotik.md(line 62)content/en/docs/v1/virtualization/gpu.md(line 146)
Consider updating these files in a follow-up PR to ensure consistent guidance across all documentation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@content/en/docs/v1/virtualization/cloneable-vms.md` at line 54, Several v1
doc pages still use the deprecated VMInstance field `running: true`; update
those VMInstance examples to use the `runStrategy` field (e.g., `runStrategy:
Once` or the appropriate strategy) instead. Edit the examples in the noted files
(content/en/docs/v1/virtualization/proxmox-migration.md, windows.md,
mikrotik.md, gpu.md) and replace `running: true` with the correct `runStrategy`
entry, keeping surrounding YAML structure and any comments intact so examples
remain valid.
For VMInstance yaml:
Summary by CodeRabbit
Documentation