varnish-kustom/resources/deployment.yaml

54 lines
1.2 KiB
YAML
Raw Normal View History

2025-02-12 10:09:13 +01:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: varnish
labels:
app: varnish
spec:
replicas: 1
selector:
matchLabels:
app: varnish
template:
metadata:
labels:
app: varnish
spec:
containers:
- name: varnish
image: reg.cadoles.com/dh/library/varnish:7.6.1-alpine
2025-02-12 10:09:13 +01:00
imagePullPolicy: IfNotPresent
2025-02-12 11:43:40 +01:00
env:
- name: VARNISH_HTTP_PORT
value: "8080"
envFrom:
- configMapRef:
name: varnish-env
2025-02-12 10:09:13 +01:00
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /etc/varnish/default.vcl
name: varnish-config
subPath: default.vcl
2025-02-12 11:43:40 +01:00
- mountPath: /var/lib/varnish/varnishd
name: varnish-lib
2025-02-12 10:09:13 +01:00
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
2025-02-12 11:43:40 +01:00
capabilities:
add: [ "IPC_LOCK" ]
2025-02-12 10:09:13 +01:00
volumes:
- name: varnish-config
configMap:
name: varnish-config
items:
- key: default.vcl
path: default.vcl
2025-02-12 11:43:40 +01:00
- name: varnish-lib
emptyDir:
sizeLimit: 1Gi
2025-02-12 10:09:13 +01:00
securityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true