Toolbox Backup claim name uses wrong PVC name
Summary
When deploying a Gitlab instance with the Operator and defining the persistent storage for the toolbox pod the name for the generated PVC and the name for the claim do not match which causes the toolbox pod not able to start.
Toolbox event log:
Warning FailedScheduling 43m default-scheduler 0/5 nodes are available: persistentvolumeclaim "gitlab-toolbox-tmp" not found. preemption: 0/5 nodes are available: 5 No preemption victims found for incoming pod..
Generated PVC: (sensitive/unnecessary information removed)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: toolbox
app.kubernetes.io/component: toolbox
app.kubernetes.io/instance: gitlab-toolbox
app.kubernetes.io/managed-by: gitlab-operator
app.kubernetes.io/name: gitlab
app.kubernetes.io/part-of: gitlab
chart: toolbox-7.8.0
heritage: Helm
release: gitlab
name: gitlab-toolbox-backup-tmp
namespace: gitlab-system
ownerReferences:
- apiVersion: apps.gitlab.com/v1beta1
blockOwnerDeletion: true
controller: true
kind: GitLab
name: gitlab
Steps to reproduce
- Deploy a new Gitlab CR instance with the backup configuration from below.
- See a PVC created with the wrong name.
- See the Toolbox pod not able to start because PVC could not be found.
Configuration used
apiVersion: apps.gitlab.com/v1beta1
kind: GitLab
metadata:
name: gitlab
spec:
chart:
version: 7.8.0
values:
gitlab:
toolbox:
backups:
cron:
enabled: true
failedJobsHistoryLimit: 1
schedule: '0 1 * * *'
successfulJobsHistoryLimit: 3
suspend: false
persistence:
enabled: true
storageClass: ceph-rbd-sc
size: 500Gi
persistence:
enabled: true
storageClass: ceph-rbd-sc
size: 500Gi
Versions
- Chart: 7.8.0
- Platform:
- Self-hosted: Kubernetes + Gitlab Operator
- Kubernetes:
- Server: v1.27.4+k3s1
Edited by Martin Treml