forked from vmwarecloudadvocacy/acme_fitness_demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
users-redis-total.yaml
68 lines (68 loc) · 1.55 KB
/
users-redis-total.yaml
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
apiVersion: v1
kind: Service
metadata:
name: users-redis
labels:
app: acmefit
service: users-redis
spec:
ports:
- port: 6379
name: redis-users
selector:
app: acmefit
service: users-redis
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: users-redis
labels:
app: acmefit
service: users-redis
spec:
selector:
matchLabels:
app: acmefit # has to match .spec.template.metadata.labels
service: users-redis
replicas: 1
template:
metadata:
labels:
app: acmefit # has to match .spec.selector.matchLabels
service: users-redis
spec:
containers:
- name: users-redis
image: bitnami/redis
imagePullPolicy: Always
resources:
requests:
cpu: "100m"
memory: "100Mi"
ports:
- name: redis
containerPort: 6379
protocol: "TCP"
env:
- name: REDIS_HOST
value: 'users-redis'
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: users-redis-pass
key: password
volumeMounts:
- mountPath: /var/lib/redis
name: users-redis-data
# - mountPath: /etc/redis
# name: redis-config
volumes:
- name: users-redis-data
emptyDir: {}
# - name: redis-config
# configMap:
# name: redis-config
# items:
# - key: redis-config
# path: redis.conf