Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
chore: Define the deployment resource and add readiness/liveness probe
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoulliard committed Dec 17, 2019
1 parent c83bc47 commit 5b8d0c6
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions config/k8s/generator-application.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
---
apiVersion: v1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: spring-boot-generator
name: spring-boot-generator
spec:
replicas: 1
selector:
app: spring-boot-generator
strategy:
rollingParams:
timeoutSeconds: 3600
type: Rolling
matchLabels:
app: spring-boot-generator
template:
metadata:
labels:
Expand All @@ -37,15 +33,27 @@ spec:
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 10
periodSeconds: 20
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 20
volumeMounts:
- name: config-volume
mountPath: /etc/config
securityContext:
privileged: false
volumes:
- name: config-volume
configMap:
name: generator-configmap
name: spring-boot-generator
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 5b8d0c6

Please sign in to comment.