File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ All notable changes to this project will be documented in this file.
9
9
- Build against Kubernetes 1.23 ([ #330 ] ).
10
10
11
11
### Added
12
- - More builder functionality: ` SecurityContext ` objects and ` EnvVar ` s from field refs ([ #331 ] )
12
+ - More builder functionality ([ #331 ] )
13
+ - builder for ` SecurityContext ` objects
14
+ - add ` EnvVar ` s from field refs
15
+ - set ` serviceServiceAccountName ` in pod templates
13
16
14
17
[ #330 ] : https://github.com/stackabletech/operator-rs/pull/330
15
18
[ #331 ] : https://github.com/stackabletech/operator-rs/pull/331
Original file line number Diff line number Diff line change @@ -1095,13 +1095,19 @@ pub struct PodBuilder {
1095
1095
security_context : Option < PodSecurityContext > ,
1096
1096
tolerations : Option < Vec < Toleration > > ,
1097
1097
volumes : Option < Vec < Volume > > ,
1098
+ service_account_name : Option < String > ,
1098
1099
}
1099
1100
1100
1101
impl PodBuilder {
1101
1102
pub fn new ( ) -> PodBuilder {
1102
1103
PodBuilder :: default ( )
1103
1104
}
1104
1105
1106
+ pub fn service_account_name ( & mut self , value : impl Into < String > ) -> & mut Self {
1107
+ self . service_account_name = Some ( value. into ( ) ) ;
1108
+ self
1109
+ }
1110
+
1105
1111
pub fn host_network ( & mut self , host_network : bool ) -> & mut Self {
1106
1112
self . host_network = Some ( host_network) ;
1107
1113
self
@@ -1273,6 +1279,7 @@ impl PodBuilder {
1273
1279
// In practice, this just causes a bunch of unused environment variables that may conflict with other uses,
1274
1280
// such as https://github.com/stackabletech/spark-operator/pull/256.
1275
1281
enable_service_links : Some ( false ) ,
1282
+ service_account_name : self . service_account_name . clone ( ) ,
1276
1283
..PodSpec :: default ( )
1277
1284
}
1278
1285
}
You can’t perform that action at this time.
0 commit comments