Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion api/v1alpha1/ironic_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,32 @@ type Networking struct {
RPCPort int32 `json:"rpcPort,omitempty"`
}

// CPUArchitecture represents a CPU architecture supported by IPA.
// +kubebuilder:validation:Enum=x86_64;aarch64
type CPUArchitecture string

const (
// ArchX86_64 represents the x86_64 (amd64) architecture.
ArchX86_64 CPUArchitecture = "x86_64"
// ArchAarch64 represents the aarch64 (arm64) architecture.
ArchAarch64 CPUArchitecture = "aarch64"
)

// AgentImages defines a single IPA (Ironic Python Agent) image configuration.
type AgentImages struct {
// Kernel is the URL of the IPA kernel image.
// Example: "file:///shared/html/images/ironic-python-agent.kernel"
Kernel string `json:"kernel"`

// Initramfs is the URL of the IPA initramfs/ramdisk image.
// Example: "file:///shared/html/images/ironic-python-agent.initramfs"
Initramfs string `json:"initramfs"`

// Architecture is the target CPU architecture for this image.
// Each image must have a unique architecture.
Architecture CPUArchitecture `json:"architecture"`
}

// DeployRamdisk defines IPA ramdisk settings.
type DeployRamdisk struct {
// DisableDownloader tells the operator not to start the IPA downloader as the init container.
Expand Down Expand Up @@ -250,7 +276,6 @@ type Images struct {
// Warning: modifying arbitrary options may cause your Ironic installation to
// fail or misbehave. Do not modify anything you don't understand well.
type ExtraConfig struct {

// The group that config belongs to.
// +optional
Group string `json:"group,omitempty"`
Expand Down Expand Up @@ -292,11 +317,28 @@ type Overrides struct {
// +optional
Containers []corev1.Container `json:"containers,omitempty"`

// HttpdLivenessProbe configures the httpd container liveness probe.
// If not set and AgentImages is not specified, defaults to checking /images/ironic-python-agent.kernel exists.
// When AgentImages is specified, no default probe is configured.
// +optional
HttpdLivenessProbe *corev1.Probe `json:"httpdLivenessProbe,omitempty"`

// HttpdReadinessProbe configures the httpd container readiness probe.
// If not set and AgentImages is not specified, defaults to checking /images/ironic-python-agent.kernel exists.
// When AgentImages is specified, no default probe is configured.
// +optional
HttpdReadinessProbe *corev1.Probe `json:"httpdReadinessProbe,omitempty"`

// InitContainers to append to the main Ironic pod.
// If a container name matches an existing init container, the existing init container is replaced.
// +optional
InitContainers []corev1.Container `json:"initContainers,omitempty"`

// AgentImages overrides the default IPA (Ironic Python Agent) images provided by the downloader.
// Each image must have a unique architecture (rendered as DEPLOY_KERNEL_BY_ARCH/DEPLOY_RAMDISK_BY_ARCH).
// +optional
AgentImages []AgentImages `json:"agentImages,omitempty"`

// Extra labels to add to each pod (including upgrade jobs).
// +optional
Labels map[string]string `json:"labels,omitempty"`
Expand Down
30 changes: 30 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading