Cluster-local object store for build artifacts (CLI binaries etc.) so Docker builds don't depend on flaky external downloads. - Single-node Garage v1.0.1 StatefulSet (LMDB, replication=1) - Metadata on longhorn-nvme (1Gi), data on longhorn HDD (20Gi) - S3 API at garage.platform.svc:3900 - External ingress at s3.coreworlds.io (internal-only) - SealedSecret for admin token and RPC secret
104 lines
2.6 KiB
YAML
104 lines
2.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: garage
|
|
namespace: platform
|
|
labels:
|
|
app: garage
|
|
spec:
|
|
serviceName: garage
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: garage
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: garage
|
|
spec:
|
|
initContainers:
|
|
- name: config
|
|
image: busybox:1.37
|
|
command: ["sh", "-c"]
|
|
args:
|
|
- |
|
|
sed "s/PLACEHOLDER/$RPC_SECRET/" /config-tmpl/garage.toml > /config/garage.toml
|
|
env:
|
|
- name: RPC_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: garage-credentials
|
|
key: rpc-secret
|
|
volumeMounts:
|
|
- name: config-tmpl
|
|
mountPath: /config-tmpl
|
|
- name: config
|
|
mountPath: /config
|
|
containers:
|
|
- name: garage
|
|
image: dxflrs/garage:v1.0.1
|
|
ports:
|
|
- containerPort: 3900
|
|
name: s3-api
|
|
- containerPort: 3901
|
|
name: rpc
|
|
- containerPort: 3902
|
|
name: web
|
|
- containerPort: 3903
|
|
name: admin
|
|
env:
|
|
- name: GARAGE_ADMIN_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: garage-credentials
|
|
key: admin-token
|
|
resources:
|
|
requests:
|
|
memory: 256Mi
|
|
cpu: 100m
|
|
limits:
|
|
memory: 512Mi
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/garage.toml
|
|
subPath: garage.toml
|
|
- name: meta
|
|
mountPath: /mnt/meta
|
|
- name: data
|
|
mountPath: /mnt/data
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3903
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3903
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
volumes:
|
|
- name: config-tmpl
|
|
configMap:
|
|
name: garage-config
|
|
- name: config
|
|
emptyDir: {}
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: meta
|
|
spec:
|
|
accessModes: ["ReadWriteOnce"]
|
|
storageClassName: longhorn-nvme
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
- metadata:
|
|
name: data
|
|
spec:
|
|
accessModes: ["ReadWriteOnce"]
|
|
storageClassName: longhorn
|
|
resources:
|
|
requests:
|
|
storage: 20Gi
|