Toolbox setting persistence storage class to default does not work.
Summary
In our docs for persistence configuration, it states
If .storageClass is specified as ‘-‘, then the PersistentVolume will be created using the default StorageClass as specified in the Kubernetes cluster.
However, trying to set that does not set a storage class and leaves the pvc hanging in pending.
https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/charts/gitlab/charts/toolbox/templates/_helpers.tpl?ref_type=heads#L22
Steps to reproduce
Set the value for storageClass: '-'
Configuration used
(Please provide a sanitized version of the configuration used wrapped in a code block (```yaml))
gitlab-runner:
runners:
privileged: true
global:
hosts:
domain: {redacted}
externalIP: {redacted}
kas:
enabled: true
minio:
replicas: 1
gitlab:
toolbox:
backups:
cron:
enabled: true
concurrencyPolicy: Replace
failedJobsHistoryLimit: 1
schedule: "10 * * * *"
successfulJobsHistoryLimit: 3
suspend: false
backoffLimit: 6
safeToEvict: false
restartPolicy: "OnFailure"
persistence:
enabled: true
accessMode: ReadWriteOnce
storageClass: '-'
size: 10Gi
Current behavior
➜ zendesk-tickets kubectl describe pvc -n gl gitlab-toolbox-backup-tmp
Name: gitlab-toolbox-backup-tmp
Namespace: gl
StorageClass:
Status: Pending
Volume:
Labels: app=toolbox
app.kubernetes.io/managed-by=Helm
chart=toolbox-7.10.3
heritage=Helm
release=gitlab
Annotations: meta.helm.sh/release-name: gitlab
meta.helm.sh/release-namespace: gl
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: gitlab-toolbox-backup-28633450-tghmq
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 13s (x3 over 30s) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
Expected behavior
The volume is able to bind to the default storage class.
➜ zendesk-tickets kubectl get storageclasses.storage.k8s.io
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
premium-rwo pd.csi.storage.gke.io Delete WaitForFirstConsumer true 34d
standard kubernetes.io/gce-pd Delete Immediate true 34d
standard-rwo (default) pd.csi.storage.gke.io Delete WaitForFirstConsumer true 34d
Versions
- Chart: (tagged version | branch | hash
git rev-parse HEAD
) - Platform:
- Cloud: GKE
- Kubernetes: (
kubectl version
)- Client:v1.29.2
- Server:v1.28.9-gke.1000000
- Helm: (
helm version
)- Client: version.BuildInfo{Version:"v3.14.2", GitCommit:"c309b6f0ff63856811846ce18f3bdc93d2b4d54b", GitTreeState:"clean", GoVersion:"go1.22.0"}
Relevant logs
(Please provide any relevate log snippets you have collected, using code blocks (```) to format)
Edited by Anthony Subia