Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for HealthChecks #430

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 73 additions & 1 deletion public-site/docs/radix-config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ One exception is when the `replicas` value is set to `0` (i.e. the component is
The previous `resources` block have been replaced by `triggers`.
:::

#### Azure Service bus
#### `azureServiceBus` trigger

Take a look here [github.com/equinor/radix-sample-keda](https://github.com/equinor/radix-sample-keda) for a sample implementation that runs on Radix.

Expand All @@ -511,6 +511,46 @@ Service Account: keda-operator
# We are hoping on improving this - https://github.com/kedacore/keda/issues/5630
```


### `healthChecks`

By default Radix configures a TCP Readiness probe that tells the platform your application is ready to accept traffic as soon as the port is opened.
However it is reccommended to to configure this yourself. A HTTP Probe could inform Radix that the application with all the required backend systems (like databases or caches) is ready for work. We also support Liveness and Startup Probes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
However it is reccommended to to configure this yourself. A HTTP Probe could inform Radix that the application with all the required backend systems (like databases or caches) is ready for work. We also support Liveness and Startup Probes.
However it is recommended to configure this yourself. A HTTP Probe could inform Radix that the application with all the required backend systems (like databases or caches) is ready for work. We also support Liveness and Startup Probes.


If any custom probes are configured, Radix will not include the default readiness probe and you must configure it yourself.

```yaml
spec:
components:
- name: backend
healthChecks:
startupProbe:
tcpSocket:
port: 8000
livenessProbe:
httpGet:
port: 8000
path: /healthz/live
readinessProbe:
successThreshold: 1
periodSeconds: 30
failureThreshold: 3
initialDelaySeconds: 10
timeoutSeconds: 5
httpGet:
port: 8000
path: /healthz/ready # Component is Ready when this endpoint returns a successful status code (2xx or 3xx)
```

All probes have all settings (except for successThreshold that is not available for liveness and startup probes). We support HTTP, TCP, Exec and GRPC probes.
`environmentConfig` can also override individual startup, liveness or readiness-probes (but will not merge probe specific config).

:::warning
Incorrectly configured probes can lead to premature restarts and will affect your uptime.

Read more about probes here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
:::

### `imageTagName`

```yaml
Expand Down Expand Up @@ -858,6 +898,38 @@ spec:

The `horizontalScaling` field of a component environment config adds automatic scaling of the component in the environment, or it combines or overrides a component `imageTagName` if it is defined.

#### `healthChecks`

Health check probes defined here will override probes defined on the component level.

```yaml
spec:
components:
- name: backend
healthChecks:
startupProbe:
tcpSocket:
port: 8000
livenessProbe:
tcpSocket:
port: 8000
readinessProbe:
httpGet:
port: 8000
path: /health/ready
environmentConfig:
- environment: prod
healthChecks:
livenessProbe:
httpGet:
port: 8000
path: /health/alive
```

In this example, the prod environment will have 3 probes, a startup probe (TCP port 8000), a liveness check (HTTP /health/ready) and a readiness probe (HTTP /health/ready)

Please see more information at [`healthChecks`](#healthchecks) for detailed information and warnings.

#### `imageTagName`

```yaml
Expand Down
Loading