Skip to content

Commit

Permalink
Added liveness probes to the trident-main and etcd containers
Browse files Browse the repository at this point in the history
Closes: #109
  • Loading branch information
clintonk committed May 30, 2018
1 parent d5768a1 commit ccc1f9c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
**Enhancements:**
- **Kubernetes:** Updated etcd to v3.2.19 and client-go to v7.0.0.
- **Kubernetes:** Added --previous switch to 'tridentctl logs' command.
- **Kubernetes:** Added liveness probes to the trident-main and etcd containers.

## v18.04.0

Expand Down
22 changes: 22 additions & 0 deletions cli/k8s_client/yaml_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ spec:
#- -k8s_api_server
#- __KUBERNETES_SERVER__:__KUBERNETES_PORT__
{DEBUG}
livenessProbe:
exec:
command:
- tridentctl
- -s
- 127.0.0.1:8000
- get
- backend
failureThreshold: 2
initialDelaySeconds: 120
periodSeconds: 120
timeoutSeconds: 90
- name: etcd
image: {ETCD_IMAGE}
command:
Expand All @@ -240,6 +252,16 @@ spec:
volumeMounts:
- name: etcd-vol
mountPath: /var/etcd/data
livenessProbe:
exec:
command:
- etcdctl
- -endpoint=http://127.0.0.1:8001/
- cluster-health
failureThreshold: 2
initialDelaySeconds: 15
periodSeconds: 15
timeoutSeconds: 10
volumes:
- name: etcd-vol
persistentVolumeClaim:
Expand Down
19 changes: 12 additions & 7 deletions kubernetes-yaml/trident-deployment.yaml.templ
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ spec:
#- __KUBERNETES_SERVER__:__KUBERNETES_PORT__
#- -debug
livenessProbe:
failureThreshold: 3
exec:
command:
- curl
- 127.0.0.1:8000/trident/v1/backend
initialDelaySeconds: 15
periodSeconds: 3
- tridentctl
- -s
- 127.0.0.1:8000
- get
- backend
failureThreshold: 2
initialDelaySeconds: 120
periodSeconds: 120
timeoutSeconds: 90
- name: etcd
image: quay.io/coreos/etcd:v3.1.5
command:
Expand All @@ -55,14 +59,15 @@ spec:
- name: etcd-vol
mountPath: /var/etcd/data
livenessProbe:
failureThreshold: 3
exec:
command:
- etcdctl
- -endpoint=http://127.0.0.1:8001/
- cluster-health
failureThreshold: 2
initialDelaySeconds: 15
timeoutSeconds: 3
periodSeconds: 15
timeoutSeconds: 10
volumes:
- name: etcd-vol
persistentVolumeClaim:
Expand Down

0 comments on commit ccc1f9c

Please sign in to comment.