-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditionally apply IngressRouteTCP #396
Conversation
@@ -61,6 +66,41 @@ fn generate_ingress( | |||
} | |||
} | |||
|
|||
fn generate_ingress_tcp( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New function for generating IngressRouteTCP
.
@@ -168,6 +200,11 @@ pub fn generate_ingress_routes( | |||
for route in routings.iter() { | |||
match route.ingress_path.clone() { | |||
Some(path) => { | |||
if route.entry_points.clone()?.contains(&"ferretdb".to_string()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the entry point contains "ferretdb" then the ingress route will not be generated.
@@ -270,8 +271,24 @@ pub async fn reconcile_postgres_ing_route_tcp( | |||
// Check for all existing IngressRouteTCPs in this namespace | |||
// Filter out any that are not for this DB or do not have the correct prefix | |||
for ingress_route_tcp in &ingress_route_tcps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was some conflict between ingress reconciliation in this file and in app services, so we added some logic for ignoring ingress with label component: appService
let app_1_pod = pod_list.items[0].clone(); | ||
let app_1_container = app_1_pod.spec.unwrap().containers[0].clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Order of the apps changed after introducing a new app (ferretdb)
Routing Configuration Enhancements (types.rs):
entry_points
andingress_type
to theRouting
structentry_points
= websecure), (ingress_type
= http)Ingress Route TCP Implementation (ingress.rs):
generate_ingress_tcp
function.reconcile_ingress_tcp
functionapply_ingress_route_tcp
asynchronous function for applying TCP ingress routes.App Service Resource Management (manager.rs):
AppServiceResources
struct to include ingress_tcp_routes, entry_points, and entry_points_tcp.generate_resource
function to fetch entry points from routing configuration.reconcile_app_services
function to incorporate desired entry points in the ingress reconciliation process.