Skip to content

Commit 08f51ca

Browse files
committed
chore: Remove hardcoded uid and gid
1 parent 2406e44 commit 08f51ca

File tree

4 files changed

+1
-15
lines changed

4 files changed

+1
-15
lines changed

rust/operator-binary/src/controller.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ use crate::{
100100
pub const HIVE_CONTROLLER_NAME: &str = "hivecluster";
101101
pub const HIVE_FULL_CONTROLLER_NAME: &str = concatcp!(HIVE_CONTROLLER_NAME, '.', OPERATOR_NAME);
102102

103-
/// Used as runAsUser in the pod security context
104-
pub const HIVE_UID: i64 = 1000;
105103
const DOCKER_IMAGE_BASE_NAME: &str = "hive";
106104

107105
pub const MAX_HIVE_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity {
@@ -986,13 +984,7 @@ fn build_metastore_rolegroup_statefulset(
986984
.context(AddVolumeSnafu)?
987985
.affinity(&merged_config.affinity)
988986
.service_account_name(sa_name)
989-
.security_context(
990-
PodSecurityContextBuilder::new()
991-
.run_as_user(HIVE_UID)
992-
.run_as_group(0)
993-
.fs_group(1000)
994-
.build(),
995-
);
987+
.security_context(PodSecurityContextBuilder::new().fs_group(1000).build());
996988

997989
if let Some(ContainerLogConfig {
998990
choice:

tests/templates/kuttl/kerberos-hdfs/35-access-hdfs.yaml.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,5 @@ commands:
6565
storage: "1"
6666
securityContext:
6767
fsGroup: 1000
68-
runAsGroup: 1000
69-
runAsUser: 1000
7068
restartPolicy: OnFailure
7169
EOF

tests/templates/kuttl/kerberos-hdfs/70-install-access-hive.yaml.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ commands:
5555
storage: "1"
5656
securityContext:
5757
fsGroup: 1000
58-
runAsGroup: 1000
59-
runAsUser: 1000
6058
restartPolicy: OnFailure
6159
EOF
6260
---

tests/templates/kuttl/kerberos-s3/70-install-access-hive.yaml.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ commands:
5555
storage: "1"
5656
securityContext:
5757
fsGroup: 1000
58-
runAsGroup: 1000
59-
runAsUser: 1000
6058
restartPolicy: OnFailure
6159
EOF
6260
---

0 commit comments

Comments
 (0)