summaryrefslogtreecommitdiff
path: root/contrib/k8s-emc/matomo-deploy.yml
blob: 29cbd87a724db783bbfbf8f3da48ac92ae80b10a (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
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: emc
  name: stats-matomo
  labels:
    app: matomo
    tier: stats
spec:
  replicas: 1
  selector:
    matchLabels:
      app: matomo
      tier: stats
  strategy:
    type: Recreate
  revisionHistoryLimit: 5
  template:
    metadata:
      labels:
        app: matomo
        tier: stats
    spec:
      nodeName: emc-stats
      securityContext:
        runAsUser: 998
        fsGroup: 998
      initContainers:
      - name: prepare-matomo-html
        image: busybox
        command: ['sh', '-c', 'chown 998:998 /srv/html && chmod 700 /srv/html']
        securityContext:
          runAsUser: 0
        volumeMounts:
        - name: matomo-html
          mountPath: /srv/html
      containers:
      - name: matomo
        image: spreadspace/matomo:2
        imagePullPolicy: Always
        volumeMounts:
        - name: matomo-html
          mountPath: /var/www/html
      volumes:
      - name: matomo-html
        hostPath:
          type: DirectoryOrCreate
          path: /srv/stats/matomo