attic: enable S3 support

This commit is contained in:
2026-02-18 19:29:12 -05:00
parent 893f10a45c
commit 101be3512a
3 changed files with 55 additions and 1 deletions

10
attic/bucket.yaml Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim
metadata:
name: attic-bucket
namespace: attic
spec:
additionalConfig:
maxSize: 100Gi
bucketName: attic-bucket
storageClassName: weyma-s3-bucket

36
attic/config.yaml Normal file
View File

@@ -0,0 +1,36 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: attic-config
data:
server.toml: |
listen = "[::]:8080"
allowed-hosts = []
#api-endpoint = "https://nix-cache.dubyatp.xyz/"
[database]
url = "sqlite:///var/empty/.local/share/attic/server.db"
[storage]
path = "/data/.local/share/attic/storage"
type = "local"
#region = "us-east-1"
#bucket = "attic-bucket"
#endpoint = "https://weyma-s3.infra.dubyatp.xyz"
[chunking]
nar-size-threshold = 65536
min-size = 16384
avg-size = 65536
max-size = 262144
[compression]
type = "zstd"
[garbage-collection]
interval = "12 hours"
[jwt]
[jwt.signing]

View File

@@ -3,6 +3,7 @@ kind: Deployment
metadata: metadata:
name: attic name: attic
spec: spec:
replicas: 1
selector: selector:
matchLabels: matchLabels:
app: attic app: attic
@@ -17,13 +18,20 @@ spec:
envFrom: envFrom:
- secretRef: - secretRef:
name: attic-secret name: attic-secret
- secretRef:
name: attic-bucket
volumeMounts: volumeMounts:
- name: attic-pvc - name: attic-pvc
mountPath: /var/empty mountPath: /var/empty/
resources: resources:
limits: limits:
memory: "2Gi" memory: "2Gi"
cpu: "500m" cpu: "500m"
- name: multitool
image: wbitt/network-multitool
volumeMounts:
- name: attic-pvc
mountPath: /var/empty/
volumes: volumes:
- name: attic-pvc - name: attic-pvc
persistentVolumeClaim: persistentVolumeClaim: