2021-08-28 03:54:21 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: redis
|
|
|
|
labels:
|
2021-12-27 00:11:38 +00:00
|
|
|
app.kubernetes.io/component: redis
|
2021-08-28 03:54:21 +00:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2021-12-27 00:11:38 +00:00
|
|
|
app.kubernetes.io/component: redis
|
2021-08-28 03:54:21 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2021-12-27 00:11:38 +00:00
|
|
|
app.kubernetes.io/component: redis
|
2021-08-28 03:54:21 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: redis
|
|
|
|
image: redis
|
2021-08-29 05:15:00 +00:00
|
|
|
args: ["--appendonly", "yes", "--requirepass", "$(REDIS_PASSWORD)"]
|
2021-08-28 03:54:21 +00:00
|
|
|
env:
|
|
|
|
- name: REDIS_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: redis-credentials
|
|
|
|
key: password
|
|
|
|
ports:
|
|
|
|
- name: redis
|
|
|
|
containerPort: 6379
|
|
|
|
resources:
|
|
|
|
requests:
|
2021-12-26 06:58:38 +00:00
|
|
|
cpu: 250m
|
|
|
|
memory: 250Mi
|
2021-08-28 03:54:21 +00:00
|
|
|
limits:
|
2022-05-26 03:43:44 +00:00
|
|
|
cpu: 250m
|
2021-12-26 06:58:38 +00:00
|
|
|
memory: 250Mi
|
2021-08-28 03:54:21 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: redis
|
|
|
|
labels:
|
2023-02-05 03:11:39 +00:00
|
|
|
app.kubernetes.io/component: redis
|
2021-08-28 03:54:21 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
2023-02-05 03:11:39 +00:00
|
|
|
app.kubernetes.io/component: redis
|
2021-08-28 03:54:21 +00:00
|
|
|
ports:
|
|
|
|
- name: redis
|
|
|
|
port: 6379
|
|
|
|
targetPort: redis
|