Skip to content

Commit

Permalink
fix(k8s): Always define AutomaticTLSCertificates with bool value in K8S
Browse files Browse the repository at this point in the history
Starting with the 'v1.11.0' version of the scylla-operator the TLS
feature gets enabled by default.
At first, we do not need it.
At second, it makes the scylla-manager operations fail [1].

So, disable it explicitly if we do not expect it to overwrite the
default setting.

[1] scylladb/scylla-manager#3679
  • Loading branch information
vponomaryov authored and fruch committed Jan 21, 2024
1 parent d311c6c commit 3758da0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sdcm/cluster_k8s/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,15 +751,15 @@ def deploy_scylla_operator(self, pool_name: str = None) -> None:
namespace=SCYLLA_OPERATOR_NAMESPACE,
values=values
))
if self.params.get('k8s_enable_tls') and ComparableScyllaOperatorVersion(
self.scylla_operator_chart_version.split("-")[0]) >= "1.8.0":
patch_cmd = ('patch deployment scylla-operator --type=json -p=\'[{"op": "add",'
'"path": "/spec/template/spec/containers/0/args/-", '
'"value": "--feature-gates=AutomaticTLSCertificates=true" }]\' ')
scylla_operator_version = self.scylla_operator_chart_version.split("-")[0]
enable_tls = 'true' if self.params.get('k8s_enable_tls') else 'false'
if ComparableScyllaOperatorVersion(scylla_operator_version) >= "1.8.0":
patch_cmd = (
'patch deployment scylla-operator --type=json -p=\'[{"op": "add",'
' "path": "/spec/template/spec/containers/0/args/-", '
f'"value": "--feature-gates=AutomaticTLSCertificates={enable_tls}" }}]\' ')
self.kubectl(patch_cmd, namespace=SCYLLA_OPERATOR_NAMESPACE)

if self.params.get('k8s_enable_tls') and ComparableScyllaOperatorVersion(
self.scylla_operator_chart_version.split("-")[0]) >= "1.9.0":
if enable_tls == 'true' and ComparableScyllaOperatorVersion(scylla_operator_version) >= "1.9.0":
# around 10 keys that need to be cached per cluster
crypto_key_buffer_size = self.params.get('k8s_tenants_num') * 10
for flag in (f"--crypto-key-buffer-size-min={crypto_key_buffer_size}",
Expand Down

0 comments on commit 3758da0

Please sign in to comment.