@@ -46,6 +46,9 @@ use crate::{
4646 product_logging,
4747} ;
4848
49+ const GRPC : & str = "grpc" ;
50+ const HTTP : & str = "http" ;
51+
4952#[ derive( Snafu , Debug ) ]
5053#[ allow( clippy:: enum_variant_names) ]
5154pub enum Error {
@@ -111,8 +114,6 @@ pub enum Error {
111114 ServerJvmArgs { source : common:: Error , name : String } ,
112115}
113116
114- type Result < T , E = Error > = std:: result:: Result < T , E > ;
115-
116117// Assemble the configuration of the spark-connect server.
117118// This config map contains the following entries:
118119// - security.properties : with jvm dns cache ttls
@@ -261,8 +262,8 @@ pub fn build_deployment(
261262 "-c" . to_string( ) ,
262263 ] )
263264 . args ( args)
264- . add_container_port ( "grpc" , CONNECT_GRPC_PORT )
265- . add_container_port ( "http" , CONNECT_UI_PORT )
265+ . add_container_port ( GRPC , CONNECT_GRPC_PORT )
266+ . add_container_port ( HTTP , CONNECT_UI_PORT )
266267 . add_env_vars ( container_env)
267268 . add_volume_mount ( VOLUME_MOUNT_NAME_CONFIG , VOLUME_MOUNT_PATH_CONFIG )
268269 . context ( AddVolumeMountSnafu ) ?
@@ -402,12 +403,12 @@ pub fn build_service(
402403 cluster_ip : service_cluster_ip,
403404 ports : Some ( vec ! [
404405 ServicePort {
405- name: Some ( String :: from( "grpc" ) ) ,
406+ name: Some ( String :: from( GRPC ) ) ,
406407 port: CONNECT_GRPC_PORT ,
407408 ..ServicePort :: default ( )
408409 } ,
409410 ServicePort {
410- name: Some ( String :: from( "http" ) ) ,
411+ name: Some ( String :: from( HTTP ) ) ,
411412 port: CONNECT_UI_PORT ,
412413 ..ServicePort :: default ( )
413414 } ,
0 commit comments