LightRAG/deploy/kubeblocks-databases/templates/elasticsearch-cluster.yaml
2025-05-19 18:11:47 +08:00

31 lines
1.2 KiB
YAML

{{- if .Values.elasticsearch.enabled }}
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: {{ .Values.elasticsearch.name }}
namespace: {{ .Values.global.namespace }}
spec:
terminationPolicy: {{ .Values.global.terminationPolicy }}
# Elasticsearch example provided doesn't specify clusterDef or topology at the spec level
# It's often defined by the componentDef within componentSpecs for KubeBlocks' ES
componentSpecs:
- name: mdit # Component name from your example, can be made configurable if needed
componentDef: {{ .Values.elasticsearch.componentDef }}
serviceVersion: "{{ .Values.elasticsearch.serviceVersion }}"
replicas: {{ .Values.elasticsearch.replicas }}
configs: # Hardcoding single-node config as per your example and simplicity request
- name: es-cm
variables:
mode: "single-node"
resources:
{{- toYaml .Values.elasticsearch.resources | nindent 8 }}
volumeClaimTemplates:
- name: data
spec:
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.elasticsearch.storage }}
{{- end }}