feat: Allow configuring additional volumes, and volume mounts
The Gitlab auto deploy image currently supports to specify Persistent Volumes (Claims) for Kubernetes volumes only but
Kubernetes knows much more Volume types (see https://kubernetes.io/docs/concepts/storage/volumes/). This MR adds support to also cover these Volume types too therefore we added
a extraVolumes
, and extraVolumeMounts
option. These options are a common way to configure 'non-persistent' Volumes
e.g. the well known Bitnami Helm Chart collection takes use of them (see e.g. https://github.com/bitnami/charts/tree/master/bitnami/nginx#nginx-deployment-parameters). We call them 'non-persitent' Volumes because they differ
from Kubernetes Persistent Volumes that they not need us to create a Persistent Volume Claim. They also are a kind of
read-only volumes like ConfigMap, or Secret volumes therefore they can not be used to persist data from an App perspective.
E.g. also HostPath volumes are not persistent because written data is bound to a single Kubernetes Node.
In summary, we think that adding these option side by side with the existent persitentVolumes option covers all use cases best.
This MR addresses the following use cases:
- mount Secrets as files to Deployments, CronJobs, and Workers
- mount Configmaps as files to Deployments, CronJobs, and Workers
- mount existing/ external created Persistent Volumes Claims to Deployments, CronJobs, and Workers
- mount private PKI CA certificates with hostPath mounts to achieve trust with this private PKI
- and all other things you can achieve with Kubernetes Volume mounts
This MR also would close/ address !297 (closed), !296 (closed), and !292 (closed). This MR also addresses parts of !196 (closed).