added k8s files and jenkinsfile

This commit is contained in:
tusuii
2026-03-10 22:39:47 +05:30
parent 74918d251f
commit 57a2968d74
22 changed files with 767 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis
namespace: database
spec:
serviceName: redis
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:7-alpine
command:
- redis-server
- --appendonly
- "yes"
ports:
- containerPort: 6379
volumeMounts:
- name: redis-data
mountPath: /data
livenessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 6
readinessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: redis-data
persistentVolumeClaim:
claimName: redis-pvc