deployment.yaml 1.44 KB
Newer Older
1 2 3
apiVersion: apps/v1
kind: Deployment
metadata:
4
  name: combined-load-agent
5 6 7 8
  namespace: prod
spec:
  selector:
    matchLabels:
9
      app: combined-load-agent
10
  replicas: 2
11 12 13
  template:
    metadata:
      labels:
14
        app: combined-load-agent
15 16
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
17 18
    spec:
      containers:
19
      - name: combined-load-agent
20 21 22 23
        image: ${CONTAINER_REGISTRY}:${CI_COMMIT_SHA}
        args:
          - run
          - --url-file
24
          - /etc/chromedp-load-agent/all-urls.txt
25
          - --concurrency
26
          - "2"
27
          - --headers="Authorization=Bearer $(GRAFANA_BEARER_TOKEN)"
28 29
          - --window-width=1280
          - --window-height=1024
30
        imagePullPolicy: IfNotPresent
31 32 33 34 35 36
        env:
        - name: GRAFANA_BEARER_TOKEN
          valueFrom:
            secretKeyRef:
              name: grafana-load-agent
              key: bearer_token
37 38
        resources:
          limits:
39
            cpu: 0.75
40
            memory: 2Gi
41
          requests:
42
            cpu: 0.5
43 44 45 46
            memory: 1Gi
        volumeMounts:
        - mountPath: /dev/shm
          name: dev-shm
47 48
        - mountPath: /tmp
          name: dev-shm
49
        - mountPath: /etc/chromedp-load-agent
50
          name: combined-load-agent
51 52
          readOnly: true
      volumes:
53
      - name: combined-load-agent
54 55 56 57 58
        configMap:
          name: chrome-load-agent
      - name: dev-shm
        emptyDir:
          medium: Memory