infra/k8s/snipeit/statefulset.yaml

48 lines
997 B
YAML
Raw Permalink Normal View History

2024-08-08 01:51:51 +00:00
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:v7.1.14
2024-08-08 01:51:51 +00:00
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