|
42 | 42 | "/deploy/starrocks.com_starrocksclusters.yaml" |
43 | 43 | ) |
44 | 44 |
|
| 45 | +# How the operator's own MySQL connection to FE negotiates TLS (--fe-ssl-mode). |
| 46 | +# REQUIRED wherever the lakehouse FE has a keystore, so the operator can never |
| 47 | +# fall back to plaintext; PREFERRED where it has none. The operator rejects |
| 48 | +# VERIFY_CA and VERIFY_IDENTITY at startup because it never verifies the FE |
| 49 | +# certificate. |
| 50 | +FE_SSL_MODES = frozenset({"DISABLED", "PREFERRED", "REQUIRED"}) |
| 51 | + |
45 | 52 |
|
46 | 53 | def _fetch_starrocks_crd() -> list[dict[str, Any]]: |
47 | 54 | """Fetch the StarRocksCluster CRD manifest for the pinned chart version. |
@@ -91,6 +98,13 @@ def setup_starrocks( |
91 | 98 | starrocks_config = Config("starrocks") |
92 | 99 | if not starrocks_config.get_bool("enable_operator"): |
93 | 100 | return |
| 101 | + fe_ssl_mode = starrocks_config.require("operator_fe_ssl_mode") |
| 102 | + if fe_ssl_mode not in FE_SSL_MODES: |
| 103 | + msg = ( |
| 104 | + f"starrocks:operator_fe_ssl_mode must be one of {sorted(FE_SSL_MODES)}," |
| 105 | + f" got {fe_ssl_mode!r}" |
| 106 | + ) |
| 107 | + raise ValueError(msg) |
94 | 108 |
|
95 | 109 | starrocks_namespace = "starrocks" |
96 | 110 | cluster_stack.require_output("namespaces").apply( |
@@ -198,6 +212,7 @@ def setup_starrocks( |
198 | 212 | "enabled": True, |
199 | 213 | "imagePullPolicy": "IfNotPresent", |
200 | 214 | "replicaCount": 1, |
| 215 | + "feSslMode": fe_ssl_mode, |
201 | 216 | # The operator's controller-runtime cache is cluster-wide by |
202 | 217 | # default, so its memory tracks total pods in the cluster |
203 | 218 | # rather than anything about StarRocks. data-production |
|
0 commit comments