Compare commits
No commits in common. "be385dccff49303dd9159bccf8552d44fcc2e451" and "f31d21f9daa2921a9a3fcfe3c54ce9243ae4446e" have entirely different histories.
be385dccff
...
f31d21f9da
@ -8,7 +8,7 @@ use harmony::{
|
||||
load_balancer::LoadBalancerScore,
|
||||
},
|
||||
topology::{
|
||||
BackendServer, DummyInfra, HealthCheck, HttpMethod, HttpStatusCode, LoadBalancerService, SSL,
|
||||
BackendServer, DummyInfra, HealthCheck, HttpMethod, HttpStatusCode, LoadBalancerService,
|
||||
},
|
||||
};
|
||||
use harmony_macros::ipv4;
|
||||
@ -47,7 +47,6 @@ fn build_large_score() -> LoadBalancerScore {
|
||||
.to_string(),
|
||||
HttpMethod::GET,
|
||||
HttpStatusCode::Success2xx,
|
||||
SSL::Disabled,
|
||||
)),
|
||||
};
|
||||
LoadBalancerScore {
|
||||
|
||||
@ -102,17 +102,8 @@ pub enum HttpStatusCode {
|
||||
ServerError5xx,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
pub enum SSL {
|
||||
SSL,
|
||||
Disabled,
|
||||
Default,
|
||||
SNI,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
pub enum HealthCheck {
|
||||
HTTP(String, HttpMethod, HttpStatusCode, SSL),
|
||||
HTTP(String, HttpMethod, HttpStatusCode),
|
||||
TCP(Option<u16>),
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, info, warn};
|
||||
use opnsense_config_xml::{Frontend, HAProxy, HAProxyBackend, HAProxyHealthCheck, HAProxyServer, MaybeString};
|
||||
use opnsense_config_xml::{Frontend, HAProxy, HAProxyBackend, HAProxyHealthCheck, HAProxyServer};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{
|
||||
@ -241,13 +241,7 @@ pub(crate) fn harmony_load_balancer_service_to_haproxy_xml(
|
||||
// frontend points to backend
|
||||
let healthcheck = if let Some(health_check) = &service.health_check {
|
||||
match health_check {
|
||||
HealthCheck::HTTP(path, http_method, _http_status_code, ssl) => {
|
||||
let ssl: MaybeString = match ssl {
|
||||
crate::topology::SSL::SSL => "ssl".into(),
|
||||
crate::topology::SSL::SNI => "sslni".into(),
|
||||
crate::topology::SSL::Disabled => "nossl".into(),
|
||||
crate::topology::SSL::Default => "".into(),
|
||||
};
|
||||
HealthCheck::HTTP(path, http_method, _http_status_code) => {
|
||||
let haproxy_check = HAProxyHealthCheck {
|
||||
name: format!("HTTP_{http_method}_{path}"),
|
||||
uuid: Uuid::new_v4().to_string(),
|
||||
@ -255,7 +249,6 @@ pub(crate) fn harmony_load_balancer_service_to_haproxy_xml(
|
||||
health_check_type: "http".to_string(),
|
||||
http_uri: path.clone().into(),
|
||||
interval: "2s".to_string(),
|
||||
ssl,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ use crate::{
|
||||
score::Score,
|
||||
topology::{
|
||||
BackendServer, HAClusterTopology, HealthCheck, HttpMethod, HttpStatusCode, LoadBalancer,
|
||||
LoadBalancerService, Topology, SSL,
|
||||
LoadBalancerService, Topology,
|
||||
},
|
||||
};
|
||||
|
||||
@ -44,7 +44,6 @@ impl OKDBootstrapLoadBalancerScore {
|
||||
"/readyz".to_string(),
|
||||
HttpMethod::GET,
|
||||
HttpStatusCode::Success2xx,
|
||||
SSL::SSL
|
||||
)),
|
||||
},
|
||||
];
|
||||
|
||||
@ -28,7 +28,7 @@ impl<T: Topology + DhcpServer + TftpServer + HttpServer + Router> Score<T> for O
|
||||
}
|
||||
|
||||
fn name(&self) -> String {
|
||||
"OKDipxeScore".to_string()
|
||||
"OKDIpxeScore".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ use crate::{
|
||||
score::Score,
|
||||
topology::{
|
||||
BackendServer, HAClusterTopology, HealthCheck, HttpMethod, HttpStatusCode, LoadBalancer,
|
||||
LoadBalancerService, Topology, SSL,
|
||||
LoadBalancerService, Topology,
|
||||
},
|
||||
};
|
||||
|
||||
@ -62,7 +62,6 @@ impl OKDLoadBalancerScore {
|
||||
"/readyz".to_string(),
|
||||
HttpMethod::GET,
|
||||
HttpStatusCode::Success2xx,
|
||||
SSL::SSL,
|
||||
)),
|
||||
},
|
||||
];
|
||||
|
||||
@ -296,7 +296,7 @@ dhcp-boot=tag:efi,tag:!ipxe,{efi_filename}{tftp_str}
|
||||
dhcp-boot=tag:ipxe,{ipxe_filename}{tftp_str}
|
||||
|
||||
# Provide undionly to legacy bios clients
|
||||
dhcp-boot=tag:bios,tag:!ipxe,{bios_filename}{tftp_str}
|
||||
dhcp-boot=tag:bios,{bios_filename}{tftp_str}
|
||||
"
|
||||
);
|
||||
info!("Writing configuration file to {DNS_MASQ_PXE_CONFIG_FILE}");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user