diff --git a/connector.py b/connector.py index 30593de..b5be16d 100644 --- a/connector.py +++ b/connector.py @@ -31,6 +31,13 @@ class Clients(db.Model): _tablename__ = 'clients' id = db.Column(db.Integer, primary_key=True) userip = db.Column(db.String(12)) +@app.route("/alive") +def alive(): + return "alive" + +@app.route("/ready") +def ready(): + return "ready" @app.route("/") def hello(): diff --git a/playgroud/templates/deployment.yaml b/playgroud/templates/deployment.yaml index 3363ecd..3093a40 100644 --- a/playgroud/templates/deployment.yaml +++ b/playgroud/templates/deployment.yaml @@ -51,11 +51,11 @@ spec: protocol: TCP livenessProbe: httpGet: - path: / + path: /alive port: http readinessProbe: httpGet: - path: / + path: /ready port: http resources: {{- toYaml .Values.resources | nindent 12 }}