File tree Expand file tree Collapse file tree
crates/stackable-operator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,13 @@ All notable changes to this project will be documented in this file.
88
99- Add support for specifying a ` clientAuthenticationMethod ` for OIDC ([ #1178 ] ).
1010 This was originally done in [ #1158 ] and had been reverted in [ #1170 ] .
11+ - Add generic database connection mechanism ([ #1163 ] )
1112
13+ ### Changed
14+
15+ - BREAKING: Change signature of ` ContainerBuilder::add_env_vars ` from ` Vec<EnvVar> ` to ` IntoIterator<Item = EnvVar> ` ([ #1163 ] )
16+
17+ [ #1163 ] : https://github.com/stackabletech/operator-rs/pull/1163
1218[ #1178 ] : https://github.com/stackabletech/operator-rs/pull/1178
1319
1420## [ 0.108.0] - 2026-03-10
Original file line number Diff line number Diff line change 1- use std:: { borrow :: Borrow , fmt} ;
1+ use std:: fmt;
22
33use indexmap:: IndexMap ;
44use k8s_openapi:: api:: core:: v1:: {
@@ -177,12 +177,9 @@ impl ContainerBuilder {
177177
178178 pub fn add_env_vars < I > ( & mut self , env_vars : I ) -> & mut Self
179179 where
180- I : IntoIterator ,
181- I :: Item : std:: borrow:: Borrow < EnvVar > ,
180+ I : IntoIterator < Item = EnvVar > ,
182181 {
183- self . env
184- . get_or_insert_with ( Vec :: new)
185- . extend ( env_vars. into_iter ( ) . map ( |e| e. borrow ( ) . clone ( ) ) ) ;
182+ self . env . get_or_insert_with ( Vec :: new) . extend ( env_vars) ;
186183 self
187184 }
188185
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ impl GitSyncResources {
197197 one_time,
198198 container_log_config,
199199 ) ] )
200- . add_env_vars ( env_vars)
200+ . add_env_vars ( env_vars. iter ( ) . cloned ( ) )
201201 . add_volume_mounts ( volume_mounts. to_vec ( ) )
202202 . context ( AddVolumeMountSnafu ) ?
203203 . resources (
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ impl GitSyncResources {
241241 one_time,
242242 container_log_config,
243243 ) ] )
244- . add_env_vars ( env_vars)
244+ . add_env_vars ( env_vars. iter ( ) . cloned ( ) )
245245 . add_volume_mounts ( volume_mounts. to_vec ( ) )
246246 . context ( AddVolumeMountSnafu ) ?
247247 . resources (
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl CeleryDatabaseConnectionDetails {
6868 }
6969
7070 pub fn add_to_container ( & self , cb : & mut ContainerBuilder ) {
71- cb. add_env_vars ( self . env_vars ( ) ) ;
71+ cb. add_env_vars ( self . env_vars ( ) . cloned ( ) ) ;
7272 }
7373}
7474
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ pub struct JDBCDatabaseConnectionDetails {
5757impl JDBCDatabaseConnectionDetails {
5858 pub fn add_to_container ( & self , cb : & mut ContainerBuilder ) {
5959 let env_vars = self . username_env . iter ( ) . chain ( self . password_env . iter ( ) ) ;
60- cb. add_env_vars ( env_vars) ;
60+ cb. add_env_vars ( env_vars. cloned ( ) ) ;
6161 }
6262}
6363
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl SQLAlchemyDatabaseConnectionDetails {
6868 }
6969
7070 pub fn add_to_container ( & self , cb : & mut ContainerBuilder ) {
71- cb. add_env_vars ( self . env_vars ( ) ) ;
71+ cb. add_env_vars ( self . env_vars ( ) . cloned ( ) ) ;
7272 }
7373}
7474
You can’t perform that action at this time.
0 commit comments