Files
k3s-homelab/apps/playmat/imgcache-deployment.yaml
T
2026-11-19 19:13:29 -07:00

79 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: imgcache
namespace: playmat
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: imgcache
template:
metadata:
labels:
app: imgcache
spec:
enableServiceLinks: false
securityContext:
seccompProfile:
type: RuntimeDefault
containers:
- name: imgcache
image: nginx:1.30.5-alpine
ports:
- name: http
containerPort: 8080
env:
- name: IMGCACHE_IMAGES_MAX_SIZE
value: 4g
- name: IMGCACHE_API_MAX_SIZE
value: 512m
- name: IMGCACHE_API_RATE
value: 10r/s
- name: IMGCACHE_API_BURST
value: "20"
- name: IMGCACHE_CARDS_UPSTREAM
value: https://cards.scryfall.io
- name: IMGCACHE_BACKS_UPSTREAM
value: https://backs.scryfall.io
- name: IMGCACHE_API_UPSTREAM
value: https://api.scryfall.com
- name: IMGCACHE_FALLBACK
value: "off"
- name: IMGCACHE_UPSTREAM_TLS_VERIFY
value: "on"
volumeMounts:
- name: imgcache-data
mountPath: /var/cache/nginx/scryfall
- name: config
mountPath: /etc/nginx/templates/default.conf.template
subPath: imgcache.conf.template
readinessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 30
periodSeconds: 30
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 300m
memory: 256Mi
volumes:
- name: imgcache-data
persistentVolumeClaim:
claimName: imgcache-data
- name: config
configMap:
name: imgcache-config