Compare commits
1 Commits
432c54b58e
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c826047dae |
Vendored
+3
-1
@@ -167,9 +167,11 @@ spec:
|
|||||||
kubectl -n ${APP_NS} rollout status deploy/sayit-helpdesk-session-redis --timeout=120s
|
kubectl -n ${APP_NS} rollout status deploy/sayit-helpdesk-session-redis --timeout=120s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
kubectl -n ${APP_NS} patch deploy ${DEPLOY} --type=strategic -p '{"spec":{"strategy":{"type":"RollingUpdate","rollingUpdate":{"maxUnavailable":0,"maxSurge":1}},"template":{"spec":{"containers":[{"name":"'${DEPLOY}'","startupProbe":{"httpGet":{"path":"/health.do","port":8080,"scheme":"HTTP"},"periodSeconds":5,"timeoutSeconds":2,"failureThreshold":36},"readinessProbe":{"httpGet":{"path":"/health.do","port":8080,"scheme":"HTTP"},"initialDelaySeconds":10,"periodSeconds":5,"timeoutSeconds":2,"failureThreshold":3},"livenessProbe":{"httpGet":{"path":"/health.do","port":8080,"scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"timeoutSeconds":1,"failureThreshold":3}}]}}}}'
|
||||||
|
|
||||||
if [ "${TARGET_ENV}" = "dev" ]; then
|
if [ "${TARGET_ENV}" = "dev" ]; then
|
||||||
kubectl -n ${APP_NS} patch deploy ${DEPLOY} --type=strategic -p '{"spec":{"template":{"spec":{"containers":[{"name":"'${DEPLOY}'","env":[{"name":"SPRING_PROFILES_ACTIVE","value":"redis-session"}],"volumeMounts":[{"name":"heapdumps","mountPath":"/heapdumps"}]}],"volumes":[{"name":"heapdumps","nfs":{"server":"192.168.0.120","path":"/volume2/NFS/helpdesk-dev/heapdumps"}}]}}}}'
|
kubectl -n ${APP_NS} patch deploy ${DEPLOY} --type=strategic -p '{"spec":{"template":{"spec":{"containers":[{"name":"'${DEPLOY}'","env":[{"name":"SPRING_PROFILES_ACTIVE","value":"redis-session"}],"volumeMounts":[{"name":"heapdumps","mountPath":"/heapdumps"}]}],"volumes":[{"name":"heapdumps","nfs":{"server":"192.168.0.120","path":"/volume2/NFS/helpdesk-dev/heapdumps"}}]}}}}'
|
||||||
elif [ "${TARGET_ENV}" = "prod" ]; then
|
elif [ "${TARGET_ENV}" = "stage" ] || [ "${TARGET_ENV}" = "prod" ]; then
|
||||||
kubectl -n ${APP_NS} patch deploy ${DEPLOY} --type=strategic -p '{"spec":{"template":{"spec":{"containers":[{"name":"'${DEPLOY}'","env":[{"name":"SPRING_PROFILES_ACTIVE","value":"redis-session"}]}]}}}}'
|
kubectl -n ${APP_NS} patch deploy ${DEPLOY} --type=strategic -p '{"spec":{"template":{"spec":{"containers":[{"name":"'${DEPLOY}'","env":[{"name":"SPRING_PROFILES_ACTIVE","value":"redis-session"}]}]}}}}'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sayit-helpdesk-session-redis
|
||||||
|
namespace: sayit-helpdesk-stage
|
||||||
|
labels:
|
||||||
|
app: sayit-helpdesk-session-redis
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sayit-helpdesk-session-redis
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sayit-helpdesk-session-redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: redis:7.2-alpine
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
args:
|
||||||
|
- redis-server
|
||||||
|
- --save
|
||||||
|
- ""
|
||||||
|
- --appendonly
|
||||||
|
- "no"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: redis
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
failureThreshold: 3
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: redis
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 2
|
||||||
|
failureThreshold: 3
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 256Mi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sayit-helpdesk-session-redis
|
||||||
|
namespace: sayit-helpdesk-stage
|
||||||
|
labels:
|
||||||
|
app: sayit-helpdesk-session-redis
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: sayit-helpdesk-session-redis
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
@@ -147,7 +147,7 @@ ldap.username =uid=admin,ou=system
|
|||||||
ldap.password =secret
|
ldap.password =secret
|
||||||
|
|
||||||
# Spring Session Redis
|
# Spring Session Redis
|
||||||
Session.Redis.Enabled=false
|
Session.Redis.Enabled=true
|
||||||
Session.Redis.Host=sayit-helpdesk-session-redis
|
Session.Redis.Host=sayit-helpdesk-session-redis
|
||||||
Session.Redis.Port=6379
|
Session.Redis.Port=6379
|
||||||
Session.Redis.Database=0
|
Session.Redis.Database=0
|
||||||
|
|||||||
Reference in New Issue
Block a user