From 87bbdcdd55300553bebe57de8dc8be9eaf6034c0 Mon Sep 17 00:00:00 2001 From: Matthieu Lamalle Date: Thu, 2 Nov 2023 08:51:20 +0100 Subject: [PATCH] add probes --- .../resources/hydra-oidc-deployment.yaml | 28 +++++++++++++++++++ .../hydra-dispatcher-deployment.yaml | 28 +++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/components/hydra-oidc/resources/hydra-oidc-deployment.yaml b/components/hydra-oidc/resources/hydra-oidc-deployment.yaml index 75f6a1c..5ab20f4 100644 --- a/components/hydra-oidc/resources/hydra-oidc-deployment.yaml +++ b/components/hydra-oidc/resources/hydra-oidc-deployment.yaml @@ -21,6 +21,20 @@ spec: image: reg.cadoles.com/cadoles/hydra-oidc-base:0.0.1 imagePullPolicy: Always args: ["/usr/sbin/php-fpm81", "-F", "-e"] + readinessProbe: + exec: + command: + - sh + - -c + - test -f /etc/php81/php-fpm.d/www.conf + livenessProbe: + exec: + command: + - php + - bin/console + - -V + initialDelaySeconds: 10 + periodSeconds: 30 env: - name: PHP_FPM_LISTEN value: 127.0.0.1:9000 @@ -37,6 +51,20 @@ spec: imagePullPolicy: Always name: hydra-oidc-nginx args: ["/usr/sbin/nginx"] + readinessProbe: + httpGet: + path: /healthy + port: 80 + initialDelaySeconds: 5 + timeoutSeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /healthy + port: 80 + initialDelaySeconds: 15 + timeoutSeconds: 5 + periodSeconds: 15 envFrom: - configMapRef: name: hydra-oidc-env diff --git a/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml b/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml index 1605af3..81f4c0a 100644 --- a/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml +++ b/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml @@ -20,6 +20,20 @@ spec: - name: hydra-dispatcher-php-fpm image: reg.cadoles.com/cadoles/hydra-dispatcher-kube:0.0.1 args: ["/usr/sbin/php-fpm81", "-F", "-e"] + readinessProbe: + exec: + command: + - sh + - -c + - test -f /etc/php81/php-fpm.d/www.conf + livenessProbe: + exec: + command: + - php + - bin/console + - -V + initialDelaySeconds: 10 + periodSeconds: 30 env: - name: PHP_FPM_LISTEN value: 127.0.0.1:9000 @@ -39,6 +53,20 @@ spec: imagePullPolicy: Always name: hydra-dispatcher-nginx args: ["/usr/sbin/nginx"] + readinessProbe: + httpGet: + path: /oauth2/auth + port: 80 + initialDelaySeconds: 5 + timeoutSeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /oauth2/auth + port: 80 + initialDelaySeconds: 15 + timeoutSeconds: 5 + periodSeconds: 15 envFrom: - configMapRef: name: hydra-dispatcher-env