-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathvalkey.yml.j2
91 lines (90 loc) · 1.94 KB
/
valkey.yml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: valkey
{% if managed_platform %}
labels:
app-code: "{{ appcode }}"
service-phase: "{{ servicephase }}"
cost-center: "{{ costcenter }}"
{% endif %}
spec:
selector:
matchLabels:
component: valkey
template:
metadata:
labels:
component: valkey
{% if managed_platform %}
paas.redhat.com/appcode: {{ appcode }}
{% endif %}
spec:
containers:
- name: valkey
image: valkey/valkey:8
args:
- "/etc/redislike/redis.conf"
ports:
- containerPort: 6379
volumeMounts:
- mountPath: /data
name: valkey-pv
- mountPath: /etc/redislike
name: redis-like-config
resources:
# requests and limits have to be the same to have Guaranteed QoS
requests:
memory: "128Mi"
cpu: "10m"
limits:
memory: "256Mi"
cpu: "50m"
volumes:
- name: valkey-pv
persistentVolumeClaim:
claimName: valkey-pvc
- name: redis-like-config
configMap: {name: redis-like-config}
replicas: 1
strategy:
type: Recreate
---
apiVersion: v1
kind: Service
metadata:
name: valkey
{% if managed_platform %}
labels:
paas.redhat.com/appcode: {{ appcode }}
{% endif %}
spec:
ports:
- name: "6379"
port: 6379
targetPort: 6379
selector:
component: valkey
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: valkey-pvc
{% if managed_platform %}
labels:
paas.redhat.com/appcode: {{ appcode }}
annotations:
kubernetes.io/reclaimPolicy: Delete
{% endif %}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
{% if managed_platform %}
storageClassName: aws-ebs
{% endif %}