Skip to content

Commit

Permalink
website app /healthz endpoints used for kubernetes health check (#717)
Browse files Browse the repository at this point in the history
* website app /healthz endpoints used for kubernetes health check

* Add startup and liveness probe
  • Loading branch information
shifucun authored Dec 11, 2020
1 parent 3e2041b commit c889d42
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 14 additions & 1 deletion deployment/website.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,23 @@ spec:
args: []
ports:
- containerPort: 8080
startupProbe:
httpGet:
path: /healthz
port: 8080
failureThreshold: 30
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: 8000
failureThreshold: 1
periodSeconds: 10
readinessProbe:
httpGet:
path: /about
path: /healthz
port: 8080
periodSeconds: 10
volumeMounts:
- name: website-robot-key
mountPath: /var/secrets/google
Expand Down
5 changes: 5 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ def search():
return flask.render_template('search.html')


@app.route('/healthz')
def healthz():
return "very healthy"


@app.route('/search_dc')
def search_dc():
"""Add DC API powered search for non-place searches temporarily"""
Expand Down

0 comments on commit c889d42

Please sign in to comment.