You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "luoluoyuyu (via GitHub)" <gi...@apache.org> on 2023/07/19 09:20:25 UTC

[D] Adding Probes to Streampipes' Kubernetes Deployment (streampipes)

GitHub user luoluoyuyu created a discussion: Adding Probes to Streampipes' Kubernetes Deployment

### Purpose
Add probes to containers for health monitoring in Streampipes' Kubernetes deployment. Probes will enable Streampipes to automatically detect and handle container anomalies, improving application availability and stability.

### Programs
#### Add [Readiness Probe]( https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/):
The Readiness Probe is used to check if a container is ready to receive traffic. It ensures that Streampipes containers are ready to receive traffic. If a container is not ready, Kubernetes removes it from load balancing to avoid sending requests to unavailable containers.
```yml
          readinessProbe:
            httpGet:
              path: /#/login
              port: {{ .Values.streampipes.ui.port }}
            initialDelaySeconds: 60
            periodSeconds: 30
            failureThreshold: 30
```

#### Add [Liveness Probe]( https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/):
The Liveness Probe is used to monitor whether a container is running properly to periodically check the health of the container. If the probe fails, Kubernetes will automatically restart the container to try to restore its health.
```yml
          livenessProbe:
            httpGet:
              path: /#/login
              port: {{ .Values.streampipes.ui.port }}
            initialDelaySeconds: 60
            periodSeconds: 30
            failureThreshold: 30
```

#### Add [Startup Probe]( https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/):
Startup Probe is used to check the health state of a container after it has started to ensure that the container does not receive traffic until it is fully ready. Avoid receiving traffic before the application is fully launched.
```yml
          startupProbe:
            httpGet:
              path: /#/login
              port: {{ .Values.streampipes.ui.port }}
            initialDelaySeconds: 60
            periodSeconds: 30
            failureThreshold: 30
```

#### Add [Restart Policy](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy):
Use the "OnFailure" restart policy to trigger a restart only when a Streampipes container fails or terminates abnormally. In this way, Kubernetes will be able to intelligently respond to the state of containers and restart them only when necessary, improving application stability.
```yml
restartPolicy: OnFailure
```

GitHub link: https://github.com/apache/streampipes/discussions/1781

----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org


Re: [D] Adding Probes to Streampipes' Kubernetes Deployment (streampipes)

Posted by "luoluoyuyu (via GitHub)" <gi...@apache.org>.
GitHub user luoluoyuyu added a comment to the discussion: Adding Probes to Streampipes' Kubernetes Deployment

hi @bossenti 
 I submitted a pr for this discussion.

GitHub link: https://github.com/apache/streampipes/discussions/1781#discussioncomment-6519735

----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org


Re: [D] Adding Probes to Streampipes' Kubernetes Deployment (streampipes)

Posted by "luoluoyuyu (via GitHub)" <gi...@apache.org>.
GitHub user luoluoyuyu edited a comment on the discussion: Adding Probes to Streampipes' Kubernetes Deployment

hi @bossenti 
 I submitted a pr for this discussion(#1786).

GitHub link: https://github.com/apache/streampipes/discussions/1781#discussioncomment-6519735

----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org


Re: [D] Adding Probes to Streampipes' Kubernetes Deployment (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
GitHub user bossenti added a comment to the discussion: Adding Probes to Streampipes' Kubernetes Deployment

@luoluoyuyu thanks a lot for your detailed description! 
This sounds really reasonable 
Do you plan to add all probes to every container of StreamPipes?

GitHub link: https://github.com/apache/streampipes/discussions/1781#discussioncomment-6490776

----
This is an automatically sent email for dev@streampipes.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@streampipes.apache.org