From a6a669e6dc3c79c61cb71a301d5007e8755fa51a Mon Sep 17 00:00:00 2001 From: desmax74 Date: Wed, 4 Dec 2024 13:50:13 +0100 Subject: [PATCH] Configurable Probe initial delay in seconds Signed-off-by: desmax74 --- roles/tpa_single_node/README.md | 1 + roles/tpa_single_node/meta/argument_specs.yml | 5 +++++ .../templates/manifests/bombastic/api/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/bombastic/indexer/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/bombastic/walker/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/collector/osv/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/collectorist/api/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/guac/graphql/Deployment.yaml.j2 | 2 +- .../templates/manifests/spog/api/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/spog/ui/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/v11y/api/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/v11y/indexer/Deployment.yaml.j2 | 4 ++-- .../templates/manifests/vexination/api/Deployment.yaml.j2 | 4 ++-- .../manifests/vexination/indexer/Deployment.yaml.j2 | 4 ++-- roles/tpa_single_node/vars/main.yml | 3 +++ 15 files changed, 32 insertions(+), 23 deletions(-) diff --git a/roles/tpa_single_node/README.md b/roles/tpa_single_node/README.md index cef1ea1..bc90763 100644 --- a/roles/tpa_single_node/README.md +++ b/roles/tpa_single_node/README.md @@ -82,6 +82,7 @@ Deploy the [RHTPA](https://docs.redhat.com/en/documentation/red_hat_trusted_prof | tpa_single_node_dataset_job_suspended | Dataset job suspended flag | bool | `True` | | tpa_single_node_vexination_walker_suspended | Vexination walker job suspended flag | bool | `True` | | tpa_single_node_v11y_walker_suspended | V11y walker job suspended flag | bool | `False` | +| tpa_single_node_probe_initial_delay_seconds | Initial prob delay in seconds | int | `30` | ## Example Playbook diff --git a/roles/tpa_single_node/meta/argument_specs.yml b/roles/tpa_single_node/meta/argument_specs.yml index c58c00f..a222687 100644 --- a/roles/tpa_single_node/meta/argument_specs.yml +++ b/roles/tpa_single_node/meta/argument_specs.yml @@ -349,3 +349,8 @@ argument_specs: type: "bool" version_added: "1.2.0" default: false + tpa_single_node_probe_initial_delay_seconds: + description: "Initial prob delay in seconds" + type: "int" + version_added: "1.2.1" + default: 30 diff --git a/roles/tpa_single_node/templates/manifests/bombastic/api/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/bombastic/api/Deployment.yaml.j2 index 9dacaaf..855fc2f 100644 --- a/roles/tpa_single_node/templates/manifests/bombastic/api/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/bombastic/api/Deployment.yaml.j2 @@ -130,12 +130,12 @@ spec: mountPath: /etc/config/auth.yaml subPath: auth.yaml livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/bombastic/indexer/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/bombastic/indexer/Deployment.yaml.j2 index 502b2f8..cb6da2b 100644 --- a/roles/tpa_single_node/templates/manifests/bombastic/indexer/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/bombastic/indexer/Deployment.yaml.j2 @@ -43,12 +43,12 @@ spec: image: "{{ tpa_single_node_trustification_image }}" imagePullPolicy: IfNotPresent livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/bombastic/walker/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/bombastic/walker/Deployment.yaml.j2 index 29a19f2..36c2a80 100644 --- a/roles/tpa_single_node/templates/manifests/bombastic/walker/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/bombastic/walker/Deployment.yaml.j2 @@ -79,12 +79,12 @@ spec: httpGet: path: /health/live port: 9010 - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} readinessProbe: httpGet: path: /health/ready port: 9010 - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} startupProbe: httpGet: path: /health/startup diff --git a/roles/tpa_single_node/templates/manifests/collector/osv/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/collector/osv/Deployment.yaml.j2 index ee0c7cc..44c0af4 100644 --- a/roles/tpa_single_node/templates/manifests/collector/osv/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/collector/osv/Deployment.yaml.j2 @@ -111,12 +111,12 @@ spec: mountPath: /etc/trust-anchor readOnly: true livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/collectorist/api/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/collectorist/api/Deployment.yaml.j2 index 1954af2..7a2386c 100644 --- a/roles/tpa_single_node/templates/manifests/collectorist/api/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/collectorist/api/Deployment.yaml.j2 @@ -115,12 +115,12 @@ spec: mountPath: /etc/trust-anchor readOnly: true livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/guac/graphql/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/guac/graphql/Deployment.yaml.j2 index 2aff9d7..5cc9e9f 100644 --- a/roles/tpa_single_node/templates/manifests/guac/graphql/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/guac/graphql/Deployment.yaml.j2 @@ -68,7 +68,7 @@ spec: port: 9010 scheme: HTTPS livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /healthz port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/spog/api/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/spog/api/Deployment.yaml.j2 index 48307c8..e091ed9 100644 --- a/roles/tpa_single_node/templates/manifests/spog/api/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/spog/api/Deployment.yaml.j2 @@ -114,12 +114,12 @@ spec: - name: user-preferences-db-path mountPath: /data/db/ livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/spog/ui/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/spog/ui/Deployment.yaml.j2 index df341e9..77442cd 100644 --- a/roles/tpa_single_node/templates/manifests/spog/ui/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/spog/ui/Deployment.yaml.j2 @@ -93,9 +93,9 @@ spec: httpGet: path: / port: {{ tpa_single_node_spog_ui_port }} - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} readinessProbe: httpGet: path: / port: {{ tpa_single_node_spog_ui_port }} - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} diff --git a/roles/tpa_single_node/templates/manifests/v11y/api/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/v11y/api/Deployment.yaml.j2 index 3084b7a..5594ef3 100644 --- a/roles/tpa_single_node/templates/manifests/v11y/api/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/v11y/api/Deployment.yaml.j2 @@ -81,12 +81,12 @@ spec: mountPath: /etc/trust-anchor readOnly: true livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/v11y/indexer/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/v11y/indexer/Deployment.yaml.j2 index 1c72e12..57782dd 100644 --- a/roles/tpa_single_node/templates/manifests/v11y/indexer/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/v11y/indexer/Deployment.yaml.j2 @@ -49,13 +49,13 @@ spec: imagePullPolicy: IfNotPresent livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/vexination/api/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/vexination/api/Deployment.yaml.j2 index 38dd023..351d1d0 100644 --- a/roles/tpa_single_node/templates/manifests/vexination/api/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/vexination/api/Deployment.yaml.j2 @@ -81,12 +81,12 @@ spec: - mountPath: /etc/oidc-secret name: oidc-secret livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/templates/manifests/vexination/indexer/Deployment.yaml.j2 b/roles/tpa_single_node/templates/manifests/vexination/indexer/Deployment.yaml.j2 index af881dc..c14ca1c 100644 --- a/roles/tpa_single_node/templates/manifests/vexination/indexer/Deployment.yaml.j2 +++ b/roles/tpa_single_node/templates/manifests/vexination/indexer/Deployment.yaml.j2 @@ -43,12 +43,12 @@ spec: image: "{{ tpa_single_node_trustification_image }}" imagePullPolicy: IfNotPresent livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/live port: 9010 readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ tpa_single_node_probe_initial_delay_seconds }} httpGet: path: /health/ready port: 9010 diff --git a/roles/tpa_single_node/vars/main.yml b/roles/tpa_single_node/vars/main.yml index eb0dd88..a8c8965 100644 --- a/roles/tpa_single_node/vars/main.yml +++ b/roles/tpa_single_node/vars/main.yml @@ -89,6 +89,9 @@ tpa_single_node_dataset_job_suspended: true tpa_single_node_vexination_walker_suspended: true tpa_single_node_v11y_walker_suspended: false +# Probes +tpa_single_node_probe_initial_delay_seconds: 30 + # defaults file for tpa_single_node tpa_single_node_system_packages: - podman