summaryrefslogtreecommitdiff
path: root/templates/default/kubernetes/sfive-proxy-deploy.yml.j2
blob: 62ed9fe75fb8b2b1c5d5805f7c8b2f34a2a85161 (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
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: {{ namespace }}
  name: sfive-proxy-{{ worker.name }}
  labels:
    app: sfive
    type: proxy
    worker: {{ worker.name }}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sfive
      type: proxy
      worker: {{ worker.name }}
  strategy:
    type: Recreate
  revisionHistoryLimit: 5
  template:
    metadata:
      labels:
        app: sfive
        type: proxy
        worker: {{ worker.name }}
    spec:
      nodeName: {{ worker.name }}
      securityContext:
        runAsUser: 998
        fsGroup: 998
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      containers:
      - name: proxy
        image: spreadspace/sfive:{{ desc.globals.deployment.parameter.sfive_image_version }}
        imagePullPolicy: Always
        args:
        - s5proxy
        - -config
        - /srv/config/proxy.json
        volumeMounts:
        - name: home
          mountPath: /srv
        - name: proxy-config
          mountPath: /srv/config
      - name: hub
        image: spreadspace/sfive:{{ desc.globals.deployment.parameter.sfive_image_version }}
        imagePullPolicy: Always
        args:
        - sfive-hub
        - -db
        - /srv/data/db.bolt
        - -start-pipe-server=false
        - -start-web-server=false
        - -start-pipegram-server
        - -pipegram
        - /srv/hub.sock
        volumeMounts:
        - name: home
          mountPath: /srv
        - name: hub-data
          mountPath: /srv/data
      volumes:
      - name: home
        emptyDir:
          medium: Memory
      - name: proxy-config
        configMap:
          name: sfive-proxy-{{ worker.name }}
      - name: hub-data
        hostPath:
          type: DirectoryOrCreate
          path: /var/lib/sfive/{{ desc.globals.name }}