42 lines
859 B
YAML
42 lines
859 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: memcached
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
component: cache
|
|
template:
|
|
metadata:
|
|
labels:
|
|
component: cache
|
|
spec:
|
|
containers:
|
|
- name: memcached
|
|
image: "memcached:1.6.32-alpine"
|
|
ports:
|
|
- containerPort: 11211
|
|
name: memcached
|
|
args:
|
|
- -m
|
|
- "{{ .memoryLimit }}"
|
|
- -c
|
|
- "1024"
|
|
- -p
|
|
- "11211"
|
|
resources:
|
|
requests:
|
|
memory: 64Mi
|
|
cpu: 100m
|
|
limits:
|
|
memory: 128Mi
|
|
cpu: 200m
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 11211
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: true |