API Reference
Packages
sonic.networking.metal.ironcore.dev/v1alpha1
Package v1alpha1 contains API Schema definitions for the settings.gardener.cloud API group
Package v1alpha1 contains API Schema definitions for the networking v1alpha1 API group.
Resource Types
AdminState
Underlying type: string
Appears in:
| Field | Description |
|---|---|
Unknown | |
Up | |
Down |
Container
Container declares a Docker container that the provisioning server starts on the switch during generated ZTP provisioning.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name is both the Docker container name and its stable identity on the switch. | MaxLength: 63 Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ | |
image string | Image is the container image pulled by Docker on the switch. | MinLength: 1 | |
command string array | Command overrides the image entrypoint. | ||
args string array | Args are appended after Command, or after the image entrypoint when Command is empty. | ||
volumeMounts VolumeMount array | VolumeMounts describes the volumes mounted into the container. Each mount name must refer to an entry in SwitchSpec.Volumes. | ||
hostPID boolean | HostPID controls whether the container shares the SONiC host PID namespace. | ||
securityContext ContainerSecurityContext | SecurityContext configures the Unix identity used to run the container. | ||
injectControlKubeconfig boolean | InjectControlKubeconfig mounts the operator's configured control kubeconfig into this container and sets KUBECONFIG to its in-container path. A securityContext with runAsUser is required so the generated script can grant access to a private, per-container credential file. |
ContainerSecurityContext
ContainerSecurityContext is the supported subset of Kubernetes container securityContext for generated Docker containers.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
privileged boolean | Privileged runs the container with full access to the SONiC host. | ||
runAsUser integer | RunAsUser is the numeric Unix user ID used by the container. | Minimum: 0 | |
runAsGroup integer | RunAsGroup is the numeric Unix group ID used by the container. It requires runAsUser to be set as well. | Minimum: 0 |
HostPathVolumeSource
HostPathVolumeSource represents a host directory or file mounted into a Switch container.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
path string | Path is the absolute path on the SONiC host. | ||
type HostPathType | Type describes the expected host-path type, following the Kubernetes Pod hostPath API. Generated ZTP does not create missing paths. |
Management
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
host string | |||
port string |
Neighbor
Neighbor represents a connected neighbor device.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
macAddress string | MacAddress is the MAC address of the neighbor device. | ||
systemName string | SystemName is the name of the neighbor device. | ||
interfaceHandle string | InterfaceHandle is the name of the remote switch interface. |
NextBootMode
Underlying type: string
NextBootMode describes the desired behavior of the switch's next boot. Providers translate this high-level intent to their platform-specific boot mechanism. For SONiC, InstallOS enters ONIE install discovery.
Appears in:
| Field | Description |
|---|---|
None | NextBootModeNone leaves the normal installed network OS boot path intact. |
InstallOS | NextBootModeInstallOS enters the platform's OS installation/discovery flow. |
OperationState
Underlying type: string
Appears in:
| Field | Description |
|---|---|
Up | |
Down | |
Unknown |
PortSpec
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
PortStatus
PortStatus defines the observed state of a port on the Switch.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name is the name of the port. | ||
interfaceRefs LocalObjectReference array | InterfaceRefs lists the references to Interfaces connected to this port. |
Switch
Switch is the Schema for the switch API
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | sonic.networking.metal.ironcore.dev/v1alpha1 | ||
kind string | Switch | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec SwitchSpec | spec defines the desired state of Switch | ||
status SwitchStatus | status defines the observed state of Switch |
SwitchInterface
SwitchInterface is the Schema for the switchinterfaces API
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | sonic.networking.metal.ironcore.dev/v1alpha1 | ||
kind string | SwitchInterface | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec SwitchInterfaceSpec | spec defines the desired state of SwitchInterface | ||
status SwitchInterfaceStatus | status defines the observed state of SwitchInterface |
SwitchInterfaceSpec
SwitchInterfaceSpec defines the desired state of SwitchInterface
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
handle string | Handle uniquely identifies this interface on the switch. | ||
nativeName string | NativeName is the native name of the interface on the switch (e.g., "Ethernet0"). | ||
switchRef LocalObjectReference | SwitchRef is a reference to the Switch this interface is connected to. | ||
adminState AdminState | AdminState represents the desired administrative state of the interface. |
SwitchInterfaceState
Underlying type: string
Appears in:
| Field | Description |
|---|---|
Pending | |
Initializing | |
Ready | |
Failed |
SwitchInterfaceStatus
SwitchInterfaceStatus defines the observed state of SwitchInterface.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
adminState AdminState | AdminState represents the desired administrative state of the interface. | ||
operationalState OperationState | OperationalState represents the actual operational state of the interface. | ||
state SwitchInterfaceState | State represents the high-level state of the SwitchInterface. | ||
neighbor Neighbor | Neighbor is a reference to the connected neighbor device, if any. | ||
macAddress string | MacAddress is the MAC address assigned to this interface. | ||
aliasName string | AliasName is the alias name of the interface. | ||
conditions Condition array | The status of each condition is one of True, False, or Unknown. |
SwitchSpec
SwitchSpec defines the desired state of Switch
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
hostname string | Hostname is configured on the switch by --ztp-mode=generated. If omitted, the generated script uses the Switch object name. | MaxLength: 253 Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ | |
management Management | |||
ztp ZTP | ZTP identifies the switch while it requests its initial provisioning script. | ||
containers Container array | Containers are started with host networking and Docker's unless-stopped restart policy by --ztp-mode=generated. | ||
volumes Volume array | Volumes are named storage sources available to containers. Generated ZTP currently supports hostPath volumes only. | ||
nextBootMode NextBootMode | NextBootMode declares the desired behavior of the next boot. The default is None. It is configured by --ztp-mode=generated. | Enum: [None InstallOS] | |
macAddress string | MacAddress is the MAC address assigned to this interface. | ||
ports PortSpec array | Ports the physical ports available on the Switch. |
SwitchState
Underlying type: string
SwitchState represents the high-level state of the Switch.
Appears in:
| Field | Description |
|---|---|
Pending | |
Ready | |
Failed |
SwitchStatus
SwitchStatus defines the observed state of Switch.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
state SwitchState | State represents the high-level state of the Switch. | ||
ports PortStatus array | Ports represents the status of each port on the Switch. | ||
macAddress string | MACAddress is the MAC address assigned to this switch. | ||
firmwareVersion string | FirmwareVersion is the firmware version running on this switch. | ||
sku string | SKU is the stock keeping unit of this switch. | ||
conditions Condition array | The status of each condition is one of True, False, or Unknown. |
Volume
Volume represents a named storage volume made available to Switch containers. It follows the Kubernetes Pod volume model. Generated ZTP currently supports hostPath volumes only.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name is the stable volume identity referenced by Container.VolumeMounts. | MaxLength: 63 Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ | |
hostPath HostPathVolumeSource | HostPath represents a pre-existing file or directory on the SONiC host. |
VolumeMount
VolumeMount describes a volume mounted into a Switch container. It follows the Kubernetes Pod volumeMount API.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | |||
mountPath string | |||
readOnly boolean |
ZTP
ZTP defines how a switch is identified while it is requesting its initial ZTP script. SourceAddress is the address observed by the provisioning server, which can differ from the management address used after provisioning.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
sourceAddress string | |||
scriptRef ZTPConfigMapReference | ScriptRef identifies the complete script served when --ztp-mode=configmap. It is not used by --ztp-mode=generated. |
ZTPConfigMapReference
ZTPConfigMapReference identifies the ConfigMap entry containing a switch's complete ZTP script. The referenced ConfigMap may be in a provisioning namespace chosen by the cluster administrator.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
namespace string | |||
name string | |||
key string |