blob: d871ecca2f230c38eb2287f1f92fe9fdfbdad14c [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{- /*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003# Copyright 2019-present Open Networking Foundation
4#
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07005# SPDX-License-Identifier: Apache-2.0
6# SPDX-License-Identifier: LicenseRef-ONF-Member-Only
7
Jeremy Ronquillo223db002020-06-05 10:28:22 -07008*/ -}}
9
10{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.service_account" }}
11---
12apiVersion: apps/v1
13kind: StatefulSet
14metadata:
15 name: accelleran-cbrs-redis
16 labels:
17{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.metadata_labels" | indent 4 }}
18spec:
19 selector:
20 matchLabels:
21{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.metadata_labels" | indent 6 }}
22 serviceName: accelleran-cbrs-redis
23 template:
24 metadata:
25 labels:
26{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.metadata_labels" | indent 8 }}
27 spec:
28 {{- if .Values.nodeSelectors.enabled }}
29 nodeSelector:
30 {{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
31 {{- end }}
32 serviceAccountName: accelleran-cbrs-redis
33 containers:
34 - name: redis
35 image: {{ .Values.images.tags.redis }}
36 imagePullPolicy: {{ .Values.images.pullPolicy }}
37 command: ["sh", "-c"]
38 args:
39 - /usr/local/bin/redis-server /etc/redis.conf
40 {{- if .Values.resources.enabled }}
41 resources:
42{{ toYaml .Values.resources.accelleranCBRSCommon | indent 10 }}
43 {{- end }}
44 volumeMounts:
45 - mountPath: /data
46 name: redis-data-volume
47 volumes:
48 - name: redis-data-volume
49 hostPath:
50 path: /tmp/redis-storage
51 type: DirectoryOrCreate