Skip to content

Commit 6dd74ad

Browse files
committed
chore: Remove hardcoded uid and gid
1 parent f2f46fb commit 6dd74ad

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

rust/operator-binary/src/controller.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ pub struct Ctx {
104104
pub const OPERATOR_NAME: &str = "trino.stackable.tech";
105105
pub const CONTROLLER_NAME: &str = "trinocluster";
106106
pub const FULL_CONTROLLER_NAME: &str = concatcp!(CONTROLLER_NAME, '.', OPERATOR_NAME);
107-
pub const TRINO_UID: i64 = 1000;
108107

109108
pub const STACKABLE_LOG_DIR: &str = "/stackable/log";
110109
pub const STACKABLE_LOG_CONFIG_DIR: &str = "/stackable/log_config";
@@ -1141,13 +1140,7 @@ fn build_rolegroup_statefulset(
11411140
)
11421141
.context(AddVolumeSnafu)?
11431142
.service_account_name(sa_name)
1144-
.security_context(
1145-
PodSecurityContextBuilder::new()
1146-
.run_as_user(TRINO_UID)
1147-
.run_as_group(0)
1148-
.fs_group(1000)
1149-
.build(),
1150-
);
1143+
.security_context(PodSecurityContextBuilder::new().fs_group(1000).build());
11511144

11521145
let mut pod_template = pod_builder.build_template();
11531146
pod_template.merge_from(role.config.pod_overrides.clone());

tests/templates/kuttl/opa-authorization/check-opa.py.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import argparse
33
import pytest
44
import trino
55

6-
from datetime import datetime
6+
from datetime import datetime, UTC
77
from trino.exceptions import TrinoUserError
88

99
import urllib3
@@ -502,7 +502,7 @@ class TestOpa:
502502
print("")
503503

504504
def log(user, query):
505-
timestamp = datetime.utcnow().isoformat(sep=" ", timespec="milliseconds")
505+
timestamp = datetime.now(UTC).isoformat(sep=" ", timespec="milliseconds")
506506
print(f"[{timestamp}] - {user:20s} -> {query}")
507507

508508
def run_query(connection, query):

0 commit comments

Comments
 (0)