Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
whynowy committed Sep 17, 2024
1 parent 9bdd5d7 commit faa5df3
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
117 changes: 117 additions & 0 deletions docs/user-guide/reference/configuration/liveness-and-readiness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Liveness and Readiness

`Liveness` and `Readiness` probes have been pre-configured in the pods orchestrated in Numaflow, including the containers of `Vertex` and `MonoVertex` pods. For these probes, the probe handlers are not allowed to be customized, but the other configurations are.

- `initialDelaySeconds`
- `timeoutSeconds`
- `periodSeconds`
- `successThreshold`
- `failureThreshold`

Here is an example for `Pipeline` customization, similar configuration can be applied to containers including `udf`, `udsource`, `transformer`, `udsink` and `fb-udsink`.

```yaml
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
name: my-pipeline
spec:
vertices:
- name: my-source
containerTemplate: # For "numa" container
readinessProbe:
initialDelaySeconds: 30
periodSeconds: 60
livenessProbe:
initialDelaySeconds: 60
periodSeconds: 120
volumes:
- name: my-udsource-config
configMap:
name: udsource-config
source:
udsource:
container:
image: my-source:latest
volumeMounts:
- mountPath: /path/to/my-source-config
name: my-udsource-config
# For User-Defined source
livenessProbe:
initialDelaySeconds: 40
failureThreshold: 5
- name: my-udf
containerTemplate: # For "numa" container
readinessProbe:
initialDelaySeconds: 20
periodSeconds: 60
livenessProbe:
initialDelaySeconds: 180
periodSeconds: 60
timeoutSeconds: 50
volumes:
- name: my-udf-config
configMap:
name: udf-config
udf:
container:
image: my-function:latest
volumeMounts:
- mountPath: /path/to/my-function-config
name: my-udf-config
# For "udf"
livenessProbe:
initialDelaySeconds: 40
failureThreshold: 5
```
The customization for `numa` container is also available with a [Vertex Template](./pipeline-customization#vertices) defined in `spec.templates.vertex`, which is going to be applied to all the vertices of a pipeline.

A `MonoVertex` example is as below.

```yaml
apiVersion: numaflow.numaproj.io/v1alpha1
kind: MonoVertex
metadata:
name: simple-mono-vertex
spec:
containerTemplate: # For "numa" container
readinessProbe:
initialDelaySeconds: 20
periodSeconds: 60
livenessProbe:
initialDelaySeconds: 180
periodSeconds: 60
source:
udsource:
container:
image: quay.io/numaio/numaflow-java/source-simple-source:stable
# For User-Defined source
livenessProbe:
initialDelaySeconds: 40
failureThreshold: 5
timeoutSeconds: 40
transformer:
container:
image: quay.io/numaio/numaflow-rs/source-transformer-now:stable
# For transformer
livenessProbe:
initialDelaySeconds: 40
failureThreshold: 5
sink:
udsink:
container:
image: quay.io/numaio/numaflow-java/simple-sink:stable
# For User-Defined Sink
livenessProbe:
initialDelaySeconds: 40
failureThreshold: 5
fallback:
udsink:
container:
image: my-sink:latest
# # For Fallback Sink
livenessProbe:
initialDelaySeconds: 40
failureThreshold: 5
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ nav:
- user-guide/reference/configuration/labels-and-annotations.md
- user-guide/reference/configuration/init-containers.md
- user-guide/reference/configuration/sidecar-containers.md
- user-guide/reference/configuration/liveness-and-readiness.md
- user-guide/reference/configuration/pipeline-customization.md
- user-guide/reference/configuration/istio.md
- user-guide/reference/configuration/max-message-size.md
Expand Down

0 comments on commit faa5df3

Please sign in to comment.