Skip to content
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ examples/dt/uni*/data-plane.yaml
examples/dt/uni*/networker/edpm-networker.yaml
.idea/
.aider*
.tool-versions*
20 changes: 16 additions & 4 deletions automation/vars/nova04delta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,34 @@ vas:
wait_conditions:
- >-
oc -n openstack wait osctlplane controlplane
--for condition=Ready
--timeout=60m
--for condition=OpenStackControlPlaneDNSReadyCondition
--timeout=20m
values:
- name: network-values
src_file: networking/nncp/values.yaml
- name: service-values
src_file: service-values.yaml
build_output: control-plane.yaml

- name: edpm-nodeset
path: examples/dt/nova/nova04delta/edpm/nodeset
- name: baremetalhosts-configuration
path: examples/dt/nova/nova04delta/edpm/baremetalhosts
wait_conditions:
- >-
oc -n openstack wait baremetalhosts.metal3.io edpm-compute-0
--for=jsonpath='{.status.provisioning.state}'=available
--timeout=10m
- >-
oc -n openstack wait osctlplane controlplane
--for condition=Ready
--timeout=40m
values:
- name: baremetalhost-values
src_file: values.yaml
build_output: baremetalhosts.yaml

- name: edpm-nodeset
path: examples/dt/nova/nova04delta/edpm/nodeset
wait_conditions:
- >-
oc -n openstack wait
osdpns openstack-edpm --for condition=SetupReady
Expand Down
2 changes: 2 additions & 0 deletions dt/nova/nova04delta/edpm/baremetalhosts/bmc-secret.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
username=admin
password=password
126 changes: 126 additions & 0 deletions dt/nova/nova04delta/edpm/baremetalhosts/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
# Set namespace to OpenStack on all namespaced objects without a namespace
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true

secretGenerator:
- name: bmc-secret
behavior: create
envs:
- bmc-secret.env
options:
disableNameSuffixHash: true

resources:
- baremetalhosts.yaml
- provisioning.yaml

patches:
- target:
kind: BareMetalHost
path: baremetalhost_template.yaml
- target:
kind: BareMetalHost
name: edpm-compute-0
patch: |
- op: replace
path: /spec/preprovisioningNetworkDataName
value: edpm-compute-0-preprovision-network-data

replacements:
# Labels
- source:
kind: ConfigMap
name: baremetalhost-values
fieldPath: data.edpm-compute-0.labels
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- metadata.labels
options:
create: true

# Enable/Disable Metal3 Inspection
- source:
kind: ConfigMap
name: baremetalhost-values
fieldPath: data.metal3_inspection
targets:
- select:
kind: BareMetalHost
fieldPaths:
- metadata.annotations.inspect\.metal3\.io
options:
create: true

# BMC Configuration
- source:
kind: ConfigMap
name: baremetalhost-values
fieldPath: data.edpm-compute-0.bmc
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.bmc
options:
create: true

# bootMACAddress
- source:
kind: ConfigMap
name: baremetalhost-values
fieldPath: data.edpm-compute-0.bootMACAddress
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.bootMACAddress
options:
create: true

# rootDeviceHints
- source:
kind: ConfigMap
name: baremetalhost-values
fieldPath: data.edpm-compute-0.rootDeviceHints
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.rootDeviceHints
options:
create: true

# preprovisioningNetworkData
- source:
kind: ConfigMap
name: baremetalhost-values
fieldPath: data.edpm-compute-0.preprovisioningNetworkData
targets:
- select:
kind: Secret
name: edpm-compute-0-preprovision-network-data
fieldPaths:
- stringData
options:
create: true
103 changes: 0 additions & 103 deletions dt/nova/nova04delta/edpm/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ components:
resources:
- network-data-secrets.yaml
- nova_gpu.yaml
- baremetalhost.yaml
- provisioning.yaml

patches:
- target:
kind: BareMetalHost
path: baremetalhost_template.yaml

replacements:
# Nova compute CPU pinning customization
Expand Down Expand Up @@ -90,102 +83,6 @@ replacements:
- spec.baremetalSetTemplate
options:
create: true
# BareMetalHost
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalhosts.edpm-compute-0.labels
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- metadata.labels
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.metal3_inspection
targets:
- select:
kind: BareMetalHost
fieldPaths:
- metadata.annotations.inspect\.metal3\.io
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalhosts.edpm-compute-0.bmc
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.bmc
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalhosts.edpm-compute-0.online
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.online
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalhosts.edpm-compute-0.preprovisioningNetworkDataName
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.preprovisioningNetworkDataName
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalhosts.edpm-compute-0.bootMACAddress
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.bootMACAddress
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalhosts.edpm-compute-0.rootDeviceHints
targets:
- select:
kind: BareMetalHost
name: edpm-compute-0
fieldPaths:
- spec.rootDeviceHints
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalhosts.edpm-compute-0.preprovisioningNetworkData
targets:
- select:
kind: Secret
name: edpm-compute-0-preprovision-network-data
fieldPaths:
- stringData
options:
create: true
# BMO root password for provisioned host
- source:
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../../dt/nova/nova04delta/edpm/baremetalhosts

resources:
- values.yaml
25 changes: 25 additions & 0 deletions examples/dt/nova/nova04delta/edpm/baremetalhosts/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: baremetalhost-values
annotations:
config.kubernetes.io/local-config: "true"
data:
metal3_inspection: disabled
edpm-compute-0:
name: edpm-compute-0
labels:
app: openstack
nodeset: edpm
nodeName: edpm-compute-0
bmc:
address: CHANGEME
credentialsName: bmc-secret
disableCertificateVerification: true
bootMACAddress: CHANGEME
rootDeviceHints:
deviceName: /dev/vda
preprovisioningNetworkData:
nmstate: |
CHANGEME
22 changes: 1 addition & 21 deletions examples/dt/nova/nova04delta/edpm/nodeset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,6 @@ data:
root_password: cmVkaGF0Cg==
# Mapped in dt/nova/nova04delta/edpm/nodeset/kustomization.yaml to OpenStackDataPlaneNodeSet.spec.preProvisioned
preProvisioned: false
# Mapped in dt/nova/nova04delta/edpm/nodeset/kustomization.yaml to BareMetalHost.metadata.annotations.inspect.metal3.io
# Uncomment to allow HW inspection of the node, for example after a blank RAID device was manually created in BIOS.
metal3_inspection: "disabled"
# Mapped in dt/nova/nova04delta/edpm/nodeset/kustomization.yaml to BareMetalHost resource properties
baremetalhosts:
edpm-compute-0:
online: true
labels:
nodeName: edpm-compute-0
bmc:
address: CHANGEME
# NOTE: in CI systems, we use credentials_file from cifmw_baremetal_hosts.
# credentialsName: bmc-secret
disableCertificateVerification: true
bootMACAddress: CHANGEME
rootDeviceHints:
deviceName: /dev/vda
preprovisioningNetworkDataName: edpm-compute-0-preprovision-network-data
preprovisioningNetworkData:
nmstate: |
CHANGEME
# Mapped in dt/nova/nova04delta/edpm/nodeset/kustomization.yaml to edpm-compute-0-network-data Secret
# Only provide it if it should not be auto-generated by EDPM operator
baremetalHostsNetworkData:
Expand All @@ -46,6 +25,7 @@ data:
bmhNamespace: openstack
# NOTE: provisioningInterface should not be provided when using virtual-media
bmhLabelSelector:
# must match to all or a subset of the labels provided in the baremetalhosts/values.yaml
app: openstack # CHANGEME
passwordSecret:
name: baremetalset-password-secret
Expand Down
1 change: 1 addition & 0 deletions zuul.d/validations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
- examples/dt/nova/nova04delta/control-plane
- examples/dt/nova/nova04delta/control-plane/networking
- examples/dt/nova/nova04delta/control-plane/networking/nncp
- examples/dt/nova/nova04delta/edpm/baremetalhosts
- examples/dt/nova/nova04delta/edpm/deployment
- examples/dt/nova/nova04delta/edpm/nodeset
- lib
Expand Down