feat: ncd0 example complete. Missing files for authentication, ignition etc are accessible upon deman. This is yet another great step towards full UPI automated provisionning
This commit is contained in:
@@ -34,16 +34,17 @@ impl OKDBootstrapDhcpScore {
|
||||
.expect("Should have at least one worker to be used as bootstrap node")
|
||||
.clone(),
|
||||
});
|
||||
// TODO refactor this so it is not copy pasted from dhcp.rs
|
||||
Self {
|
||||
dhcp_score: DhcpScore::new(
|
||||
host_binding,
|
||||
// TODO : we should add a tftp server to the topology instead of relying on the
|
||||
// router address, this is leaking implementation details
|
||||
Some(topology.router.get_gateway()),
|
||||
Some("bootx64.efi".to_string()),
|
||||
None, // To allow UEFI boot we cannot provide a legacy file
|
||||
Some("undionly.kpxe".to_string()),
|
||||
Some("ipxe.efi".to_string()),
|
||||
Some(format!("{}:8080/boot.ipxe", topology.router.get_gateway())),
|
||||
Some(format!("http://{}:8080/boot.ipxe", topology.router.get_gateway())),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ pub struct OKDDhcpScore {
|
||||
|
||||
impl OKDDhcpScore {
|
||||
pub fn new(topology: &HAClusterTopology, inventory: &Inventory) -> Self {
|
||||
let host_binding = topology
|
||||
let mut host_binding: Vec<HostBinding> = topology
|
||||
.control_plane
|
||||
.iter()
|
||||
.enumerate()
|
||||
@@ -26,6 +26,22 @@ impl OKDDhcpScore {
|
||||
.clone(),
|
||||
})
|
||||
.collect();
|
||||
|
||||
topology
|
||||
.workers
|
||||
.iter()
|
||||
.enumerate()
|
||||
.for_each(|(index, topology_entry)| {
|
||||
host_binding.push(HostBinding {
|
||||
logical_host: topology_entry.clone(),
|
||||
physical_host: inventory
|
||||
.worker_host
|
||||
.get(index)
|
||||
.expect("There should be enough worker hosts to fill topology")
|
||||
.clone(),
|
||||
})
|
||||
});
|
||||
|
||||
Self {
|
||||
// TODO : we should add a tftp server to the topology instead of relying on the
|
||||
// router address, this is leaking implementation details
|
||||
@@ -33,9 +49,12 @@ impl OKDDhcpScore {
|
||||
host_binding,
|
||||
next_server: Some(topology.router.get_gateway()),
|
||||
boot_filename: None,
|
||||
filenameipxe: Some(format!("http://{}:8080/boot.ipxe", topology.router.get_gateway())),
|
||||
filename: Some("undionly.kpxe".to_string()),
|
||||
filename64: Some("ipxe.efi".to_string()),
|
||||
filenameipxe: Some(format!(
|
||||
"http://{}:8080/boot.ipxe",
|
||||
topology.router.get_gateway()
|
||||
)),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user