mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-20 06:31:27 +01:00
Deploy RustFS in place of the retired MinIO and move the S3 consumers over. - flake.nix / flake.lock / outputs/default.nix: add a nixpkgs-small (nixos-unstable-small) input for the rustfs 1.0.0 package (with the web console), instantiated as pkgs-small in genSpecialArgs alongside the other nixpkgs instances; drop the rustfs flake input. The rest of the system stays on the default nixpkgs. - hosts/12kingdoms-youko/homelab-services/rustfs.nix: use nixpkgs' own services.rustfs module, with package = pkgs-small.rustfs and environmentFile = the agenix rustfs.env secret. - caddy.nix: s3.writefor.fun (S3 API) and s3-console.writefor.fun (console, redirects / to /rustfs/console/). - secrets/nixos.nix: declare a single rustfs.env (dotenv) secret holding RUSTFS_ACCESS_KEY / RUSTFS_SECRET_KEY, replacing the separate key files. - infra/minio -> infra/rustfs: buckets are managed with the hashicorp/aws provider against the RustFS S3 endpoint; IAM/ILM are applied with rc.
23 lines
720 B
Terraform
23 lines
720 B
Terraform
# ==============================================
|
|
# Buckets
|
|
# ==============================================
|
|
|
|
resource "aws_s3_bucket" "loki-chunks" {
|
|
bucket = "k3s-test-1-loki-chunks"
|
|
}
|
|
|
|
resource "aws_s3_bucket" "loki-ruler" {
|
|
bucket = "k3s-test-1-loki-ruler"
|
|
}
|
|
|
|
resource "aws_s3_bucket" "loki-admin" {
|
|
bucket = "k3s-test-1-loki-admin"
|
|
}
|
|
|
|
# NOTE: bucket lifecycle is NOT managed here. The AWS provider's
|
|
# aws_s3_bucket_lifecycle_configuration waits on a GetBucketLifecycleConfiguration
|
|
# response shape that RustFS does not satisfy (it times out). The 7-day expiry on
|
|
# `chunks` is set with the official `rc` client instead:
|
|
# rc ilm rule add rustfs/k3s-test-1-loki-chunks --expiry-days 7
|
|
# (see ../README.md).
|