File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ pub fn generate_chisel_flags(node: &ExitNode) -> Vec<String> {
178
178
/// Returns:
179
179
///
180
180
/// a `PodTemplateSpec` object.
181
- #[ instrument]
181
+ #[ instrument( skip ( source , exit_node ) ) ]
182
182
pub async fn create_pod_template (
183
183
source : & Service ,
184
184
exit_node : & ExitNode ,
@@ -254,7 +254,7 @@ pub async fn create_pod_template(
254
254
/// Returns:
255
255
///
256
256
/// a `Deployment` object.
257
- #[ instrument]
257
+ #[ instrument( skip ( source , exit_node ) ) ]
258
258
pub async fn create_owned_deployment (
259
259
source : & Service ,
260
260
exit_node : & ExitNode ,
Original file line number Diff line number Diff line change @@ -97,5 +97,15 @@ async fn main() -> Result<()> {
97
97
) ;
98
98
info ! ( "Starting up..." ) ;
99
99
100
+ // Set up a handler for graceful pod termination
101
+ tokio:: spawn ( async move {
102
+ tokio:: signal:: unix:: signal ( tokio:: signal:: unix:: SignalKind :: terminate ( ) )
103
+ . unwrap ( )
104
+ . recv ( )
105
+ . await ;
106
+ info ! ( "Received termination signal, shutting down..." ) ;
107
+ std:: process:: exit ( 0 ) ;
108
+ } ) ;
109
+
100
110
daemon:: run ( ) . await
101
111
}
You can’t perform that action at this time.
0 commit comments