From 9ee5edfe6233c42987de5c467b58b38aba47ac56 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Wed, 9 Aug 2023 14:14:31 +0200 Subject: [PATCH] feat(local): install minio object storage via helm chart --- .../env/local/minio.values.yaml.gotmpl | 19 +++++++++++++++++++ k8s/helmfile/helmfile.yaml | 10 ++++++++++ tf/env/local/secrets-minio.tf | 17 +++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 k8s/helmfile/env/local/minio.values.yaml.gotmpl create mode 100644 tf/env/local/secrets-minio.tf diff --git a/k8s/helmfile/env/local/minio.values.yaml.gotmpl b/k8s/helmfile/env/local/minio.values.yaml.gotmpl new file mode 100644 index 000000000..691c9cc83 --- /dev/null +++ b/k8s/helmfile/env/local/minio.values.yaml.gotmpl @@ -0,0 +1,19 @@ +existingSecret: minio-credentials + +image: + tag: RELEASE.2023-07-07T07-13-57Z + +mode: standalone + +replicas: 1 + +persistence: + size: 4Gi + +buckets: + - name: backups + policy: public + +resources: + requests: + memory: 0.5Gi diff --git a/k8s/helmfile/helmfile.yaml b/k8s/helmfile/helmfile.yaml index 65f974ec0..ed216170a 100644 --- a/k8s/helmfile/helmfile.yaml +++ b/k8s/helmfile/helmfile.yaml @@ -18,6 +18,8 @@ repositories: url: https://prometheus-community.github.io/helm-charts - name: istio url: https://istio-release.storage.googleapis.com/charts + - name: minio + url: https://charts.min.io environments: default: @@ -257,3 +259,11 @@ releases: version: 5.0.1 values: - env/local/mailhog.values.yaml.gotmpl + + - name: minio + installed: {{ eq .Environment.Name "local" | toYaml }} + namespace: default + chart: minio/minio + version: 5.0.13 + values: + - env/local/minio.values.yaml.gotmpl diff --git a/tf/env/local/secrets-minio.tf b/tf/env/local/secrets-minio.tf new file mode 100644 index 000000000..a892bbbb8 --- /dev/null +++ b/tf/env/local/secrets-minio.tf @@ -0,0 +1,17 @@ +resource "random_password" "minio-password" { + length = 32 +} + +resource "kubernetes_secret" "minio-credentials" { + metadata { + name = "minio-credentials" + } + + binary_data = { + "rootPassword" = base64encode(random_password.minio-password.result) + } + + data = { + "rootUser" = "minio" + } +}