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
ports: - start
- containerPort: 8888 env:
name: web - name: RUST_LOG
envFrom: value: debug,atuin_server=debug
- configMapRef: - name: ATUIN_DB_URI
name: atuin valueFrom:
volumeMounts: secretKeyRef:
- name: config name: hippo-pguser-atuin
mountPath: /config key: uri
volumeClaimTemplates: optional: false
- metadata: - name: ATUIN_HOST
name: config value: 0.0.0.0
spec: - name: ATUIN_PORT
accessModes: [ "ReadWriteOnce" ] value: "8888"
resources: - name: ATUIN_OPEN_REGISTRATION
requests: value: "true"
storage: 1Gi 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 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