Skip to content

Conversation

@ushabelgur
Copy link
Contributor

@ushabelgur ushabelgur commented Jan 28, 2026

Proposed Changes

  • Pass machineName as hostaname to ironcore-net NetworkInterfaces while creating machine
  • Update testcase
  • Update ironcore-net dependency

Fixes #538

Summary by CodeRabbit

Release Notes

  • New Features
    • Machine specifications now include a name attribute, allowing machines to be identified and referenced by name.
    • Network interfaces now support hostname configuration, automatically assigned from the machine name.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

Walkthrough

The changes add hostname propagation to the machine networking stack. A new Name field is introduced to the MachineSpec in the API, populated from the machine's metadata ID during creation, and subsequently propagated to the ironcore-net NetworkInterface as the Hostname field through the apinet plugin. Supporting dependency is updated.

Changes

Cohort / File(s) Summary
API & Core
api/machine.go
Added public Name field to MachineSpec struct with JSON tag for serialization.
Dependency Management
go.mod
Updated github.com/ironcore-dev/ironcore-net from v0.2.4 to v0.2.5-0.20260123094402-a0b32fb0e8ff.
Network Plugin Integration
internal/plugins/networkinterface/apinet/apinet.go
Added Hostname field population in NetworkInterfaceSpec construction, deriving value from machine.Spec.Name.
Server Machine Creation
internal/server/machine_create.go
Populated Name field in machine spec assignment using iriMachine.Metadata.Id.
Test Updates
internal/server/machine_create_test.go
Added Id field assignment to Machine.Metadata.ObjectMetadata for test fixture setup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: adding hostname propagation to ironcore-net NetworkInterfaces.
Description check ✅ Passed The description covers all three main changes and references the linked issue, though it uses the template structure with bullet points as required.
Linked Issues check ✅ Passed All objectives from issue #538 are met: hostname field is added to NetworkInterface, test suite is extended, and implementation propagates machine name as hostname.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objectives: adding Name field to MachineSpec, propagating it as hostname to NetworkInterface, updating tests, and updating the dependency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added enhancement New feature or request size/S labels Jan 28, 2026
@ushabelgur ushabelgur self-assigned this Jan 28, 2026
@ushabelgur ushabelgur added the integration-tests to run integration tests label Jan 28, 2026
@hardikdr hardikdr added this to Roadmap Jan 28, 2026
@ushabelgur ushabelgur marked this pull request as ready for review January 28, 2026 08:10
@ushabelgur ushabelgur requested a review from a team as a code owner January 28, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compute enhancement New feature or request integration-tests to run integration tests size/S

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Add hostname propagation to ironcore-net NetworkInterfaces

3 participants