blob: baae4a664bf7176f5d65caec83b12a3792001207 [file] [log] [blame]
# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
#
# SPDX-License-Identifier: Apache-2.0
{{- if .Values.global.store.consensus.enabled }}
apiVersion: atomix.io/v2beta1
kind: Store
metadata:
name: {{ template "global.store.consensus.name" . }}
namespace: {{ .Release.Namespace }}
spec:
protocol:
apiVersion: storage.atomix.io/v2beta2
kind: MultiRaftProtocol
spec:
replicas: {{ .Values.global.store.consensus.replicas }}
groups: {{ .Values.global.store.consensus.partitions }}
{{- with .Values.global.store.consensus.raft }}
raft:
{{- toYaml . | nindent 8 }}
{{- end }}
image: {{ template "global.store.consensus.imagename" . }}
imagePullPolicy: {{ .Values.global.store.consensus.image.pullPolicy }}
{{- with .Values.global.store.consensus.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.global.store.consensus.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.global.store.consensus.persistence.storageClass }}
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
storageClassName: {{ .Values.global.store.consensus.persistence.storageClass | quote }}
resources:
requests:
storage: {{ .Values.global.store.consensus.persistence.storageSize }}
{{- end }}
{{- end }}