@@ -50,12 +50,26 @@ pub struct CreateDeploymentRequest {
5050 pub registry_auth : Option < RegistryAuth > ,
5151}
5252
53- #[ derive( Debug , Serialize , Deserialize , Validate , Default , ToSchema ) ]
53+ #[ derive( Debug , Serialize , Deserialize , Validate , ToSchema ) ]
5454pub struct ResourceRequirements {
55- /// CPU request/limit (e.g., "100m", "0.5")
56- pub cpu : Option < String > ,
57- /// Memory request/limit (e.g., "128Mi", "1Gi")
58- pub memory : Option < String > ,
55+ /// CPU limit (e.g., "500m", "1")
56+ pub cpu_limit : Option < String > ,
57+ /// Memory limit (e.g., "512Mi", "1Gi")
58+ pub memory_limit : Option < String > ,
59+ /// CPU request (e.g., "100m", "0.1")
60+ pub cpu_request : Option < String > ,
61+ /// Memory request (e.g., "128Mi", "256Mi")
62+ pub memory_request : Option < String > ,
63+ }
64+ impl Default for ResourceRequirements {
65+ fn default ( ) -> Self {
66+ Self {
67+ cpu_limit : Some ( "500m" . to_string ( ) ) ,
68+ memory_limit : Some ( "512Mi" . to_string ( ) ) ,
69+ cpu_request : Some ( "100m" . to_string ( ) ) ,
70+ memory_request : Some ( "128Mi" . to_string ( ) ) ,
71+ }
72+ }
5973}
6074
6175#[ derive( Debug , Serialize , Deserialize , Validate , ToSchema ) ]
0 commit comments