File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
rust/operator-binary/src/backend Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,8 @@ impl SecretVolumeSelector {
179179 scope : & scope:: SecretScope ,
180180 ) -> Result < Vec < Address > , ScopeAddressesError > {
181181 use scope_addresses_error:: * ;
182- let cluster_domain = & pod_info. kubernetes_cluster_domain ;
182+ // Turn FQDNs into bare domain names by removing the trailing dot
183+ let cluster_domain = pod_info. kubernetes_cluster_domain . trim_end_matches ( "." ) ;
183184 let namespace = & self . namespace ;
184185 Ok ( match scope {
185186 scope:: SecretScope :: Node => {
@@ -208,7 +209,13 @@ impl SecretVolumeSelector {
208209 . listener_addresses
209210 . get ( name)
210211 . context ( NoListenerAddressesSnafu { listener : name } ) ?
211- . to_vec ( ) ,
212+ . iter ( )
213+ . map ( |addr| match addr {
214+ // Turn FQDNs into bare domain names by removing the trailing dot
215+ Address :: Dns ( dns) => Address :: Dns ( dns. trim_end_matches ( "." ) . to_string ( ) ) ,
216+ _ => addr. clone ( ) ,
217+ } )
218+ . collect ( ) ,
212219 } )
213220 }
214221
You can’t perform that action at this time.
0 commit comments