Skip to content

Commit 3c99f0d

Browse files
committed
use same clusterrole for history server, and add pvc permissions
1 parent b2765f8 commit 3c99f0d

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed

deploy/helm/spark-k8s-operator/templates/spark-clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ rules:
5252
- ""
5353
resources:
5454
- configmaps
55+
- persistentvolumeclaims
5556
- pods
5657
- secrets
5758
- serviceaccounts

deploy/manifests/spark-clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ rules:
88
- ""
99
resources:
1010
- configmaps
11+
- persistentvolumeclaims
1112
- pods
1213
- secrets
1314
- serviceaccounts

rust/crd/src/constants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ pub const HISTORY_CONFIG_FILE_NAME_FULL: &str = "/stackable/spark/conf/spark-def
4040
pub const LABEL_NAME_INSTANCE: &str = "app.kubernetes.io/instance";
4141

4242
pub const VOLUME_NAME_S3_CREDENTIALS: &str = "s3-credentials";
43+
pub const SPARK_CLUSTER_ROLE: &str = "spark-k8s-clusterrole";

rust/operator-binary/src/history_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ fn build_history_role_serviceaccount(
378378
role_ref: RoleRef {
379379
api_group: ClusterRole::GROUP.to_string(),
380380
kind: ClusterRole::KIND.to_string(),
381-
name: HISTORY_ROLE_NAME.to_string(),
381+
name: SPARK_CLUSTER_ROLE.to_string(),
382382
},
383383
subjects: Some(vec![Subject {
384384
api_group: Some(ServiceAccount::GROUP.to_string()),

rust/operator-binary/src/spark_k8s_controller.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ use std::collections::BTreeMap;
1818
use std::{sync::Arc, time::Duration};
1919
use strum::{EnumDiscriminants, IntoStaticStr};
2020

21-
const SPARK_CLUSTER_ROLE: &str = "spark-k8s-clusterrole";
22-
2321
pub struct Ctx {
2422
pub client: stackable_operator::client::Client,
2523
}

0 commit comments

Comments
 (0)