From b74da20d4d22a1a3a6907d6326ac74693f78a3bd Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Wed, 8 Jul 2020 15:19:02 -0300 Subject: [PATCH] Improve questions form for health check --- charts/keepalived/v2.2.0/questions.yaml | 39 ++++++++++++++++++------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/charts/keepalived/v2.2.0/questions.yaml b/charts/keepalived/v2.2.0/questions.yaml index fc1df3e..10d19b3 100644 --- a/charts/keepalived/v2.2.0/questions.yaml +++ b/charts/keepalived/v2.2.0/questions.yaml @@ -52,28 +52,47 @@ questions: - "Generic HTTP" - "Generic TCP" - "Other" + required: true group: Health Check + +# Nginx Ingress - variable: keepalived.check_script show_if: "haManagedService=Nginx Ingress" - default: "wget http://localhost/healthz" - description: "Service Healthcheck Script (runs inside the Keepalived container)" - label: Check Script + default: "wget -q http://localhost/healthz -O -" + description: "Default Nginx Ingress healthcheck." + label: Nginx Ingress Check Script type: string - group: Health Check + group: Hidden required: true - variable: keepalived.check_script - show_if: "haManagedService=Other" + show_if: "haManagedService=Generic HTTPS" default: "ss -ltn | grep :443" - description: "Service Healthcheck Script (runs inside the Keepalived container)" - label: Check Script + description: "Uses SS to check if port 443 is open in localhost." + label: Generic HTTPS Check Script type: string - group: Health Check + group: Hidden + required: true +- variable: keepalived.check_script + show_if: "haManagedService=Generic HTTP" + default: "ss -ltn | grep :80" + description: "Uses SS to check if port 80 is open in localhost." + label: Generic HTTP Check Script + type: string + group: Hidden required: true - variable: keepalived.check_port show_if: "haManagedService=Generic TCP" default: "80" - description: "Generic TCP Port" - label: Check Port + description: "Specify a generic TCP Port to be checked with SS." + label: TCP Check Port type: int group: Health Check required: true +- variable: keepalived.check_script + show_if: "haManagedService=Other" + default: "" + description: "Custom healthcheck script (runs in the keepalived container)" + label: Custom Check Script + type: string + group: Health Check + required: true