Hello All,
I am trying to configure Gitlab Kubernetes executor to run pipelines in a k8s cluster. I went through the documentation and have configured the values.yaml file.
My pipelines use PVC Templates where a PVC is created for each build job by modifying the Pod Spec. This was very clear in the documentation. Thus I am able to run jobs accordingly.
[[runners.kubernetes.pod_spec]]
name = “ephemeral-pvc”
patch = ‘’’
containers:
- name: build
volumeMounts:
- name: builds
mountPath: /builds
- name: helper
volumeMounts:
- name: builds
mountPath: /builds
volumes:
- name: builds
ephemeral:
volumeClaimTemplate:
spec:
storageClassName:
accessModes: [ ReadWriteOnce ]
resources:
requests:
storage: 50Gi
‘’’
The problem I am facing is that I have a pipeline with differect PVC size requirements. Job 1: 50Gi, Job 2: 200Gi and Job 3: 400Gi.
Now ways I can think of doing this is:
- Creating multiple values.yaml files and thus resultant runner pods. But I do not know if this is an efficient way.
- Passing this value as variable from pipeline into the values.yaml. But this didn’t work when I tried, the runner didn’t register.
May be there is a simpler solution to this. I would appreciate If you could help me out with suggestions to run such custom jobs.
Many thanks!!