我正在尝试使用k8ssandra将cassandra迁移到AKS。我也希望在目标中保留源DB的cassandra.yaml配置,比如增加超时参数(以处理客户端请求)。我在k8ssandra的values.yaml文件中看到configmap占位符。保留源配置会有帮助吗?关于如何使用它的详细指南很受欢迎:)
发布于 2022-03-20 19:51:27
在此ConfigMap中添加了对通过按下指定Casssandra吐露的支持,并在K8ssandra 1.4.0中提供了这种支持。
新的图表属性名为cassandraYamlConfigMap。下面是该属性的文档所述的内容:
# -- Specifies the name of a ConfigMap that contains a custom cassandra.yaml. The
# ConfigMap should have a key named cassandra.yaml. The values will be merged with the
# base configuration. The following properties should NOT be specified in the ConfigMap:
# * cluster_name
# * seed_provider
# * authenticator
# * authorizer
# * commitlog_directory
# * data_file_directories
# * saved_caches_directory
# * hints_directory
# * endpoint_snitch下面是一个示例ConfigMap:
apiVersion: v1
kind: ConfigMap
metadata:
name: cassandra-config
data:
cassandra.yaml: |-
auto_snapshot: false
memtable_flush_writers: 1
commitlog_segment_size_in_mb: 2
concurrent_compactors: 1
compaction_throughput_mb_per_sec: 0
sstable_preemptive_open_interval_in_mb: 0
key_cache_size_in_mb: 0
prepared_statements_cache_size_mb: 1
slow_query_log_timeout_in_ms: 0
counter_cache_size_in_mb: 0
concurrent_reads: 2
concurrent_writes: 2
concurrent_counter_writes: 2
read_request_timeout_in_ms: 90000
range_request_timeout_in_ms: 90000
write_request_timeout_in_ms: 90000
truncate_request_timeout_in_ms: 90000
request_timeout_in_ms: 90000这是怎么回事。cassandra.yaml、jvm-服务器选项等是在设置cassandraYamlConfigMap时正常生成的。在server-config-init init容器生成信任之后,名为apply-custom-config的新init容器将使用ConfigMap中的cassandra.yaml和server-config-init生成的cassandra.yaml的yq进行合并。ConfigMap优先。
确保注意不应该指定的属性。不对ConfigMap执行验证检查。
注意,如果要配置节点间加密,则需要使用cassandraYamlConfigMap属性。有关详细说明,请参阅此帖子。
最后,我要指出,在cassandra.yaml操作符中配置K8ssandra的支持得到了改进。运算符不允许您指定自定义ConfigMap,但所有cassandra.yaml属性都可以在K8ssandraCluster CRD中使用。有关示例,请参见这里。
https://stackoverflow.com/questions/71478512
复制相似问题