72 lines
1.3 KiB
YAML
72 lines
1.3 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: api-cache
|
|
namespace: egommerce
|
|
labels:
|
|
app: api-cache
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: api-cache
|
|
ports:
|
|
- port: 6379
|
|
nodePort: 31300
|
|
# ---
|
|
# apiVersion: v1
|
|
# kind: Service
|
|
# metadata:
|
|
# name: api-cache-metrics
|
|
# namespace: egommerce
|
|
# labels:
|
|
# app: api-cache
|
|
# spec:
|
|
# type: NodePort
|
|
# selector:
|
|
# app: api-cache
|
|
# ports:
|
|
# - port: 9121
|
|
# nodePort: 31301
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: api-cache
|
|
namespace: egommerce
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: api-cache
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: api-cache
|
|
spec:
|
|
containers:
|
|
- name: api-cache
|
|
image: git.ego.freeddns.org/egommerce/api-cache:dev
|
|
imagePullPolicy: Always
|
|
command: [
|
|
"redis-server"
|
|
]
|
|
args: [
|
|
"/etc/redis.conf"
|
|
]
|
|
env:
|
|
- name: APP_NAME
|
|
value: api-cache
|
|
- name: REDIS_PASSWORD
|
|
value: "12345678"
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: 512M
|
|
ports:
|
|
- containerPort: 6379
|
|
- name: api-cache-metrics
|
|
image: oliver006/redis_exporter:latest
|
|
args:
|
|
- --redis.addr=redis://api-cache:6379
|
|
ports:
|
|
- containerPort: 9121 |