blob: baae4a664bf7176f5d65caec83b12a3792001207 [file] [log] [blame]
Scott Baker69654392021-09-17 13:50:16 -07001# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
2#
Sean Condon160ec1d2022-02-08 12:58:25 +00003# SPDX-License-Identifier: Apache-2.0
Scott Baker69654392021-09-17 13:50:16 -07004
5{{- if .Values.global.store.consensus.enabled }}
6apiVersion: atomix.io/v2beta1
7kind: Store
8metadata:
9 name: {{ template "global.store.consensus.name" . }}
10 namespace: {{ .Release.Namespace }}
11spec:
12 protocol:
13 apiVersion: storage.atomix.io/v2beta2
14 kind: MultiRaftProtocol
15 spec:
16 replicas: {{ .Values.global.store.consensus.replicas }}
17 groups: {{ .Values.global.store.consensus.partitions }}
18 {{- with .Values.global.store.consensus.raft }}
19 raft:
20 {{- toYaml . | nindent 8 }}
21 {{- end }}
22 image: {{ template "global.store.consensus.imagename" . }}
23 imagePullPolicy: {{ .Values.global.store.consensus.image.pullPolicy }}
24 {{- with .Values.global.store.consensus.image.pullSecrets }}
25 imagePullSecrets:
26 {{- toYaml . | nindent 8 }}
27 {{- end }}
28 {{- with .Values.global.store.consensus.securityContext }}
29 securityContext:
30 {{- toYaml . | nindent 8 }}
31 {{- end }}
32 {{- if .Values.global.store.consensus.persistence.storageClass }}
33 volumeClaimTemplate:
34 spec:
35 accessModes:
36 - ReadWriteOnce
37 storageClassName: {{ .Values.global.store.consensus.persistence.storageClass | quote }}
38 resources:
39 requests:
40 storage: {{ .Values.global.store.consensus.persistence.storageSize }}
41 {{- end }}
42{{- end }}