apiVersion: apps/v1
kind: Deployment
metadata:
  name: gitlab
  namespace: gitlab
  labels:
    app: gitlab
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gitlab
  template:
    metadata:
      labels:
        app: gitlab
    spec:
      containers:
      - name: gitlab
        image: gitlab/gitlab-ce:13.8.8-ce.0
        ports:
        - containerPort: 32567
        # - containerPort: 443
        # - containerPort: 22
        volumeMounts:
        - name: data
          mountPath: /var/opt/gitlab 
        - name: log
          mountPath: /var/log/gitlab
        - name: config
          mountPath: /etc/gitlab
        - name: backup
          mountPath: /var/opt/gitlab/backups
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: gitlab-data
        - name: log
          persistentVolumeClaim:
            claimName: gitlab-log
        - name: config
          persistentVolumeClaim:
            claimName: gitlab-config
        - name: backup
          persistentVolumeClaim:
            claimName: gitlab-backup 