From 477ba69a7201e95609c8021c4af6820ad95da514 Mon Sep 17 00:00:00 2001 From: Danny Kulchinsky Date: Sun, 17 Mar 2019 20:54:41 -0400 Subject: [PATCH 1/2] Add livenessProbe and readinessProbe to README Signed-off-by: Danny Kulchinsky Signed-off-by: Danny Kulchinsky --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 589cf86..205373f 100644 --- a/README.md +++ b/README.md @@ -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 From d243f0fb596354c3c9e876bc2358c304007bd902 Mon Sep 17 00:00:00 2001 From: Danny Kulchinsky Date: Sun, 17 Mar 2019 20:58:33 -0400 Subject: [PATCH 2/2] update example Signed-off-by: Danny Kulchinsky Signed-off-by: Danny Kulchinsky --- extras/example-with-kubeconfig.yaml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/extras/example-with-kubeconfig.yaml b/extras/example-with-kubeconfig.yaml index 49812ab..8404f14 100644 --- a/extras/example-with-kubeconfig.yaml +++ b/extras/example-with-kubeconfig.yaml @@ -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