blob: 9ab90afc00b50624fe35e9a17c1ba6626314b6fc [file] [log] [blame]
Woojoong Kim4feaddf2019-11-21 00:05:07 -08001{{- /*
2# Copyright 2019-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/ -}}
16
17{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.service_account" }}
18---
19apiVersion: apps/v1
20kind: StatefulSet
21metadata:
22 name: accelleran-cbrs-redis
23 labels:
24{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.metadata_labels" | indent 4 }}
25spec:
26 selector:
27 matchLabels:
28{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.metadata_labels" | indent 6 }}
29 serviceName: accelleran-cbrs-redis
30 template:
31 metadata:
32 labels:
33{{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.metadata_labels" | indent 8 }}
34 spec:
35 {{- if .Values.nodeSelectors.enabled }}
36 nodeSelector:
37 {{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
38 {{- end }}
39 serviceAccountName: accelleran-cbrs-redis
40 containers:
41 - name: redis
42 image: {{ .Values.images.tags.redis }}
43 imagePullPolicy: {{ .Values.images.pullPolicy }}
44 command: ["sh", "-c"]
45 args:
46 - /usr/local/bin/redis-server /etc/redis.conf
47 {{- if .Values.resources.enabled }}
48 resources:
49{{ toYaml .Values.resources.accelleranCBRSCommon | indent 10 }}
50 {{- end }}
51 volumeMounts:
52 - mountPath: /data
53 name: redis-data-volume
54 volumes:
55 - name: redis-data-volume
56 hostPath:
57 path: /tmp/redis-storage
58 type: DirectoryOrCreate