wmedvede opened a new issue, #3471:
URL: https://github.com/apache/incubator-kie-tools/issues/3471
To provide better resilience during cluster node maintenance (e.g. kubectl
drain node) we want to enrich the SonataFlow operator with the ability to
automatically generate PodDisruptionBudgets for Workflows and the Data Index
service.
This will be implemented by extending the `SonataFlow` and
`SonataFlowPlatform` CRDs respectivelly.
**Solution for the SonataFlow workflows:**
Given a workflow `my-workflow`, by adding a configuration like below, the
SonataFlow operator will be signaled to automatically generate a
`PodDiscruptionBudget` targeting the workflow's `Deployment`.
```
apiVersion: sonataflow.org/v1alpha08
kind: SonataFlow
metadata:
name: my-workflow
annotations:
sonataflow.org/name: My Workflow
sonataflow.org/version: 1.0.0
sonataflow.org/profile: gitops
spec:
podTemplate:
replicas: 3
# SonataFlow CRD extension to define the podDisruptionBudget
configuration
podDisruptionBudget:
minAvailable: 2
# maxUnavailable: 1 (mutually exclusive field with minAvailable)
container:
image: quay.io/my-user/my-workflow:1.0.0
flow:
start: PrintStartMessage
# etc
```
The `podDisruptionBudget` confiuration will be the base for the
automatically generated `PodDisruptionBudget`.
```
podDisruptionBudget:
minAvailable: 2 # mutually exclusive fields, supporting the
same type as the Kubernetes PodDisruptionBudget spec.
maxUnavailable: 1
```
For the example above, the operator will generate a `PodDiscruptionBudget`
like the following:
```
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: my-workflow
namespace: test
ownerReferences:
- apiVersion: sonataflow.org/v1alpha08
blockOwnerDeletion: true
controller: true
kind: SonataFlow
name: my-workflow
uid: b2be3719-c527-40e1-917b-ac5a8fa2268a
spec:
minAvailable: 2
selector:
matchLabels:
app: my-workflow
sonataflow.org/workflow-namespace: test
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]