Skip to content

Commit

Permalink
Configurable Probe initial delay in seconds (trustification#134)
Browse files Browse the repository at this point in the history
Signed-off-by: desmax74 <[email protected]>
  • Loading branch information
desmax74 authored Dec 4, 2024
1 parent 9627b1f commit 3396a93
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 23 deletions.
1 change: 1 addition & 0 deletions roles/tpa_single_node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions roles/tpa_single_node/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions roles/tpa_single_node/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3396a93

Please sign in to comment.