From 2fa5eeb91df59ba19dad1b9ee00e7e75be22a839 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Fri, 23 Sep 2022 22:03:53 +0200
Subject: [PATCH] feat(coroot): Initial version

---
 infrastructure/coroot/coroot.yaml | 128 ++++++++++++++++++++++++++++++
 1 file changed, 128 insertions(+)
 create mode 100644 infrastructure/coroot/coroot.yaml

diff --git a/infrastructure/coroot/coroot.yaml b/infrastructure/coroot/coroot.yaml
new file mode 100644
index 000000000..930b91ce9
--- /dev/null
+++ b/infrastructure/coroot/coroot.yaml
@@ -0,0 +1,128 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: coroot
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: coroot
+  namespace: coroot
+spec:
+  ports:
+    - port: 8080
+      protocol: TCP
+      targetPort: http
+  selector:
+    app: coroot
+
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: coroot-pvc
+  namespace: coroot
+spec:
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 10Gi
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    app: coroot
+  name: coroot
+  namespace: coroot
+spec:
+  selector:
+    matchLabels:
+      app: coroot
+  template:
+    metadata:
+      labels:
+        app: coroot
+    spec:
+      containers:
+        - name: coroot
+          image: ghcr.io/coroot/coroot:latest
+          imagePullPolicy: IfNotPresent
+          ports:
+            - containerPort: 8080
+              name: http
+              protocol: TCP
+          readinessProbe:
+            httpGet:
+              path: /health
+              port: 8080
+              scheme: HTTP
+            periodSeconds: 5
+            timeoutSeconds: 5
+          resources:
+            requests:
+              cpu: 250m
+              memory: 1Gi
+          volumeMounts:
+            - mountPath: /data
+              name: coroot-pv
+      volumes:
+        - name: coroot-pv
+          persistentVolumeClaim:
+            claimName: coroot-pvc
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: coroot
+
+---
+
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+  labels:
+    app: coroot-node-agent
+  name: coroot-node-agent
+  namespace: coroot
+spec:
+  selector:
+    matchLabels:
+      app: coroot-node-agent
+  template:
+    metadata:
+      labels:
+        app: coroot-node-agent
+      annotations:
+        prometheus.io/scrape: 'true'
+        prometheus.io/port: '80'
+    spec:
+      tolerations:
+        - operator: Exists
+      hostPID: true
+      containers:
+        - name: coroot-node-agent
+          image: ghcr.io/coroot/coroot-node-agent:latest
+          args: ["--cgroupfs-root", "/host/sys/fs/cgroup"]
+          ports:
+            - containerPort: 80
+              name: http
+          securityContext:
+            privileged: true
+          volumeMounts:
+            - mountPath: /host/sys/fs/cgroup
+              name: cgroupfs
+              readOnly: true
+            - mountPath: /sys/kernel/debug
+              name: debugfs
+              readOnly: false
+      volumes:
+        - hostPath:
+            path: /sys/fs/cgroup
+          name: cgroupfs
+        - hostPath:
+            path: /sys/kernel/debug
+          name: debugfs
-- 
GitLab