Skip to content

Commit a14095e

Browse files
committed
Add multi-architecture IPA support and configurable probes
Signed-off-by: s3rj1k <[email protected]>
1 parent 3a67b89 commit a14095e

File tree

13 files changed

+1497
-14
lines changed

13 files changed

+1497
-14
lines changed

api/v1alpha1/ironic_types.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,28 @@ type Networking struct {
171171

172172
// DeployRamdisk defines IPA ramdisk settings.
173173
type DeployRamdisk struct {
174+
// DeployKernel sets DEPLOY_KERNEL URL for the IPA kernel.
175+
// Example: "file:///shared/html/images/ironic-python-agent.kernel"
176+
// +optional
177+
DeployKernel string `json:"deployKernel,omitempty"`
178+
179+
// DeployKernelByArch sets DEPLOY_KERNEL_BY_ARCH for multi-architecture support.
180+
// Format: arch1:url1,arch2:url2
181+
// Example: "x86_64:file:///shared/html/images/ipa.x86_64.kernel,aarch64:file:///shared/html/images/ipa.arm64.kernel"
182+
// +optional
183+
DeployKernelByArch string `json:"deployKernelByArch,omitempty"`
184+
185+
// DeployRamdisk sets DEPLOY_RAMDISK URL for the IPA ramdisk.
186+
// Example: "file:///shared/html/images/ironic-python-agent.initramfs"
187+
// +optional
188+
DeployRamdisk string `json:"deployRamdisk,omitempty"`
189+
190+
// DeployRamdiskByArch sets DEPLOY_RAMDISK_BY_ARCH for multi-architecture support.
191+
// Format: arch1:url1,arch2:url2
192+
// Example: "x86_64:file:///shared/html/images/ipa.x86_64.initramfs,aarch64:file:///shared/html/images/ipa.arm64.initramfs"
193+
// +optional
194+
DeployRamdiskByArch string `json:"deployRamdiskByArch,omitempty"`
195+
174196
// DisableDownloader tells the operator not to start the IPA downloader as the init container.
175197
// The user will be responsible for providing the right image to BareMetal Operator.
176198
// +optional
@@ -181,6 +203,16 @@ type DeployRamdisk struct {
181203
// +optional
182204
ExtraKernelParams string `json:"extraKernelParams,omitempty"`
183205

206+
// LivenessProbe configures the httpd container liveness probe.
207+
// If not set, defaults to checking /images/ironic-python-agent.kernel exists.
208+
// +optional
209+
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
210+
211+
// ReadinessProbe configures the httpd container readiness probe.
212+
// If not set, defaults to checking /images/ironic-python-agent.kernel exists.
213+
// +optional
214+
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
215+
184216
// SSHKey is the contents of the public key to inject into the ramdisk for debugging purposes.
185217
// +optional
186218
SSHKey string `json:"sshKey,omitempty"`

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/ironic.metal3.io_ironics.yaml

Lines changed: 328 additions & 0 deletions
Large diffs are not rendered by default.

config/default/kustomization.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ replacements:
2424
name: serving-cert
2525
version: v1
2626
targets:
27+
- fieldPaths:
28+
- .metadata.annotations.[cert-manager.io/inject-ca-from]
29+
options:
30+
create: true
31+
delimiter: /
32+
index: 0
33+
select:
34+
kind: MutatingWebhookConfiguration
2735
- fieldPaths:
2836
- .metadata.annotations.[cert-manager.io/inject-ca-from]
2937
options:
@@ -47,6 +55,14 @@ replacements:
4755
name: serving-cert
4856
version: v1
4957
targets:
58+
- fieldPaths:
59+
- .metadata.annotations.[cert-manager.io/inject-ca-from]
60+
options:
61+
create: true
62+
delimiter: /
63+
index: 1
64+
select:
65+
kind: MutatingWebhookConfiguration
5066
- fieldPaths:
5167
- .metadata.annotations.[cert-manager.io/inject-ca-from]
5268
options:

config/default/webhookcainjection_patch.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# This patch add annotation to admission webhook config and
22
# the variables CERTIFICATE_NAMESPACE and CERTIFICATE_NAME will be substituted by kustomize.
33
apiVersion: admissionregistration.k8s.io/v1
4+
kind: MutatingWebhookConfiguration
5+
metadata:
6+
labels:
7+
app.kubernetes.io/name: mutatingwebhookconfiguration
8+
app.kubernetes.io/instance: mutating-webhook-configuration
9+
app.kubernetes.io/component: webhook
10+
app.kubernetes.io/created-by: ironic-standalone-operator
11+
app.kubernetes.io/part-of: ironic-standalone-operator
12+
app.kubernetes.io/managed-by: kustomize
13+
name: mutating-webhook-configuration
14+
annotations:
15+
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
16+
---
17+
apiVersion: admissionregistration.k8s.io/v1
418
kind: ValidatingWebhookConfiguration
519
metadata:
620
labels:

config/webhook/kustomizeconfig.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ nameReference:
44
- kind: Service
55
version: v1
66
fieldSpecs:
7+
- kind: MutatingWebhookConfiguration
8+
group: admissionregistration.k8s.io
9+
path: webhooks/clientConfig/service/name
710
- kind: ValidatingWebhookConfiguration
811
group: admissionregistration.k8s.io
912
path: webhooks/clientConfig/service/name
1013

1114
namespace:
15+
- kind: MutatingWebhookConfiguration
16+
group: admissionregistration.k8s.io
17+
path: webhooks/clientConfig/service/namespace
18+
create: true
1219
- kind: ValidatingWebhookConfiguration
1320
group: admissionregistration.k8s.io
1421
path: webhooks/clientConfig/service/namespace

config/webhook/manifests.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
---
22
apiVersion: admissionregistration.k8s.io/v1
3+
kind: MutatingWebhookConfiguration
4+
metadata:
5+
name: mutating-webhook-configuration
6+
webhooks:
7+
- admissionReviewVersions:
8+
- v1
9+
clientConfig:
10+
service:
11+
name: webhook-service
12+
namespace: system
13+
path: /mutate-ironic-metal3-io-v1alpha1-ironic
14+
failurePolicy: Fail
15+
name: mutate-ironic.ironic.metal3.io
16+
rules:
17+
- apiGroups:
18+
- ironic.metal3.io
19+
apiVersions:
20+
- v1alpha1
21+
operations:
22+
- CREATE
23+
- UPDATE
24+
resources:
25+
- ironics
26+
sideEffects: None
27+
---
28+
apiVersion: admissionregistration.k8s.io/v1
329
kind: ValidatingWebhookConfiguration
430
metadata:
531
name: validating-webhook-configuration

0 commit comments

Comments
 (0)