diff --git a/deployment/gitlab.yaml b/deployment/gitlab.yaml index 6c1ede5..b26c915 100644 --- a/deployment/gitlab.yaml +++ b/deployment/gitlab.yaml @@ -56,8 +56,9 @@ data: service_cpu_request = "200m" --- + apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: gitlab-runner namespace: gitlab-runner @@ -84,12 +85,39 @@ spec: limits: cpu: '100m' volumeMounts: - - name: config - mountPath: /etc/gitlab-runner/config.toml - readOnly: true - subPath: config.toml + - name: gitlab-runner-config + mountPath: /etc/gitlab-runner volumes: - - name: config - configMap: - name: gitlab-runner-config - restartPolicy: Always \ No newline at end of file + - name: gitlab-runner-config + persistentVolumeClaim: + name: gitlab-runner-pvc + restartPolicy: Always +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + namespace: gitlab-runner + name: gitlab-runner-pvc +spec: + accessModes: ["ReadWriteOnce"] + storageClassName: "gitlab-runner-storage" + resources: + requests: + storage: 10Mi +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + namespace: gitlab-runner + name: gitlab-runner-pv +spec: + capacity: + storage: 10Mi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /data/gitlab-runner + type: "" + storageClassName: "gitlab-runner-storage" + volumeMode: Filesystem \ No newline at end of file