add readeness/liveness routes
This commit is contained in:
@@ -31,6 +31,13 @@ class Clients(db.Model):
|
|||||||
_tablename__ = 'clients'
|
_tablename__ = 'clients'
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
userip = db.Column(db.String(12))
|
userip = db.Column(db.String(12))
|
||||||
|
@app.route("/alive")
|
||||||
|
def alive():
|
||||||
|
return "alive"
|
||||||
|
|
||||||
|
@app.route("/ready")
|
||||||
|
def ready():
|
||||||
|
return "ready"
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello():
|
def hello():
|
||||||
|
|||||||
@@ -51,11 +51,11 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /alive
|
||||||
port: http
|
port: http
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /ready
|
||||||
port: http
|
port: http
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user