@@ -34,7 +34,8 @@ use crate::{
3434} ;
3535
3636use super :: {
37- controller:: CERAMIC_ONE_SWARM_PORT , debug_mode_security_context,
37+ controller:: { CERAMIC_ONE_FLIGHT_SQL_PORT , CERAMIC_ONE_SWARM_PORT } ,
38+ debug_mode_security_context,
3839 storage:: PersistentStorageConfig ,
3940} ;
4041
@@ -124,6 +125,12 @@ pub fn service_spec() -> ServiceSpec {
124125 protocol: Some ( "TCP" . to_owned( ) ) ,
125126 ..Default :: default ( )
126127 } ,
128+ ServicePort {
129+ port: CERAMIC_ONE_FLIGHT_SQL_PORT ,
130+ name: Some ( "flight" . to_owned( ) ) ,
131+ protocol: Some ( "TCP" . to_owned( ) ) ,
132+ ..Default :: default ( )
133+ } ,
127134 ServicePort {
128135 port: CERAMIC_ONE_SWARM_PORT ,
129136 name: Some ( "swarm-tcp" . to_owned( ) ) ,
@@ -251,6 +258,13 @@ impl CeramicInfo {
251258 self . stateful_set, self . service
252259 )
253260 }
261+ /// Determine the Flight SQL address of a Ceramic peer
262+ pub fn flight_addr ( & self , ns : & str , peer : i32 ) -> String {
263+ format ! (
264+ "http://{}-{peer}.{}.{ns}.svc.cluster.local:{CERAMIC_ONE_FLIGHT_SQL_PORT}" ,
265+ self . stateful_set, self . service
266+ )
267+ }
254268}
255269
256270impl From < & CeramicInfo > for IpfsInfo {
0 commit comments