From 77a13c00bdc1af26eec80aeadff4f980b1b8c560 Mon Sep 17 00:00:00 2001 From: Kamil Grzywinski <34071107+grzywin@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:59:11 +0100 Subject: [PATCH] fix(cluster_k8s): Added scylla args to helm instead of patching cluster (#9521) Replaced patching of the Scylla cluster with scyllaArgs by directly adding them to the Helm chart values. --- sdcm/cluster_k8s/__init__.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sdcm/cluster_k8s/__init__.py b/sdcm/cluster_k8s/__init__.py index 5b3e6ebfe5..1351be903f 100644 --- a/sdcm/cluster_k8s/__init__.py +++ b/sdcm/cluster_k8s/__init__.py @@ -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, @@ -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': [ @@ -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)