deployment.yaml (3190B)
1 apiVersion: v1 2 kind: PersistentVolumeClaim 3 metadata: 4 name: m-org-statistics-persistent-storage 5 namespace: statistics 6 spec: 7 accessModes: 8 - ReadWriteMany 9 resources: 10 requests: 11 storage: 4Gi 12 --- 13 apiVersion: apps/v1 14 kind: Deployment 15 metadata: 16 name: morg-statistics 17 namespace: statistics 18 spec: 19 strategy: 20 rollingUpdate: 21 maxSurge: 25% 22 maxUnavailable: 25% 23 type: RollingUpdate 24 selector: 25 matchLabels: 26 app: morg-statistics 27 template: 28 metadata: 29 labels: 30 app: morg-statistics 31 spec: 32 automountServiceAccountToken: false 33 containers: 34 - name: morg-statistics 35 image: ghcr.io/mtrnord/matrix-org-statistics:latest 36 imagePullPolicy: Always 37 env: 38 - name: CACHE_DIR 39 value: "/data" 40 resources: 41 limits: 42 memory: "1Gi" 43 cpu: "1" 44 requests: 45 memory: "500Mi" 46 cpu: "250m" 47 securityContext: 48 allowPrivilegeEscalation: false 49 readOnlyRootFilesystem: true 50 runAsNonRoot: true 51 runAsUser: 999 52 runAsGroup: 999 53 capabilities: 54 drop: 55 - ALL 56 seccompProfile: 57 type: RuntimeDefault 58 ports: 59 - containerPort: 8080 60 name: http 61 protocol: TCP 62 volumeMounts: 63 - mountPath: /data 64 name: storage 65 - mountPath: /tmp 66 name: tmp 67 - mountPath: /var/log/shiny-server/ 68 name: tmp-log 69 - mountPath: /var/lib/shiny-server/bookmarks 70 name: tmp-bookmarks 71 - mountPath: /home/shiny/.cache 72 name: tmp-cache 73 livenessProbe: 74 httpGet: 75 path: / 76 port: http 77 scheme: HTTP 78 initialDelaySeconds: 15 79 periodSeconds: 10 80 startupProbe: 81 httpGet: 82 path: / 83 port: http 84 initialDelaySeconds: 15 85 failureThreshold: 30 86 periodSeconds: 10 87 volumes: 88 - name: storage 89 persistentVolumeClaim: 90 claimName: m-org-statistics-persistent-storage 91 - name: tmp 92 emptyDir: 93 sizeLimit: 2048Mi 94 - name: tmp-log 95 emptyDir: 96 sizeLimit: 2048Mi 97 - name: tmp-bookmarks 98 emptyDir: 99 sizeLimit: 2048Mi 100 - name: tmp-cache 101 emptyDir: 102 sizeLimit: 2048Mi 103 --- 104 apiVersion: v1 105 kind: Service 106 metadata: 107 name: morg-statistics 108 namespace: statistics 109 labels: 110 app: morg-statistics 111 spec: 112 selector: 113 app: morg-statistics 114 ports: 115 - port: 8080 116 targetPort: http 117 protocol: TCP 118 name: http 119 --- 120 apiVersion: gateway.networking.k8s.io/v1 121 kind: HTTPRoute 122 metadata: 123 name: morg-statistics 124 namespace: statistics 125 spec: 126 parentRefs: 127 - name: envoy-gateway 128 namespace: envoy-gateway 129 hostnames: 130 - morg-statistics.midnightthoughts.space 131 rules: 132 - backendRefs: 133 - name: morg-statistics 134 port: 8080