From 13f1d5c460c6f31728bbc42dfa3d9f7d1c5984d4 Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Sun, 10 Mar 2024 12:18:57 +0000 Subject: [PATCH] Migrate to upstream atuin server --- homelab/atuin.yaml | 78 +++++++++++++++++++++--------------- homelab/postgres-cluster.yml | 5 +++ 2 files changed, 51 insertions(+), 32 deletions(-) diff --git a/homelab/atuin.yaml b/homelab/atuin.yaml index 94f3414..5ddd495 100644 --- a/homelab/atuin.yaml +++ b/homelab/atuin.yaml @@ -1,39 +1,62 @@ --- apiVersion: apps/v1 -kind: StatefulSet +kind: Deployment metadata: name: atuin spec: + replicas: 1 selector: matchLabels: app: atuin - serviceName: atuin - replicas: 1 template: metadata: labels: app: atuin spec: containers: - - name: atuin - image: icr.gmem.ca/atuin-server-sqlite:latest - ports: - - containerPort: 8888 - name: web - envFrom: - - configMapRef: - name: atuin - volumeMounts: - - name: config - mountPath: /config - volumeClaimTemplates: - - metadata: - name: config - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 1Gi + - args: + - server + - start + env: + - name: RUST_LOG + value: debug,atuin_server=debug + - name: ATUIN_DB_URI + valueFrom: + secretKeyRef: + name: hippo-pguser-atuin + key: uri + optional: false + - name: ATUIN_HOST + value: 0.0.0.0 + - name: ATUIN_PORT + value: "8888" + - name: ATUIN_OPEN_REGISTRATION + value: "true" + image: ghcr.io/atuinsh/atuin:v18.0.0 + name: atuin + ports: + - containerPort: 8888 + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi + livenessProbe: + httpGet: + path: / + port: 8888 + failureThreshold: 1 + initialDelaySeconds: 10 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 8888 + failureThreshold: 1 + initialDelaySeconds: 10 + periodSeconds: 10 --- apiVersion: v1 kind: Service @@ -47,22 +70,13 @@ spec: port: 8888 targetPort: 8888 --- -apiVersion: v1 -kind: ConfigMap -metadata: - name: atuin -data: - ATUIN_OPEN_REGISTRATION: "false" - ATUIN_DB_URI: "sqlite:///config/database.sqlite" - ATUIN_HOST: "0.0.0.0" - ATUIN_PORT: "8888" ---- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: atuin annotations: cert-manager.io/issuer: "le-issuer" + nginx.ingress.kubernetes.io/proxy-body-size: 1024m namespace: default spec: tls: diff --git a/homelab/postgres-cluster.yml b/homelab/postgres-cluster.yml index 10ec0e6..60fd3b4 100644 --- a/homelab/postgres-cluster.yml +++ b/homelab/postgres-cluster.yml @@ -66,6 +66,9 @@ spec: - name: soju databases: - soju + - name: atuin + databases: + - atuin --- apiVersion: v1 kind: ConfigMap @@ -84,6 +87,8 @@ data: GRANT CREATE ON SCHEMA public TO "piped"; \c soju GRANT CREATE ON SCHEMA public TO "soju"; + \c atuin + GRANT CREATE ON SCHEMA public TO "atuin"; --- apiVersion: monitoring.coreos.com/v1 kind: PodMonitor