Skip to content

Commit e0acba9

Browse files
feat: Add BareMetalHost Kustomize config to nova04delta example
...based on bmo01 DT Co-authored-by: aider (gemini/gemini-2.5-pro) <[email protected]> Signed-off-by: Bohdan Dobrelia <[email protected]>
1 parent abc447c commit e0acba9

File tree

8 files changed

+291
-1
lines changed

8 files changed

+291
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: edpm-compute-0-preprovision-network-data
6+
namespace: openstack
7+
type: Opaque
8+
stringData: {}
9+
---
10+
apiVersion: metal3.io/v1alpha1
11+
kind: BareMetalHost
12+
metadata:
13+
labels: {}
14+
name: edpm-compute-0
15+
namespace: openstack
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: metal3.io/v1alpha1
3+
kind: BareMetalHost
4+
metadata:
5+
labels: {}
6+
name: _ignored_
7+
namespace: openstack
8+
annotations:
9+
inspect.metal3.io: _replaced_
10+
spec:
11+
architecture: x86_64
12+
automatedCleaningMode: metadata
13+
bmc:
14+
address: _replaced_
15+
credentialsName: bmc-secret
16+
bootMACAddress: _replaced_
17+
bootMode: UEFI
18+
rootDeviceHints: {}
19+
online: false
20+
preprovisioningNetworkDataName: _replaced_

dt/nova/nova04delta/edpm/nodeset/kustomization.yaml

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ resources:
2424
- baremetalset-password-secret.yaml
2525
- network-data-secrets.yaml
2626
- nova_gpu.yaml
27+
- baremetalhost.yaml
28+
29+
patches:
30+
- target:
31+
kind: BareMetalHost
32+
path: baremetalhost_template.yaml
33+
- target:
34+
kind: BareMetalHost
35+
name: edpm-compute-0
36+
patch: |
37+
- op: replace
38+
path: /spec/preprovisioningNetworkDataName
39+
value: edpm-compute-0-preprovision-network-data
2740
2841
# TODO: wire-in all missing nodeset data values, like examples/dt/bmo01/dataplane/nodesets/kustomization.yaml
2942
replacements:
@@ -102,4 +115,76 @@ replacements:
102115
fieldPaths:
103116
- spec.baremetalSetTemplate
104117
options:
105-
create: true
118+
create: true
119+
# BareMetalHost
120+
- source:
121+
kind: ConfigMap
122+
name: edpm-nodeset-values
123+
fieldPath: data.baremetalhosts.edpm-compute-0.labels
124+
targets:
125+
- select:
126+
kind: BareMetalHost
127+
name: edpm-compute-0
128+
fieldPaths:
129+
- metadata.labels
130+
options:
131+
create: true
132+
- source:
133+
kind: ConfigMap
134+
name: edpm-nodeset-values
135+
fieldPath: data.metal3_inspection
136+
targets:
137+
- select:
138+
kind: BareMetalHost
139+
fieldPaths:
140+
- metadata.annotations.inspect\.metal3\.io
141+
options:
142+
create: true
143+
- source:
144+
kind: ConfigMap
145+
name: edpm-nodeset-values
146+
fieldPath: data.baremetalhosts.edpm-compute-0.bmc.address
147+
targets:
148+
- select:
149+
kind: BareMetalHost
150+
name: edpm-compute-0
151+
fieldPaths:
152+
- spec.bmc.address
153+
options:
154+
create: true
155+
- source:
156+
kind: ConfigMap
157+
name: edpm-nodeset-values
158+
fieldPath: data.baremetalhosts.edpm-compute-0.bootMACAddress
159+
targets:
160+
- select:
161+
kind: BareMetalHost
162+
name: edpm-compute-0
163+
fieldPaths:
164+
- spec.bootMACAddress
165+
options:
166+
create: true
167+
- source:
168+
kind: ConfigMap
169+
name: edpm-nodeset-values
170+
fieldPath: data.baremetalhosts.edpm-compute-0.rootDeviceHints
171+
targets:
172+
- select:
173+
kind: BareMetalHost
174+
name: edpm-compute-0
175+
fieldPaths:
176+
- spec.rootDeviceHints
177+
options:
178+
create: true
179+
- source:
180+
kind: ConfigMap
181+
name: edpm-nodeset-values
182+
fieldPath: data.baremetalhosts.edpm-compute-0.preprovisioningNetworkData
183+
targets:
184+
- select:
185+
kind: Secret
186+
name: edpm-compute-0-preprovision-network-data
187+
fieldPaths:
188+
- stringData
189+
options:
190+
create: true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: edpm-compute-1-preprovision-network-data
6+
namespace: openstack
7+
type: Opaque
8+
stringData: {}
9+
---
10+
apiVersion: metal3.io/v1alpha1
11+
kind: BareMetalHost
12+
metadata:
13+
labels: {}
14+
name: edpm-compute-1
15+
namespace: openstack
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: metal3.io/v1alpha1
3+
kind: BareMetalHost
4+
metadata:
5+
labels: {}
6+
name: _ignored_
7+
namespace: openstack
8+
annotations:
9+
inspect.metal3.io: _replaced_
10+
spec:
11+
architecture: x86_64
12+
automatedCleaningMode: metadata
13+
bmc:
14+
address: _replaced_
15+
credentialsName: bmc-secret
16+
bootMACAddress: _replaced_
17+
bootMode: UEFI
18+
rootDeviceHints: {}
19+
online: false
20+
preprovisioningNetworkDataName: _replaced_

dt/nova/nova04delta/edpm/nodeset2/kustomization.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ resources:
2424
- baremetalset-password-secret.yaml
2525
- network-data-secrets.yaml
2626
- nova_gpu.yaml
27+
- baremetalhost.yaml
28+
29+
patches:
30+
- target:
31+
kind: BareMetalHost
32+
path: baremetalhost_template.yaml
33+
- target:
34+
kind: BareMetalHost
35+
name: edpm-compute-1
36+
patch: |
37+
- op: replace
38+
path: /spec/preprovisioningNetworkDataName
39+
value: edpm-compute-1-preprovision-network-data
2740
2841
# TODO: wire-in all missing nodeset data values, like examples/dt/bmo01/dataplane/nodesets/kustomization.yaml
2942
replacements:
@@ -103,3 +116,75 @@ replacements:
103116
- spec.baremetalSetTemplate
104117
options:
105118
create: true
119+
# BareMetalHost
120+
- source:
121+
kind: ConfigMap
122+
name: edpm-nodeset-values
123+
fieldPath: data.baremetalhosts.edpm-compute-1.labels
124+
targets:
125+
- select:
126+
kind: BareMetalHost
127+
name: edpm-compute-1
128+
fieldPaths:
129+
- metadata.labels
130+
options:
131+
create: true
132+
- source:
133+
kind: ConfigMap
134+
name: edpm-nodeset-values
135+
fieldPath: data.metal3_inspection
136+
targets:
137+
- select:
138+
kind: BareMetalHost
139+
fieldPaths:
140+
- metadata.annotations.inspect\.metal3\.io
141+
options:
142+
create: true
143+
- source:
144+
kind: ConfigMap
145+
name: edpm-nodeset-values
146+
fieldPath: data.baremetalhosts.edpm-compute-1.bmc.address
147+
targets:
148+
- select:
149+
kind: BareMetalHost
150+
name: edpm-compute-1
151+
fieldPaths:
152+
- spec.bmc.address
153+
options:
154+
create: true
155+
- source:
156+
kind: ConfigMap
157+
name: edpm-nodeset-values
158+
fieldPath: data.baremetalhosts.edpm-compute-1.bootMACAddress
159+
targets:
160+
- select:
161+
kind: BareMetalHost
162+
name: edpm-compute-1
163+
fieldPaths:
164+
- spec.bootMACAddress
165+
options:
166+
create: true
167+
- source:
168+
kind: ConfigMap
169+
name: edpm-nodeset-values
170+
fieldPath: data.baremetalhosts.edpm-compute-1.rootDeviceHints
171+
targets:
172+
- select:
173+
kind: BareMetalHost
174+
name: edpm-compute-1
175+
fieldPaths:
176+
- spec.rootDeviceHints
177+
options:
178+
create: true
179+
- source:
180+
kind: ConfigMap
181+
name: edpm-nodeset-values
182+
fieldPath: data.baremetalhosts.edpm-compute-1.preprovisioningNetworkData
183+
targets:
184+
- select:
185+
kind: Secret
186+
name: edpm-compute-1-preprovision-network-data
187+
fieldPaths:
188+
- stringData
189+
options:
190+
create: true

examples/dt/nova/nova04delta/edpm/nodeset/values.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,31 @@ metadata:
1010
data:
1111
root_password: cmVkaGF0Cg==
1212
preProvisioned: false
13+
metal3_inspection: disabled
14+
baremetalhosts:
15+
edpm-compute-0:
16+
labels:
17+
nodeName: edpm-compute-0
18+
bmc:
19+
address: CHANGEME
20+
bootMACAddress: CHANGEME
21+
rootDeviceHints:
22+
deviceName: /dev/vda
23+
preprovisioningNetworkData: |
24+
networkData:
25+
links:
26+
- id: provisioning
27+
type: phy
28+
name: CHANGEME
29+
networks:
30+
- id: provisioning
31+
type: ipv4
32+
link: provisioning
33+
ip_address: 172.22.0.100 # CHANGEME
34+
netmask: 255.255.255.0
35+
routes:
36+
- destination: 0.0.0.0/0
37+
next_hop: 172.22.0.1 # CHANGEME
1338
baremetalHostsNetworkData:
1439
edpm-compute-0:
1540
networkData: |

examples/dt/nova/nova04delta/edpm/nodeset2/values.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,31 @@ metadata:
1010
data:
1111
root_password: cmVkaGF0Cg==
1212
preProvisioned: false
13+
metal3_inspection: disabled
14+
baremetalhosts:
15+
edpm-compute-1:
16+
labels:
17+
nodeName: edpm-compute-1
18+
bmc:
19+
address: CHANGEME
20+
bootMACAddress: CHANGEME
21+
rootDeviceHints:
22+
deviceName: /dev/vda
23+
preprovisioningNetworkData: |
24+
networkData:
25+
links:
26+
- id: provisioning
27+
type: phy
28+
name: CHANGEME
29+
networks:
30+
- id: provisioning
31+
type: ipv4
32+
link: provisioning
33+
ip_address: 172.22.0.101 # CHANGEME
34+
netmask: 255.255.255.0
35+
routes:
36+
- destination: 0.0.0.0/0
37+
next_hop: 172.22.0.1 # CHANGEME
1338
baremetalHostsNetworkData:
1439
edpm-compute-1:
1540
networkData: |

0 commit comments

Comments
 (0)