Merge pull request #58 from dannyk81/healthz_readme

Update readme and example with liveness and readiness probes
This commit is contained in:
Mikolaj Pawlikowski
2019-03-18 09:56:04 +00:00
committed by GitHub
2 changed files with 31 additions and 7 deletions
+15 -3
View File
@@ -126,12 +126,12 @@ spec:
selector:
matchLabels:
app: goldpinger
version: "1.0.0"
version: "1.5.0"
template:
metadata:
labels:
app: goldpinger
version: "1.0.0"
version: "1.5.0"
spec:
containers:
- name: goldpinger
@@ -150,10 +150,22 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: "docker.io/bloomberg/goldpinger:1.4.0"
image: "docker.io/bloomberg/goldpinger:1.5.0"
ports:
- containerPort: 80
name: http
readinessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 20
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 20
periodSeconds: 5
---
apiVersion: v1
kind: Service
+16 -4
View File
@@ -5,19 +5,19 @@ metadata:
name: goldpinger
labels:
app: goldpinger
version: "1.1.0"
version: "1.5.0"
spec:
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app: goldpinger
version: "1.1.0"
version: "1.5.0"
template:
metadata:
labels:
app: goldpinger
version: "1.1.0"
version: "1.5.0"
spec:
# if you'd like to use a secret to inject a kubeconfig, you can do it like this
volumes:
@@ -48,10 +48,22 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: "docker.io/bloomberg/goldpinger:1.4.0"
image: "docker.io/bloomberg/goldpinger:1.5.0"
ports:
- containerPort: 80
name: http
readinessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 20
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 20
periodSeconds: 5
volumeMounts:
- mountPath: /.kube/
name: kubeconfig