aboutsummaryrefslogtreecommitdiff
path: root/.kubernetes/deployment.yaml
blob: d84cb56919a54f6f8a94b034ff484d78a6cf7c33 (plain) (blame)
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
apiVersion: apps/v1
kind: Deployment
metadata:
  name: gitcov-deployment
  namespace: default
  labels:
    app: gitcov
spec:
  selector:
    matchLabels:
      app: gitcov
  template:
    metadata:
      labels:
        app: gitcov
    spec:
      containers:
      - name: gitcov-container
        image: kjhoerr/ao-coverage:latest
        resources:
          requests:
            cpu: 100m
            memory: 76Mi
          limits:
            cpu: 250m
            memory: 200Mi
        livenessProbe:
          httpGet:
            port: gitcov-http
            path: /v1/health-check
          initialDelaySeconds: 5
        readinessProbe:
          httpGet:
            port: gitcov-http
            path: /v1/health-check
          initialDelaySeconds: 5
          timeoutSeconds: 2
        ports:
          - name: gitcov-http
            containerPort: 80
            protocol: TCP
        env:
          - name: MONGO_DB
            valueFrom:
              secretKeyRef:
                name: cov-secret
                key: db_name
          - name: MONGO_URI
            valueFrom:
              secretKeyRef:
                name: cov-secret
                key: db_uri
          - name: TOKEN
            valueFrom:
              secretKeyRef:
                name: cov-secret
                key: cov_token
          - name: HOST_DIR
            valueFrom:
              configMapKeyRef:
                name: gitcov-configmap
                key: host_dir
          - name: TARGET_URL
            valueFrom:
              configMapKeyRef:
                name: gitcov-configmap
                key: target_url
        volumeMounts:
          - name: gitcov-repos
            mountPath: /data
        imagePullPolicy: IfNotPresent
      volumes:
        - name: gitcov-repos
          persistentVolumeClaim:
            claimName: gitcov-pvc