In Astro Private Cloud (APC), you can create liveness and readiness probes to assess whether your Kubernetes Pods or network are healthy and can process requests.
Some components in APC include liveness and readiness probes by default, but all components support adding and configuring them. APC allows you to use the Kubernetes liveness and readiness probe definitions so you can monitor the state of your Pods.
Liveness probes can be useful in all cases. However, readiness probes might be most useful for the following scenarios:
healthy state because it’s waiting for some state to be achieved.You can use the following structure to define your probes in your values.yaml file. For example, you might want to adjust any default values by configuring the amount of time until a timeout.
You can add any definitions that are compatible with Kubernetes probes. However, because Kubernetes doesn’t allow having more than one handler of probes, you must be sure that you don’t define probes that use both exec and httpGet. For consistency, the examples shown in the Default Astronomer Helm probe configurations use httpGet, but you can use exec when appropriate.
You can retrieve the default probe definitions from the Kubernetes manifest. The following example shows how to retrieve the definitions for the APC API.
This command produces a large amount of YAML output describing your APC API configuration. Within this output is a section describing the livenessProbe, which looks like this:
You can copy and paste this output into your values.yaml file for your APC API configuration, then adjust the values you want to customize. Then apply a platform config change.
The liveness and readiness probes specified in Helm values are passed through the Helm template function, which allows you to reference other Helm values within the probes. Specifically, the livenessProbe and readinessProbe values are rendered to YAML, then passed through the Helm template function, which renders any Helm template syntax into the produced YAML.
For example, instead of hardcoding values for your probes to match values defined by other configurations in your values.yaml file, you can use the configuration variable itself.
The following example, using the alertmanager YAML configuration, shows how the path and ports are defined by Values.ports.http and Values.prefixURL elsewhere in the values.yaml file.
The following components have their default probe configuration defined in the Astronomer Helm chart.
If a component doesn’t have probes defined by default, you can see which components support custom probe configurations below.
The following can also be configured to include liveness and readiness probes:
The following can also be configured to include liveness and readiness probes:
The following can also be configured to include liveness and readiness probes:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
The following components don’t have probes configured by default:
You can also define liveness and readiness probes using the Astronomer Airflow chart.
This includes:
dagProcessorflowerpgbouncerpostgresqlschedulertriggererwebserverworkersThe following can also be configured to include liveness and readiness probes:
The following can also be configured to include liveness and readiness probes:
The following can also be configured to include liveness and readiness probes: