Skip to content

Commit

Permalink
fix(cluster_k8s): Added scylla args to helm instead of patching clust…
Browse files Browse the repository at this point in the history
…er (#9521)

Replaced patching of the Scylla cluster with scyllaArgs
by directly adding them to the Helm chart values.
  • Loading branch information
grzywin authored Dec 10, 2024
1 parent d18df88 commit 77a13c0
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions sdcm/cluster_k8s/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,8 @@ def get_scylla_cluster_helm_values(self, cpu_limit, memory_limit, pool_name: str
if self.params.get('print_kernel_callstack'):
sysctls += ["kernel.perf_event_paranoid=0", ]

scylla_args = self.params.get('append_scylla_args')

return HelmValues({
'nameOverride': '',
'fullnameOverride': cluster_name,
Expand Down Expand Up @@ -980,6 +982,7 @@ def get_scylla_cluster_helm_values(self, cpu_limit, memory_limit, pool_name: str
'create': False
},
'datacenter': self.region_name,
'scyllaArgs': scylla_args,
'dnsDomains': dns_domains,
'exposeOptions': expose_options,
'racks': [
Expand Down Expand Up @@ -1299,16 +1302,6 @@ def deploy_scylla_cluster(self, node_pool_name: str, namespace: str = SCYLLA_NAM
DEPLOY_SCYLLA_CLUSTER_DELAY)
self.start_scylla_cluster_events_thread(namespace=namespace)

# TODO: define 'scyllaArgs' option as part of the Scylla helm chart when following
# operator bug gets fixed: https://github.com/scylladb/scylla-operator/issues/989
if self.params.get('append_scylla_args'):
data = {"spec": {"scyllaArgs": self.params.get('append_scylla_args')}}
self.kubectl(
f"patch scyllaclusters {cluster_name} --type merge "
f"-p '{json.dumps(data)}'",
namespace=namespace,
)

@cached_property
def _affinity_modifiers_for_monitoring_resources(self):
node_pool = self.pools.get(self.MONITORING_POOL_NAME)
Expand Down

0 comments on commit 77a13c0

Please sign in to comment.