infra/k8s/snipeit/statefulset.yaml
2024-08-07 18:51:51 -07:00

47 lines
996 B
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: snipe
spec:
selector:
matchLabels:
app: snipe
serviceName: snipe
replicas: 1
template:
metadata:
labels:
app: snipe
spec:
securityContext:
fsGroup: 33
fsGroupChangePolicy: "OnRootMismatch"
containers:
- name: snipe
image: snipe/snipe-it:latest
ports:
- containerPort: 80
name: web
volumeMounts:
- name: storage
mountPath: /var/lib/snipeit
- name: logs
mountPath: /var/www/html/storage/logs
envFrom:
- configMapRef:
name: snipe-config
- secretRef:
name: mysql
- secretRef:
name: snipe
volumes:
- name: logs
emptyDir: {}
volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 5Gi