Skip to content

Wire proposal - #58

Open
adracus wants to merge 2 commits into
ironcore-dev:mainfrom
adracus:feature/wire
Open

Wire proposal#58
adracus wants to merge 2 commits into
ironcore-dev:mainfrom
adracus:feature/wire

Conversation

@adracus

@adracus adracus commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This proposes the wire API for configuring switches

adracus and others added 2 commits July 20, 2026 09:16
Co-authored-by: Andreas Fritzler <andreas.fritzler@sap.com>
Signed-off-by: Axel Christ <axel.christ@sap.com>
Signed-off-by: Axel Christ <axel.christ@sap.com>
@adracus
adracus requested a review from a team as a code owner August 3, 2026 16:28
@adracus adracus mentioned this pull request Aug 3, 2026
Comment thread ieps/tbd-wire.md
Comment thread ieps/tbd-wire.md

@hardikdr hardikdr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the proposal @adracus @afritzler

Comment thread ieps/tbd-wire.md

@peanball peanball left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some typos, some clarification suggestions (to be discussed), some questions.

Comment thread ieps/tbd-wire.md
Comment thread ieps/tbd-wire.md
Comment thread ieps/tbd-wire.md
configurations can be done. One could e.g. think of a higher-level type
and controller that first drains traffic, removes the old `Cell` object
once drained and creates a new one once ready.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The `Cell` expresses desired functionality and leaves the switch specific
details to the implementation., not as implementation instructions.
A DHCP relay is a desired feature, while the per-port VLAN that is in the
current setup is an implemetation detail.

Not sure if this point fits here or before. But I think it's worth spelling this out anyway to make sure we focus on functionality and not on switch flags.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorporated passage.

Comment thread ieps/tbd-wire.md
name: spine-01-if-01
spec:
handle: sonic://if-01
adminState: Up

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is adminState on the interface also immutable? This is mostly needed to prepare for physical changes in the data center and the techs there don't like, or rather won't, unplug a blinking port.

It's fair enough though to have to create a new Interface that swaps out only the admin state.

Is there any issue with concurrency and name conflicts possible with this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now removed adminState from the spec entirely. wire only cares about configuring the cells in an environment. Mutating adminState should be done in a lower-level controller (e.g. sonic operator).

Comment thread ieps/tbd-wire.md
metadata:
name: spine-01
spec:
providerID: sonic://spine-01

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between providerID and handle (as used in Interface and Cell?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread ieps/tbd-wire.md
InterfaceState(ctx context.Context, iface string) (*InterfaceState, error)
// SetInterfaceAdminState sets the admin state of the interface specified by the given interface
// name to the given value.
SetInterfaceAdminState(ctx context.Context, iface string, adminState bool) error

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coming back to my question before on Interface: This then seems that Interface.spec.adminState is in fact modifiable on the fly and not immutable?

Re-read the first passage, leaving it for other readers anyway. Only the Cell is immutable, and is also what triggers reconfiguration of the switch.

The controller watches Nodes and Interfaces, which are mutable. But it only changes the switch's base configuration when a Cell is referenced. For Interfaces it should then apply changes ad hoc, assuming the corresponding Node is already configured / claimed via valid Cell ref.

@adracus, please confirm that my understanding is correct.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nodes and Interfaces don't have any mutable fields in this proposal (yet) as well. They serve as an announcement by the implementation to say what participates in wire. Then, once a Cell references a Node / Interface, the implementation actually does its reconciliation.

@peanball peanball left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some further reflection on the naming. I think it's so generic that it becomes intangible.

Comment thread ieps/tbd-wire.md

At the cluster scope, we define the following types:

* **`wire.Node`** representing a node ready to act as a cell of our network.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Node is an overloaded term: https://kubernetes.io/docs/concepts/architecture/nodes

We've criticized the term Device in other proposals, but this is still also not a generic network device but a switch.

My suggestion would be Switch, or NetworkSwitch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node does not stand on its own: In k8s, there's also the API group, which makes it a wire.ironcore.dev/Node.

Additionally, Node has some advantages over Switch or more specific terms, as our network now does not denote anymore that you need to have real switches, but also could just provision everything using e.g. plain linux boxes. Node hides how you implement it.

Comment thread ieps/tbd-wire.md
* **`wire.Interface`** representing an interface of a `Node`.

To actually make a `Node` function as a cell inside the network,
routing traffic properly, a namespaced `Cell` resource is created.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the Cell is an applicable switch configuration? Could we give this a clearer name that reflects this is about a particular configuration?

My suggestion would be SwitchConfiguration, or if you wanted a SwitchClaim. It's the linked specific immutable configuration of the hardware represented by Switch (or now still Node).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cell is a configuration that states how a Node participates in wire. In our concrete cases, this is for our switches, but again, this is not to leak the implementation.

Comment thread ieps/tbd-wire.md
reconfigure a switch but only configure it as seldom as possible.
A single object contains everything needed to configure the switch.

* Having a single object means the implementors of this API can construct

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this part is the crux of this whole proposal. The single object, and with that a "complete" state that can be applied and also verified (on the switch and in a controller) is the important bit.

I am still not 100% certain what the immutability helps, beyond being more annoying for the implementer and operator and with that complexity trying to deter them to reconfigure.

Making sure that the config is applied clean in one go is up to the implementer of the controller / agent / whatever else machinery that touches the switch. There is always the "current real state of the switch" to fall back on for making a diff if you wanted.

So having the single object with all the desired state in one thing is the main benefit of the approach outlined in this proposal. The clean update, and maintenance for taking as witch out of rotation could equally be done with taints / cordon (drain and do not use this switch) and resource versioning (this is the newly applicable version of the configuration. Apply it in full).

It is still logically the same switch in the same place with the same name, but it is e.g. running an OS update. When it comes back it's still the same switch.

This is also represented by keeping the Node (or as I suggest Switch) intact, and just changing the currently applied configuration (i.e. Cell, or SwitchClaim as I suggest), which needs to be applied to the switch in some way. But that way is the same for whether there is a new version of the same resource, or there is a new resource entirely.

What an update for me guarantees is that there is no possibility of something else interfering between "delete Cell" and "create new Cell".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some cents here:

  • What the immutability helps: In all previous proposals, there was no stable state: We had something like Switch or additional objects (like BGPPeering or similar) that, whenever they were created / updated, caused a reconfiguration of the switch. From the API level, you could not avoid that, as at any point in time it's of course ok to create e.g. new BGPPeering objects. With this design, we definitely know what the desired configuration is - just like k8s's Pods are immutable, our Cell is immutable.
  • Regarding 'annoying the implementer': Actually, with this, the implementation becomes more straight-forward: No partial updates, complete state is presented from the get-go and can be applied. For the operator it's also simplistic as it is in k8s (no operator in k8s complains about it being hard to 'replace' pods): Just delete + recreate, with kubectl tooling its as simple as kubectl delete cell x and then kubectl apply cell y.

@hardikdr hardikdr added this to Roadmap Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants