Allow for setting extraVolumeMounts for sidekiq pods
volume mounts can be configured for a service using this template helper https://gitlab.com/gitlab-org/charts/gitlab/-/blob/32a7f2c065913a969e6efd5f9ee049c0610744bb/charts/gitlab/templates/_helpers.tpl#L65-71
We set the following for sidekiq gitlab.com:
extraVolumeMounts: |
- name: sidekiq-shared
mountPath: /srv/gitlab/shared
readOnly: false
extraVolumes: |
- name: sidekiq-shared
emptyDir:
sizeLimit: 50G
The emptyDirs are necessary because some sidekiq workers write to the shared directory for temporary storage. This is not the case for all pods in sidekiq and for some queue groups we want to prevent writes to directories like:
/srv/gitlab/shared
/srv/gitlab/builds
What we probably want in addition to this are extraVolumes:
set at the pod:
level, something like:
pods:
- name: memory-bound
concurrency: 1
minReplicas: 1
maxReplicas: 16
nodeSelector:
type: memory-bound
queues: resource_boundary=memory
extraVolumeMounts: ...
resources:
requests:
cpu: 50m
memory: 650M
limits:
cpu: 2
memory: 16G
- name: elasticsearch
extraVolumeMounts: ...
concurrency: 2
minReplicas: 2
maxReplicas: 2
nodeSelector:
type: default
queues: feature_category=global_search&urgency=throttled
resources:
requests:
cpu: 50m
memory: 650M
limits:
cpu: 2
memory: 8G
Where we would probably only set the volume mounts here instead at the global level for sidekiq.