Migrate to upstream atuin server

This commit is contained in:
Gabriel Simmer 2024-03-10 12:18:57 +00:00
parent 7843762156
commit 13f1d5c460
Signed by: arch
SSH key fingerprint: SHA256:m3OEcdtrnBpMX+2BDGh/byv3hrCekCLzDYMdvGEKPPQ
2 changed files with 51 additions and 32 deletions

View file

@ -1,39 +1,62 @@
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: Deployment
metadata: metadata:
name: atuin name: atuin
spec: spec:
replicas: 1
selector: selector:
matchLabels: matchLabels:
app: atuin app: atuin
serviceName: atuin
replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: atuin app: atuin
spec: spec:
containers: containers:
- name: atuin - args:
image: icr.gmem.ca/atuin-server-sqlite:latest - 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: ports:
- containerPort: 8888 - containerPort: 8888
name: web
envFrom:
- configMapRef:
name: atuin
volumeMounts:
- name: config
mountPath: /config
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes: [ "ReadWriteOnce" ]
resources: resources:
limits:
cpu: 500m
memory: 256Mi
requests: requests:
storage: 1Gi 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 apiVersion: v1
kind: Service kind: Service
@ -47,22 +70,13 @@ spec:
port: 8888 port: 8888
targetPort: 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 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: atuin name: atuin
annotations: annotations:
cert-manager.io/issuer: "le-issuer" cert-manager.io/issuer: "le-issuer"
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
namespace: default namespace: default
spec: spec:
tls: tls:

View file

@ -66,6 +66,9 @@ spec:
- name: soju - name: soju
databases: databases:
- soju - soju
- name: atuin
databases:
- atuin
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -84,6 +87,8 @@ data:
GRANT CREATE ON SCHEMA public TO "piped"; GRANT CREATE ON SCHEMA public TO "piped";
\c soju \c soju
GRANT CREATE ON SCHEMA public TO "soju"; GRANT CREATE ON SCHEMA public TO "soju";
\c atuin
GRANT CREATE ON SCHEMA public TO "atuin";
--- ---
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: PodMonitor kind: PodMonitor