Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | {{- /* |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame^] | 2 | |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | # Copyright 2019-present Open Networking Foundation |
| 4 | # |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame^] | 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only |
| 7 | |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 8 | */ -}} |
| 9 | |
| 10 | {{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.service_account" }} |
| 11 | --- |
| 12 | apiVersion: apps/v1 |
| 13 | kind: StatefulSet |
| 14 | metadata: |
| 15 | name: accelleran-cbrs-redis |
| 16 | labels: |
| 17 | {{ tuple "accelleran-cbrs-redis" . | include "accelleran-cbrs-common.metadata_labels" | indent 4 }} |
| 18 | spec: |
| 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 |