Draft: Allow deploying with StatefulSet instead of Deployment to facilitate fault tolerance
What does this MR do?
Allows to change the workload manager from Deployment to StatefulSet. StatefulSets pin volume mounts to a specific pod index in the set.
For example if we scale a StatefulSet to 3 instances we'll get the following pods:
gitlab-runner-manager-0
gitlab-runner-manager-1
gitlab-runner-manager-2
If we scale it down to 2 we'll get
gitlab-runner-manager-0
gitlab-runner-manager-1
If we scale back to 3 again, we'll get a new instance that will have the same volume mount as the previous instance.
The volume mount can be configured in the values.yaml:
workloadManager: StatefulSet
volumeMounts:
- name: store-path
mountPath: /tmp/store
The store then can be configured in the config.toml:
[runners.store.file]
path = "/tmp/store"
Why was this MR needed?
What's the best way to test this MR?
What are the relevant issue numbers?
Related to gitlab-org/gitlab-runner#36951
Edited by Georgi N. Georgiev