52 lines
1.0 KiB
YAML
52 lines
1.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: karrot-redis
|
|
namespace: karrot
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
component: redis
|
|
template:
|
|
metadata:
|
|
labels:
|
|
component: redis
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 999
|
|
runAsGroup: 999
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: redis
|
|
image: redis:7-alpine
|
|
args: ["--save", ""]
|
|
ports:
|
|
- containerPort: 6379
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 128Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 32Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: [ALL]
|
|
readOnlyRootFilesystem: false
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: karrot-redis
|
|
namespace: karrot
|
|
spec:
|
|
selector:
|
|
component: redis
|
|
ports:
|
|
- port: 6379
|
|
targetPort: 6379
|