Skip to content

Commit ecafcfd

Browse files
committed
Attach service account to history pods.
1 parent f27eb41 commit ecafcfd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rust/operator-binary/src/history_controller.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ pub async fn reconcile(shs: Arc<SparkHistoryServer>, ctx: Arc<Ctx>) -> Result<Ac
202202
&rgr,
203203
s3_log_dir.as_ref().unwrap(),
204204
&config.resources,
205+
&serviceaccount,
205206
)?;
206207
cluster_resources
207208
.add(client, &sts)
@@ -255,6 +256,7 @@ fn build_stateful_set(
255256
rolegroupref: &RoleGroupRef<SparkHistoryServer>,
256257
s3_log_dir: &S3LogDir,
257258
resources: &Resources<HistoryStorageConfig, NoRuntimeLimits>,
259+
serviceaccount: &ServiceAccount,
258260
) -> Result<StatefulSet, Error> {
259261
let container_name = "spark-history";
260262
let container = ContainerBuilder::new(container_name)
@@ -274,6 +276,7 @@ fn build_stateful_set(
274276
.build();
275277

276278
let template = PodBuilder::new()
279+
.service_account_name(serviceaccount.name_unchecked())
277280
.add_container(container)
278281
.image_pull_secrets_from_product_image(resolved_product_image)
279282
.add_volume(

0 commit comments

Comments
 (0)