gitlab.yaml 1.23 KB
Newer Older
Administrator's avatar
Administrator committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
apiVersion: v1
kind: Service
metadata:
  labels:
    app: gitlab
    tier: gitlab
  name: gitlab
spec:
  type: LoadBalancer
  ports:
  - name: "80"
    port: 80
    targetPort: 80
  - name: "22"
    port: 22
    targetPort: 22
  - name: "443"
    port: 443
    targetPort: 443
  selector:
    app: gitlab
    tier: gitlab

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  labels:
    app: gitlab
    tier: gitlab
  name: gitlab-claim4
spec:
  storageClassName: standard        
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Mi

---

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: gitlab
    tier: gitlab
  name: gitlab
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gitlab
      tier: gitlab
  template:  
    metadata:
      annotations:
      labels:
        app: gitlab
        tier: gitlab
    spec:
      containers:
        - image: gitlab/gitlab-ee:latest
          name: gitlab
          ports:
            - containerPort: 27017
          volumeMounts:
            - mountPath: /data/gitlab
              name: gitlab-claim4
      restartPolicy: Always
      volumes:
        - name: gitlab-claim4
          persistentVolumeClaim:
            claimName: gitlab-claim4