cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

deployment.yaml (2114B)


      1 apiVersion: v1
      2 kind: PersistentVolumeClaim
      3 metadata:
      4   name: mjolnir-freifunk-persistent-storage
      5   namespace: matrix
      6 spec:
      7   accessModes:
      8     - ReadWriteMany
      9   resources:
     10     requests:
     11       storage: 512Mi
     12 ---
     13 apiVersion: apps/v1
     14 kind: Deployment
     15 metadata:
     16   name: mjolnir-freifunk
     17   namespace: matrix
     18 spec:
     19   replicas: 0
     20   selector:
     21     matchLabels:
     22       app: mjolnir-freifunk
     23   strategy:
     24     rollingUpdate:
     25       maxSurge: 25%
     26       maxUnavailable: 25%
     27     type: RollingUpdate
     28   template:
     29     metadata:
     30       labels:
     31         app: mjolnir-freifunk
     32     spec:
     33       containers:
     34         - image: gnuxie/draupnir:v2.2.0
     35           livenessProbe:
     36             failureThreshold: 3
     37             httpGet:
     38               path: /healthz
     39               port: 8080
     40             initialDelaySeconds: 30
     41             periodSeconds: 30
     42             successThreshold: 1
     43             timeoutSeconds: 1
     44           name: mjolnir-freifunk-container
     45           resources:
     46             requests:
     47               ephemeral-storage: 1024Mi
     48               cpu: 100m
     49               memory: 200Mi
     50             limits:
     51               ephemeral-storage: 2048Mi
     52               cpu: 2000m
     53               memory: 2000Mi
     54           readinessProbe:
     55             httpGet:
     56               path: /health
     57               port: 8080
     58             initialDelaySeconds: 30
     59             periodSeconds: 30
     60           securityContext:
     61             allowPrivilegeEscalation: false
     62             capabilities:
     63               drop:
     64                 - ALL
     65             readOnlyRootFilesystem: true
     66             #runAsNonRoot: true
     67           volumeMounts:
     68             - mountPath: /data/config/production.yaml
     69               name: config-volume
     70               subPath: production.yaml
     71             - mountPath: /data/storage
     72               name: storage
     73             - mountPath: /tmp
     74               name: tmp
     75       volumes:
     76         - configMap:
     77             name: mjolnir-freifunk-config
     78           name: config-volume
     79         - name: storage
     80           persistentVolumeClaim:
     81             claimName: mjolnir-freifunk-persistent-storage
     82         - name: tmp
     83           emptyDir:
     84             sizeLimit: 2048Mi